atsamd11d/hmatrix/
prbs.rs
1#[doc = "Register `PRBS%s` reader"]
2pub type R = crate::R<PrbsSpec>;
3#[doc = "Register `PRBS%s` writer"]
4pub type W = crate::W<PrbsSpec>;
5#[doc = "Field `M8PR` reader - Master 8 Priority"]
6pub type M8prR = crate::FieldReader;
7#[doc = "Field `M8PR` writer - Master 8 Priority"]
8pub type M8prW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9#[doc = "Field `M9PR` reader - Master 9 Priority"]
10pub type M9prR = crate::FieldReader;
11#[doc = "Field `M9PR` writer - Master 9 Priority"]
12pub type M9prW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13#[doc = "Field `M10PR` reader - Master 10 Priority"]
14pub type M10prR = crate::FieldReader;
15#[doc = "Field `M10PR` writer - Master 10 Priority"]
16pub type M10prW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
17#[doc = "Field `M11PR` reader - Master 11 Priority"]
18pub type M11prR = crate::FieldReader;
19#[doc = "Field `M11PR` writer - Master 11 Priority"]
20pub type M11prW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
21#[doc = "Field `M12PR` reader - Master 12 Priority"]
22pub type M12prR = crate::FieldReader;
23#[doc = "Field `M12PR` writer - Master 12 Priority"]
24pub type M12prW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
25#[doc = "Field `M13PR` reader - Master 13 Priority"]
26pub type M13prR = crate::FieldReader;
27#[doc = "Field `M13PR` writer - Master 13 Priority"]
28pub type M13prW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
29#[doc = "Field `M14PR` reader - Master 14 Priority"]
30pub type M14prR = crate::FieldReader;
31#[doc = "Field `M14PR` writer - Master 14 Priority"]
32pub type M14prW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
33#[doc = "Field `M15PR` reader - Master 15 Priority"]
34pub type M15prR = crate::FieldReader;
35#[doc = "Field `M15PR` writer - Master 15 Priority"]
36pub type M15prW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
37impl R {
38 #[doc = "Bits 0:3 - Master 8 Priority"]
39 #[inline(always)]
40 pub fn m8pr(&self) -> M8prR {
41 M8prR::new((self.bits & 0x0f) as u8)
42 }
43 #[doc = "Bits 4:7 - Master 9 Priority"]
44 #[inline(always)]
45 pub fn m9pr(&self) -> M9prR {
46 M9prR::new(((self.bits >> 4) & 0x0f) as u8)
47 }
48 #[doc = "Bits 8:11 - Master 10 Priority"]
49 #[inline(always)]
50 pub fn m10pr(&self) -> M10prR {
51 M10prR::new(((self.bits >> 8) & 0x0f) as u8)
52 }
53 #[doc = "Bits 12:15 - Master 11 Priority"]
54 #[inline(always)]
55 pub fn m11pr(&self) -> M11prR {
56 M11prR::new(((self.bits >> 12) & 0x0f) as u8)
57 }
58 #[doc = "Bits 16:19 - Master 12 Priority"]
59 #[inline(always)]
60 pub fn m12pr(&self) -> M12prR {
61 M12prR::new(((self.bits >> 16) & 0x0f) as u8)
62 }
63 #[doc = "Bits 20:23 - Master 13 Priority"]
64 #[inline(always)]
65 pub fn m13pr(&self) -> M13prR {
66 M13prR::new(((self.bits >> 20) & 0x0f) as u8)
67 }
68 #[doc = "Bits 24:27 - Master 14 Priority"]
69 #[inline(always)]
70 pub fn m14pr(&self) -> M14prR {
71 M14prR::new(((self.bits >> 24) & 0x0f) as u8)
72 }
73 #[doc = "Bits 28:31 - Master 15 Priority"]
74 #[inline(always)]
75 pub fn m15pr(&self) -> M15prR {
76 M15prR::new(((self.bits >> 28) & 0x0f) as u8)
77 }
78}
79impl W {
80 #[doc = "Bits 0:3 - Master 8 Priority"]
81 #[inline(always)]
82 #[must_use]
83 pub fn m8pr(&mut self) -> M8prW<PrbsSpec> {
84 M8prW::new(self, 0)
85 }
86 #[doc = "Bits 4:7 - Master 9 Priority"]
87 #[inline(always)]
88 #[must_use]
89 pub fn m9pr(&mut self) -> M9prW<PrbsSpec> {
90 M9prW::new(self, 4)
91 }
92 #[doc = "Bits 8:11 - Master 10 Priority"]
93 #[inline(always)]
94 #[must_use]
95 pub fn m10pr(&mut self) -> M10prW<PrbsSpec> {
96 M10prW::new(self, 8)
97 }
98 #[doc = "Bits 12:15 - Master 11 Priority"]
99 #[inline(always)]
100 #[must_use]
101 pub fn m11pr(&mut self) -> M11prW<PrbsSpec> {
102 M11prW::new(self, 12)
103 }
104 #[doc = "Bits 16:19 - Master 12 Priority"]
105 #[inline(always)]
106 #[must_use]
107 pub fn m12pr(&mut self) -> M12prW<PrbsSpec> {
108 M12prW::new(self, 16)
109 }
110 #[doc = "Bits 20:23 - Master 13 Priority"]
111 #[inline(always)]
112 #[must_use]
113 pub fn m13pr(&mut self) -> M13prW<PrbsSpec> {
114 M13prW::new(self, 20)
115 }
116 #[doc = "Bits 24:27 - Master 14 Priority"]
117 #[inline(always)]
118 #[must_use]
119 pub fn m14pr(&mut self) -> M14prW<PrbsSpec> {
120 M14prW::new(self, 24)
121 }
122 #[doc = "Bits 28:31 - Master 15 Priority"]
123 #[inline(always)]
124 #[must_use]
125 pub fn m15pr(&mut self) -> M15prW<PrbsSpec> {
126 M15prW::new(self, 28)
127 }
128}
129#[doc = "Priority B for Slave\n\nYou can [`read`](crate::Reg::read) this register and get [`prbs::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`prbs::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
130pub struct PrbsSpec;
131impl crate::RegisterSpec for PrbsSpec {
132 type Ux = u32;
133}
134#[doc = "`read()` method returns [`prbs::R`](R) reader structure"]
135impl crate::Readable for PrbsSpec {}
136#[doc = "`write(|w| ..)` method takes [`prbs::W`](W) writer structure"]
137impl crate::Writable for PrbsSpec {
138 type Safety = crate::Unsafe;
139 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
140 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
141}
142#[doc = "`reset()` method sets PRBS%s to value 0"]
143impl crate::Resettable for PrbsSpec {
144 const RESET_VALUE: u32 = 0;
145}