1#[doc = "Writer for register IFC"]
2pub type W = crate::W<u32, super::IFC>;
3#[doc = "Register IFC `reset()`'s with value 0"]
4impl crate::ResetValue for super::IFC {
5 type Type = u32;
6 #[inline(always)]
7 fn reset_value() -> Self::Type { 0 }
8}
9#[doc = "Write proxy for field `TXC`"]
10pub struct TXC_W<'a> {
11 w: &'a mut W,
12}
13impl<'a> TXC_W<'a> {
14 #[doc = r"Sets the field bit"]
15 #[inline(always)]
16 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
17 #[doc = r"Clears the field bit"]
18 #[inline(always)]
19 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub fn bit(self, value: bool) -> &'a mut W {
23 self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
24 self.w
25 }
26}
27#[doc = "Write proxy for field `RXFULL`"]
28pub struct RXFULL_W<'a> {
29 w: &'a mut W,
30}
31impl<'a> RXFULL_W<'a> {
32 #[doc = r"Sets the field bit"]
33 #[inline(always)]
34 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
35 #[doc = r"Clears the field bit"]
36 #[inline(always)]
37 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
38 #[doc = r"Writes raw bits to the field"]
39 #[inline(always)]
40 pub fn bit(self, value: bool) -> &'a mut W {
41 self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
42 self.w
43 }
44}
45#[doc = "Write proxy for field `RXOF`"]
46pub struct RXOF_W<'a> {
47 w: &'a mut W,
48}
49impl<'a> RXOF_W<'a> {
50 #[doc = r"Sets the field bit"]
51 #[inline(always)]
52 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
53 #[doc = r"Clears the field bit"]
54 #[inline(always)]
55 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
56 #[doc = r"Writes raw bits to the field"]
57 #[inline(always)]
58 pub fn bit(self, value: bool) -> &'a mut W {
59 self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
60 self.w
61 }
62}
63#[doc = "Write proxy for field `RXUF`"]
64pub struct RXUF_W<'a> {
65 w: &'a mut W,
66}
67impl<'a> RXUF_W<'a> {
68 #[doc = r"Sets the field bit"]
69 #[inline(always)]
70 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
71 #[doc = r"Clears the field bit"]
72 #[inline(always)]
73 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
74 #[doc = r"Writes raw bits to the field"]
75 #[inline(always)]
76 pub fn bit(self, value: bool) -> &'a mut W {
77 self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
78 self.w
79 }
80}
81#[doc = "Write proxy for field `TXOF`"]
82pub struct TXOF_W<'a> {
83 w: &'a mut W,
84}
85impl<'a> TXOF_W<'a> {
86 #[doc = r"Sets the field bit"]
87 #[inline(always)]
88 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
89 #[doc = r"Clears the field bit"]
90 #[inline(always)]
91 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
92 #[doc = r"Writes raw bits to the field"]
93 #[inline(always)]
94 pub fn bit(self, value: bool) -> &'a mut W {
95 self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
96 self.w
97 }
98}
99#[doc = "Write proxy for field `TXUF`"]
100pub struct TXUF_W<'a> {
101 w: &'a mut W,
102}
103impl<'a> TXUF_W<'a> {
104 #[doc = r"Sets the field bit"]
105 #[inline(always)]
106 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
107 #[doc = r"Clears the field bit"]
108 #[inline(always)]
109 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
110 #[doc = r"Writes raw bits to the field"]
111 #[inline(always)]
112 pub fn bit(self, value: bool) -> &'a mut W {
113 self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
114 self.w
115 }
116}
117#[doc = "Write proxy for field `PERR`"]
118pub struct PERR_W<'a> {
119 w: &'a mut W,
120}
121impl<'a> PERR_W<'a> {
122 #[doc = r"Sets the field bit"]
123 #[inline(always)]
124 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
125 #[doc = r"Clears the field bit"]
126 #[inline(always)]
127 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
128 #[doc = r"Writes raw bits to the field"]
129 #[inline(always)]
130 pub fn bit(self, value: bool) -> &'a mut W {
131 self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
132 self.w
133 }
134}
135#[doc = "Write proxy for field `FERR`"]
136pub struct FERR_W<'a> {
137 w: &'a mut W,
138}
139impl<'a> FERR_W<'a> {
140 #[doc = r"Sets the field bit"]
141 #[inline(always)]
142 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
143 #[doc = r"Clears the field bit"]
144 #[inline(always)]
145 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
146 #[doc = r"Writes raw bits to the field"]
147 #[inline(always)]
148 pub fn bit(self, value: bool) -> &'a mut W {
149 self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
150 self.w
151 }
152}
153#[doc = "Write proxy for field `MPAF`"]
154pub struct MPAF_W<'a> {
155 w: &'a mut W,
156}
157impl<'a> MPAF_W<'a> {
158 #[doc = r"Sets the field bit"]
159 #[inline(always)]
160 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
161 #[doc = r"Clears the field bit"]
162 #[inline(always)]
163 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
164 #[doc = r"Writes raw bits to the field"]
165 #[inline(always)]
166 pub fn bit(self, value: bool) -> &'a mut W {
167 self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
168 self.w
169 }
170}
171#[doc = "Write proxy for field `SSM`"]
172pub struct SSM_W<'a> {
173 w: &'a mut W,
174}
175impl<'a> SSM_W<'a> {
176 #[doc = r"Sets the field bit"]
177 #[inline(always)]
178 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
179 #[doc = r"Clears the field bit"]
180 #[inline(always)]
181 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
182 #[doc = r"Writes raw bits to the field"]
183 #[inline(always)]
184 pub fn bit(self, value: bool) -> &'a mut W {
185 self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
186 self.w
187 }
188}
189#[doc = "Write proxy for field `CCF`"]
190pub struct CCF_W<'a> {
191 w: &'a mut W,
192}
193impl<'a> CCF_W<'a> {
194 #[doc = r"Sets the field bit"]
195 #[inline(always)]
196 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
197 #[doc = r"Clears the field bit"]
198 #[inline(always)]
199 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
200 #[doc = r"Writes raw bits to the field"]
201 #[inline(always)]
202 pub fn bit(self, value: bool) -> &'a mut W {
203 self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
204 self.w
205 }
206}
207#[doc = "Write proxy for field `TXIDLE`"]
208pub struct TXIDLE_W<'a> {
209 w: &'a mut W,
210}
211impl<'a> TXIDLE_W<'a> {
212 #[doc = r"Sets the field bit"]
213 #[inline(always)]
214 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
215 #[doc = r"Clears the field bit"]
216 #[inline(always)]
217 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
218 #[doc = r"Writes raw bits to the field"]
219 #[inline(always)]
220 pub fn bit(self, value: bool) -> &'a mut W {
221 self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
222 self.w
223 }
224}
225#[doc = "Write proxy for field `TCMP0`"]
226pub struct TCMP0_W<'a> {
227 w: &'a mut W,
228}
229impl<'a> TCMP0_W<'a> {
230 #[doc = r"Sets the field bit"]
231 #[inline(always)]
232 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
233 #[doc = r"Clears the field bit"]
234 #[inline(always)]
235 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
236 #[doc = r"Writes raw bits to the field"]
237 #[inline(always)]
238 pub fn bit(self, value: bool) -> &'a mut W {
239 self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
240 self.w
241 }
242}
243#[doc = "Write proxy for field `TCMP1`"]
244pub struct TCMP1_W<'a> {
245 w: &'a mut W,
246}
247impl<'a> TCMP1_W<'a> {
248 #[doc = r"Sets the field bit"]
249 #[inline(always)]
250 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
251 #[doc = r"Clears the field bit"]
252 #[inline(always)]
253 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
254 #[doc = r"Writes raw bits to the field"]
255 #[inline(always)]
256 pub fn bit(self, value: bool) -> &'a mut W {
257 self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
258 self.w
259 }
260}
261#[doc = "Write proxy for field `TCMP2`"]
262pub struct TCMP2_W<'a> {
263 w: &'a mut W,
264}
265impl<'a> TCMP2_W<'a> {
266 #[doc = r"Sets the field bit"]
267 #[inline(always)]
268 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
269 #[doc = r"Clears the field bit"]
270 #[inline(always)]
271 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
272 #[doc = r"Writes raw bits to the field"]
273 #[inline(always)]
274 pub fn bit(self, value: bool) -> &'a mut W {
275 self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
276 self.w
277 }
278}
279impl W {
280 #[doc = "Bit 0 - Clear TXC Interrupt Flag"]
281 #[inline(always)]
282 pub fn txc(&mut self) -> TXC_W { TXC_W { w: self } }
283 #[doc = "Bit 3 - Clear RXFULL Interrupt Flag"]
284 #[inline(always)]
285 pub fn rxfull(&mut self) -> RXFULL_W { RXFULL_W { w: self } }
286 #[doc = "Bit 4 - Clear RXOF Interrupt Flag"]
287 #[inline(always)]
288 pub fn rxof(&mut self) -> RXOF_W { RXOF_W { w: self } }
289 #[doc = "Bit 5 - Clear RXUF Interrupt Flag"]
290 #[inline(always)]
291 pub fn rxuf(&mut self) -> RXUF_W { RXUF_W { w: self } }
292 #[doc = "Bit 6 - Clear TXOF Interrupt Flag"]
293 #[inline(always)]
294 pub fn txof(&mut self) -> TXOF_W { TXOF_W { w: self } }
295 #[doc = "Bit 7 - Clear TXUF Interrupt Flag"]
296 #[inline(always)]
297 pub fn txuf(&mut self) -> TXUF_W { TXUF_W { w: self } }
298 #[doc = "Bit 8 - Clear PERR Interrupt Flag"]
299 #[inline(always)]
300 pub fn perr(&mut self) -> PERR_W { PERR_W { w: self } }
301 #[doc = "Bit 9 - Clear FERR Interrupt Flag"]
302 #[inline(always)]
303 pub fn ferr(&mut self) -> FERR_W { FERR_W { w: self } }
304 #[doc = "Bit 10 - Clear MPAF Interrupt Flag"]
305 #[inline(always)]
306 pub fn mpaf(&mut self) -> MPAF_W { MPAF_W { w: self } }
307 #[doc = "Bit 11 - Clear SSM Interrupt Flag"]
308 #[inline(always)]
309 pub fn ssm(&mut self) -> SSM_W { SSM_W { w: self } }
310 #[doc = "Bit 12 - Clear CCF Interrupt Flag"]
311 #[inline(always)]
312 pub fn ccf(&mut self) -> CCF_W { CCF_W { w: self } }
313 #[doc = "Bit 13 - Clear TXIDLE Interrupt Flag"]
314 #[inline(always)]
315 pub fn txidle(&mut self) -> TXIDLE_W { TXIDLE_W { w: self } }
316 #[doc = "Bit 14 - Clear TCMP0 Interrupt Flag"]
317 #[inline(always)]
318 pub fn tcmp0(&mut self) -> TCMP0_W { TCMP0_W { w: self } }
319 #[doc = "Bit 15 - Clear TCMP1 Interrupt Flag"]
320 #[inline(always)]
321 pub fn tcmp1(&mut self) -> TCMP1_W { TCMP1_W { w: self } }
322 #[doc = "Bit 16 - Clear TCMP2 Interrupt Flag"]
323 #[inline(always)]
324 pub fn tcmp2(&mut self) -> TCMP2_W { TCMP2_W { w: self } }
325}