1#[doc = "Register `IER` writer"]
2pub struct W(crate::W<IER_SPEC>);
3impl core::ops::Deref for W {
4 type Target = crate::W<IER_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl core::ops::DerefMut for W {
11 #[inline(always)]
12 fn deref_mut(&mut self) -> &mut Self::Target {
13 &mut self.0
14 }
15}
16impl From<crate::W<IER_SPEC>> for W {
17 #[inline(always)]
18 fn from(writer: crate::W<IER_SPEC>) -> Self {
19 W(writer)
20 }
21}
22#[doc = "Field `MB0` writer - Mailbox 0 Interrupt Enable"]
23pub type MB0_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
24#[doc = "Field `MB1` writer - Mailbox 1 Interrupt Enable"]
25pub type MB1_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
26#[doc = "Field `MB2` writer - Mailbox 2 Interrupt Enable"]
27pub type MB2_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
28#[doc = "Field `MB3` writer - Mailbox 3 Interrupt Enable"]
29pub type MB3_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
30#[doc = "Field `MB4` writer - Mailbox 4 Interrupt Enable"]
31pub type MB4_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
32#[doc = "Field `MB5` writer - Mailbox 5 Interrupt Enable"]
33pub type MB5_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
34#[doc = "Field `MB6` writer - Mailbox 6 Interrupt Enable"]
35pub type MB6_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
36#[doc = "Field `MB7` writer - Mailbox 7 Interrupt Enable"]
37pub type MB7_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
38#[doc = "Field `ERRA` writer - Error Active Mode Interrupt Enable"]
39pub type ERRA_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
40#[doc = "Field `WARN` writer - Warning Limit Interrupt Enable"]
41pub type WARN_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
42#[doc = "Field `ERRP` writer - Error Passive Mode Interrupt Enable"]
43pub type ERRP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
44#[doc = "Field `BOFF` writer - Bus Off Mode Interrupt Enable"]
45pub type BOFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
46#[doc = "Field `SLEEP` writer - Sleep Interrupt Enable"]
47pub type SLEEP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
48#[doc = "Field `WAKEUP` writer - Wakeup Interrupt Enable"]
49pub type WAKEUP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
50#[doc = "Field `TOVF` writer - Timer Overflow Interrupt Enable"]
51pub type TOVF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
52#[doc = "Field `TSTP` writer - TimeStamp Interrupt Enable"]
53pub type TSTP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
54#[doc = "Field `CERR` writer - CRC Error Interrupt Enable"]
55pub type CERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
56#[doc = "Field `SERR` writer - Stuffing Error Interrupt Enable"]
57pub type SERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
58#[doc = "Field `AERR` writer - Acknowledgment Error Interrupt Enable"]
59pub type AERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
60#[doc = "Field `FERR` writer - Form Error Interrupt Enable"]
61pub type FERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
62#[doc = "Field `BERR` writer - Bit Error Interrupt Enable"]
63pub type BERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IER_SPEC, bool, O>;
64impl W {
65 #[doc = "Bit 0 - Mailbox 0 Interrupt Enable"]
66 #[inline(always)]
67 #[must_use]
68 pub fn mb0(&mut self) -> MB0_W<0> {
69 MB0_W::new(self)
70 }
71 #[doc = "Bit 1 - Mailbox 1 Interrupt Enable"]
72 #[inline(always)]
73 #[must_use]
74 pub fn mb1(&mut self) -> MB1_W<1> {
75 MB1_W::new(self)
76 }
77 #[doc = "Bit 2 - Mailbox 2 Interrupt Enable"]
78 #[inline(always)]
79 #[must_use]
80 pub fn mb2(&mut self) -> MB2_W<2> {
81 MB2_W::new(self)
82 }
83 #[doc = "Bit 3 - Mailbox 3 Interrupt Enable"]
84 #[inline(always)]
85 #[must_use]
86 pub fn mb3(&mut self) -> MB3_W<3> {
87 MB3_W::new(self)
88 }
89 #[doc = "Bit 4 - Mailbox 4 Interrupt Enable"]
90 #[inline(always)]
91 #[must_use]
92 pub fn mb4(&mut self) -> MB4_W<4> {
93 MB4_W::new(self)
94 }
95 #[doc = "Bit 5 - Mailbox 5 Interrupt Enable"]
96 #[inline(always)]
97 #[must_use]
98 pub fn mb5(&mut self) -> MB5_W<5> {
99 MB5_W::new(self)
100 }
101 #[doc = "Bit 6 - Mailbox 6 Interrupt Enable"]
102 #[inline(always)]
103 #[must_use]
104 pub fn mb6(&mut self) -> MB6_W<6> {
105 MB6_W::new(self)
106 }
107 #[doc = "Bit 7 - Mailbox 7 Interrupt Enable"]
108 #[inline(always)]
109 #[must_use]
110 pub fn mb7(&mut self) -> MB7_W<7> {
111 MB7_W::new(self)
112 }
113 #[doc = "Bit 16 - Error Active Mode Interrupt Enable"]
114 #[inline(always)]
115 #[must_use]
116 pub fn erra(&mut self) -> ERRA_W<16> {
117 ERRA_W::new(self)
118 }
119 #[doc = "Bit 17 - Warning Limit Interrupt Enable"]
120 #[inline(always)]
121 #[must_use]
122 pub fn warn(&mut self) -> WARN_W<17> {
123 WARN_W::new(self)
124 }
125 #[doc = "Bit 18 - Error Passive Mode Interrupt Enable"]
126 #[inline(always)]
127 #[must_use]
128 pub fn errp(&mut self) -> ERRP_W<18> {
129 ERRP_W::new(self)
130 }
131 #[doc = "Bit 19 - Bus Off Mode Interrupt Enable"]
132 #[inline(always)]
133 #[must_use]
134 pub fn boff(&mut self) -> BOFF_W<19> {
135 BOFF_W::new(self)
136 }
137 #[doc = "Bit 20 - Sleep Interrupt Enable"]
138 #[inline(always)]
139 #[must_use]
140 pub fn sleep(&mut self) -> SLEEP_W<20> {
141 SLEEP_W::new(self)
142 }
143 #[doc = "Bit 21 - Wakeup Interrupt Enable"]
144 #[inline(always)]
145 #[must_use]
146 pub fn wakeup(&mut self) -> WAKEUP_W<21> {
147 WAKEUP_W::new(self)
148 }
149 #[doc = "Bit 22 - Timer Overflow Interrupt Enable"]
150 #[inline(always)]
151 #[must_use]
152 pub fn tovf(&mut self) -> TOVF_W<22> {
153 TOVF_W::new(self)
154 }
155 #[doc = "Bit 23 - TimeStamp Interrupt Enable"]
156 #[inline(always)]
157 #[must_use]
158 pub fn tstp(&mut self) -> TSTP_W<23> {
159 TSTP_W::new(self)
160 }
161 #[doc = "Bit 24 - CRC Error Interrupt Enable"]
162 #[inline(always)]
163 #[must_use]
164 pub fn cerr(&mut self) -> CERR_W<24> {
165 CERR_W::new(self)
166 }
167 #[doc = "Bit 25 - Stuffing Error Interrupt Enable"]
168 #[inline(always)]
169 #[must_use]
170 pub fn serr(&mut self) -> SERR_W<25> {
171 SERR_W::new(self)
172 }
173 #[doc = "Bit 26 - Acknowledgment Error Interrupt Enable"]
174 #[inline(always)]
175 #[must_use]
176 pub fn aerr(&mut self) -> AERR_W<26> {
177 AERR_W::new(self)
178 }
179 #[doc = "Bit 27 - Form Error Interrupt Enable"]
180 #[inline(always)]
181 #[must_use]
182 pub fn ferr(&mut self) -> FERR_W<27> {
183 FERR_W::new(self)
184 }
185 #[doc = "Bit 28 - Bit Error Interrupt Enable"]
186 #[inline(always)]
187 #[must_use]
188 pub fn berr(&mut self) -> BERR_W<28> {
189 BERR_W::new(self)
190 }
191 #[doc = "Writes raw bits to the register."]
192 #[inline(always)]
193 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
194 self.0.bits(bits);
195 self
196 }
197}
198#[doc = "Interrupt Enable Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ier](index.html) module"]
199pub struct IER_SPEC;
200impl crate::RegisterSpec for IER_SPEC {
201 type Ux = u32;
202}
203#[doc = "`write(|w| ..)` method takes [ier::W](W) writer structure"]
204impl crate::Writable for IER_SPEC {
205 type Writer = W;
206 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
207 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
208}