1#[doc = "Register `IMR` reader"]
2pub type R = crate::R<ImrSpec>;
3#[doc = "Field `MB0` reader - Mailbox 0 Interrupt Mask"]
4pub type Mb0R = crate::BitReader;
5#[doc = "Field `MB1` reader - Mailbox 1 Interrupt Mask"]
6pub type Mb1R = crate::BitReader;
7#[doc = "Field `MB2` reader - Mailbox 2 Interrupt Mask"]
8pub type Mb2R = crate::BitReader;
9#[doc = "Field `MB3` reader - Mailbox 3 Interrupt Mask"]
10pub type Mb3R = crate::BitReader;
11#[doc = "Field `MB4` reader - Mailbox 4 Interrupt Mask"]
12pub type Mb4R = crate::BitReader;
13#[doc = "Field `MB5` reader - Mailbox 5 Interrupt Mask"]
14pub type Mb5R = crate::BitReader;
15#[doc = "Field `MB6` reader - Mailbox 6 Interrupt Mask"]
16pub type Mb6R = crate::BitReader;
17#[doc = "Field `MB7` reader - Mailbox 7 Interrupt Mask"]
18pub type Mb7R = crate::BitReader;
19#[doc = "Field `ERRA` reader - Error Active Mode Interrupt Mask"]
20pub type ErraR = crate::BitReader;
21#[doc = "Field `WARN` reader - Warning Limit Interrupt Mask"]
22pub type WarnR = crate::BitReader;
23#[doc = "Field `ERRP` reader - Error Passive Mode Interrupt Mask"]
24pub type ErrpR = crate::BitReader;
25#[doc = "Field `BOFF` reader - Bus Off Mode Interrupt Mask"]
26pub type BoffR = crate::BitReader;
27#[doc = "Field `SLEEP` reader - Sleep Interrupt Mask"]
28pub type SleepR = crate::BitReader;
29#[doc = "Field `WAKEUP` reader - Wakeup Interrupt Mask"]
30pub type WakeupR = crate::BitReader;
31#[doc = "Field `TOVF` reader - Timer Overflow Interrupt Mask"]
32pub type TovfR = crate::BitReader;
33#[doc = "Field `TSTP` reader - Timestamp Interrupt Mask"]
34pub type TstpR = crate::BitReader;
35#[doc = "Field `CERR` reader - CRC Error Interrupt Mask"]
36pub type CerrR = crate::BitReader;
37#[doc = "Field `SERR` reader - Stuffing Error Interrupt Mask"]
38pub type SerrR = crate::BitReader;
39#[doc = "Field `AERR` reader - Acknowledgment Error Interrupt Mask"]
40pub type AerrR = crate::BitReader;
41#[doc = "Field `FERR` reader - Form Error Interrupt Mask"]
42pub type FerrR = crate::BitReader;
43#[doc = "Field `BERR` reader - Bit Error Interrupt Mask"]
44pub type BerrR = crate::BitReader;
45impl R {
46 #[doc = "Bit 0 - Mailbox 0 Interrupt Mask"]
47 #[inline(always)]
48 pub fn mb0(&self) -> Mb0R {
49 Mb0R::new((self.bits & 1) != 0)
50 }
51 #[doc = "Bit 1 - Mailbox 1 Interrupt Mask"]
52 #[inline(always)]
53 pub fn mb1(&self) -> Mb1R {
54 Mb1R::new(((self.bits >> 1) & 1) != 0)
55 }
56 #[doc = "Bit 2 - Mailbox 2 Interrupt Mask"]
57 #[inline(always)]
58 pub fn mb2(&self) -> Mb2R {
59 Mb2R::new(((self.bits >> 2) & 1) != 0)
60 }
61 #[doc = "Bit 3 - Mailbox 3 Interrupt Mask"]
62 #[inline(always)]
63 pub fn mb3(&self) -> Mb3R {
64 Mb3R::new(((self.bits >> 3) & 1) != 0)
65 }
66 #[doc = "Bit 4 - Mailbox 4 Interrupt Mask"]
67 #[inline(always)]
68 pub fn mb4(&self) -> Mb4R {
69 Mb4R::new(((self.bits >> 4) & 1) != 0)
70 }
71 #[doc = "Bit 5 - Mailbox 5 Interrupt Mask"]
72 #[inline(always)]
73 pub fn mb5(&self) -> Mb5R {
74 Mb5R::new(((self.bits >> 5) & 1) != 0)
75 }
76 #[doc = "Bit 6 - Mailbox 6 Interrupt Mask"]
77 #[inline(always)]
78 pub fn mb6(&self) -> Mb6R {
79 Mb6R::new(((self.bits >> 6) & 1) != 0)
80 }
81 #[doc = "Bit 7 - Mailbox 7 Interrupt Mask"]
82 #[inline(always)]
83 pub fn mb7(&self) -> Mb7R {
84 Mb7R::new(((self.bits >> 7) & 1) != 0)
85 }
86 #[doc = "Bit 16 - Error Active Mode Interrupt Mask"]
87 #[inline(always)]
88 pub fn erra(&self) -> ErraR {
89 ErraR::new(((self.bits >> 16) & 1) != 0)
90 }
91 #[doc = "Bit 17 - Warning Limit Interrupt Mask"]
92 #[inline(always)]
93 pub fn warn(&self) -> WarnR {
94 WarnR::new(((self.bits >> 17) & 1) != 0)
95 }
96 #[doc = "Bit 18 - Error Passive Mode Interrupt Mask"]
97 #[inline(always)]
98 pub fn errp(&self) -> ErrpR {
99 ErrpR::new(((self.bits >> 18) & 1) != 0)
100 }
101 #[doc = "Bit 19 - Bus Off Mode Interrupt Mask"]
102 #[inline(always)]
103 pub fn boff(&self) -> BoffR {
104 BoffR::new(((self.bits >> 19) & 1) != 0)
105 }
106 #[doc = "Bit 20 - Sleep Interrupt Mask"]
107 #[inline(always)]
108 pub fn sleep(&self) -> SleepR {
109 SleepR::new(((self.bits >> 20) & 1) != 0)
110 }
111 #[doc = "Bit 21 - Wakeup Interrupt Mask"]
112 #[inline(always)]
113 pub fn wakeup(&self) -> WakeupR {
114 WakeupR::new(((self.bits >> 21) & 1) != 0)
115 }
116 #[doc = "Bit 22 - Timer Overflow Interrupt Mask"]
117 #[inline(always)]
118 pub fn tovf(&self) -> TovfR {
119 TovfR::new(((self.bits >> 22) & 1) != 0)
120 }
121 #[doc = "Bit 23 - Timestamp Interrupt Mask"]
122 #[inline(always)]
123 pub fn tstp(&self) -> TstpR {
124 TstpR::new(((self.bits >> 23) & 1) != 0)
125 }
126 #[doc = "Bit 24 - CRC Error Interrupt Mask"]
127 #[inline(always)]
128 pub fn cerr(&self) -> CerrR {
129 CerrR::new(((self.bits >> 24) & 1) != 0)
130 }
131 #[doc = "Bit 25 - Stuffing Error Interrupt Mask"]
132 #[inline(always)]
133 pub fn serr(&self) -> SerrR {
134 SerrR::new(((self.bits >> 25) & 1) != 0)
135 }
136 #[doc = "Bit 26 - Acknowledgment Error Interrupt Mask"]
137 #[inline(always)]
138 pub fn aerr(&self) -> AerrR {
139 AerrR::new(((self.bits >> 26) & 1) != 0)
140 }
141 #[doc = "Bit 27 - Form Error Interrupt Mask"]
142 #[inline(always)]
143 pub fn ferr(&self) -> FerrR {
144 FerrR::new(((self.bits >> 27) & 1) != 0)
145 }
146 #[doc = "Bit 28 - Bit Error Interrupt Mask"]
147 #[inline(always)]
148 pub fn berr(&self) -> BerrR {
149 BerrR::new(((self.bits >> 28) & 1) != 0)
150 }
151}
152#[doc = "Interrupt Mask Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`imr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
153pub struct ImrSpec;
154impl crate::RegisterSpec for ImrSpec {
155 type Ux = u32;
156}
157#[doc = "`read()` method returns [`imr::R`](R) reader structure"]
158impl crate::Readable for ImrSpec {}
159#[doc = "`reset()` method sets IMR to value 0"]
160impl crate::Resettable for ImrSpec {
161 const RESET_VALUE: u32 = 0;
162}