1#[doc = "Reader of register CR1"]
2pub type R = crate::R<u32, super::CR1>;
3#[doc = "Writer for register CR1"]
4pub type W = crate::W<u32, super::CR1>;
5#[doc = "Register CR1 `reset()`'s with value 0"]
6impl crate::ResetValue for super::CR1 {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0
11 }
12}
13#[doc = "Reader of field `RXFFIE`"]
14pub type RXFFIE_R = crate::R<bool, bool>;
15#[doc = "Write proxy for field `RXFFIE`"]
16pub struct RXFFIE_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> RXFFIE_W<'a> {
20 #[doc = r"Sets the field bit"]
21 #[inline(always)]
22 pub fn set_bit(self) -> &'a mut W {
23 self.bit(true)
24 }
25 #[doc = r"Clears the field bit"]
26 #[inline(always)]
27 pub fn clear_bit(self) -> &'a mut W {
28 self.bit(false)
29 }
30 #[doc = r"Writes raw bits to the field"]
31 #[inline(always)]
32 pub fn bit(self, value: bool) -> &'a mut W {
33 self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31);
34 self.w
35 }
36}
37#[doc = "Reader of field `TXFEIE`"]
38pub type TXFEIE_R = crate::R<bool, bool>;
39#[doc = "Write proxy for field `TXFEIE`"]
40pub struct TXFEIE_W<'a> {
41 w: &'a mut W,
42}
43impl<'a> TXFEIE_W<'a> {
44 #[doc = r"Sets the field bit"]
45 #[inline(always)]
46 pub fn set_bit(self) -> &'a mut W {
47 self.bit(true)
48 }
49 #[doc = r"Clears the field bit"]
50 #[inline(always)]
51 pub fn clear_bit(self) -> &'a mut W {
52 self.bit(false)
53 }
54 #[doc = r"Writes raw bits to the field"]
55 #[inline(always)]
56 pub fn bit(self, value: bool) -> &'a mut W {
57 self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30);
58 self.w
59 }
60}
61#[doc = "Reader of field `FIFOEN`"]
62pub type FIFOEN_R = crate::R<bool, bool>;
63#[doc = "Write proxy for field `FIFOEN`"]
64pub struct FIFOEN_W<'a> {
65 w: &'a mut W,
66}
67impl<'a> FIFOEN_W<'a> {
68 #[doc = r"Sets the field bit"]
69 #[inline(always)]
70 pub fn set_bit(self) -> &'a mut W {
71 self.bit(true)
72 }
73 #[doc = r"Clears the field bit"]
74 #[inline(always)]
75 pub fn clear_bit(self) -> &'a mut W {
76 self.bit(false)
77 }
78 #[doc = r"Writes raw bits to the field"]
79 #[inline(always)]
80 pub fn bit(self, value: bool) -> &'a mut W {
81 self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29);
82 self.w
83 }
84}
85#[doc = "Reader of field `M1`"]
86pub type M1_R = crate::R<bool, bool>;
87#[doc = "Write proxy for field `M1`"]
88pub struct M1_W<'a> {
89 w: &'a mut W,
90}
91impl<'a> M1_W<'a> {
92 #[doc = r"Sets the field bit"]
93 #[inline(always)]
94 pub fn set_bit(self) -> &'a mut W {
95 self.bit(true)
96 }
97 #[doc = r"Clears the field bit"]
98 #[inline(always)]
99 pub fn clear_bit(self) -> &'a mut W {
100 self.bit(false)
101 }
102 #[doc = r"Writes raw bits to the field"]
103 #[inline(always)]
104 pub fn bit(self, value: bool) -> &'a mut W {
105 self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28);
106 self.w
107 }
108}
109#[doc = "Reader of field `EOBIE`"]
110pub type EOBIE_R = crate::R<bool, bool>;
111#[doc = "Write proxy for field `EOBIE`"]
112pub struct EOBIE_W<'a> {
113 w: &'a mut W,
114}
115impl<'a> EOBIE_W<'a> {
116 #[doc = r"Sets the field bit"]
117 #[inline(always)]
118 pub fn set_bit(self) -> &'a mut W {
119 self.bit(true)
120 }
121 #[doc = r"Clears the field bit"]
122 #[inline(always)]
123 pub fn clear_bit(self) -> &'a mut W {
124 self.bit(false)
125 }
126 #[doc = r"Writes raw bits to the field"]
127 #[inline(always)]
128 pub fn bit(self, value: bool) -> &'a mut W {
129 self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27);
130 self.w
131 }
132}
133#[doc = "Reader of field `RTOIE`"]
134pub type RTOIE_R = crate::R<bool, bool>;
135#[doc = "Write proxy for field `RTOIE`"]
136pub struct RTOIE_W<'a> {
137 w: &'a mut W,
138}
139impl<'a> RTOIE_W<'a> {
140 #[doc = r"Sets the field bit"]
141 #[inline(always)]
142 pub fn set_bit(self) -> &'a mut W {
143 self.bit(true)
144 }
145 #[doc = r"Clears the field bit"]
146 #[inline(always)]
147 pub fn clear_bit(self) -> &'a mut W {
148 self.bit(false)
149 }
150 #[doc = r"Writes raw bits to the field"]
151 #[inline(always)]
152 pub fn bit(self, value: bool) -> &'a mut W {
153 self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26);
154 self.w
155 }
156}
157#[doc = "Reader of field `DEAT4`"]
158pub type DEAT4_R = crate::R<bool, bool>;
159#[doc = "Write proxy for field `DEAT4`"]
160pub struct DEAT4_W<'a> {
161 w: &'a mut W,
162}
163impl<'a> DEAT4_W<'a> {
164 #[doc = r"Sets the field bit"]
165 #[inline(always)]
166 pub fn set_bit(self) -> &'a mut W {
167 self.bit(true)
168 }
169 #[doc = r"Clears the field bit"]
170 #[inline(always)]
171 pub fn clear_bit(self) -> &'a mut W {
172 self.bit(false)
173 }
174 #[doc = r"Writes raw bits to the field"]
175 #[inline(always)]
176 pub fn bit(self, value: bool) -> &'a mut W {
177 self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25);
178 self.w
179 }
180}
181#[doc = "Reader of field `DEAT3`"]
182pub type DEAT3_R = crate::R<bool, bool>;
183#[doc = "Write proxy for field `DEAT3`"]
184pub struct DEAT3_W<'a> {
185 w: &'a mut W,
186}
187impl<'a> DEAT3_W<'a> {
188 #[doc = r"Sets the field bit"]
189 #[inline(always)]
190 pub fn set_bit(self) -> &'a mut W {
191 self.bit(true)
192 }
193 #[doc = r"Clears the field bit"]
194 #[inline(always)]
195 pub fn clear_bit(self) -> &'a mut W {
196 self.bit(false)
197 }
198 #[doc = r"Writes raw bits to the field"]
199 #[inline(always)]
200 pub fn bit(self, value: bool) -> &'a mut W {
201 self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24);
202 self.w
203 }
204}
205#[doc = "Reader of field `DEAT2`"]
206pub type DEAT2_R = crate::R<bool, bool>;
207#[doc = "Write proxy for field `DEAT2`"]
208pub struct DEAT2_W<'a> {
209 w: &'a mut W,
210}
211impl<'a> DEAT2_W<'a> {
212 #[doc = r"Sets the field bit"]
213 #[inline(always)]
214 pub fn set_bit(self) -> &'a mut W {
215 self.bit(true)
216 }
217 #[doc = r"Clears the field bit"]
218 #[inline(always)]
219 pub fn clear_bit(self) -> &'a mut W {
220 self.bit(false)
221 }
222 #[doc = r"Writes raw bits to the field"]
223 #[inline(always)]
224 pub fn bit(self, value: bool) -> &'a mut W {
225 self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23);
226 self.w
227 }
228}
229#[doc = "Reader of field `DEAT1`"]
230pub type DEAT1_R = crate::R<bool, bool>;
231#[doc = "Write proxy for field `DEAT1`"]
232pub struct DEAT1_W<'a> {
233 w: &'a mut W,
234}
235impl<'a> DEAT1_W<'a> {
236 #[doc = r"Sets the field bit"]
237 #[inline(always)]
238 pub fn set_bit(self) -> &'a mut W {
239 self.bit(true)
240 }
241 #[doc = r"Clears the field bit"]
242 #[inline(always)]
243 pub fn clear_bit(self) -> &'a mut W {
244 self.bit(false)
245 }
246 #[doc = r"Writes raw bits to the field"]
247 #[inline(always)]
248 pub fn bit(self, value: bool) -> &'a mut W {
249 self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22);
250 self.w
251 }
252}
253#[doc = "Reader of field `DEAT0`"]
254pub type DEAT0_R = crate::R<bool, bool>;
255#[doc = "Write proxy for field `DEAT0`"]
256pub struct DEAT0_W<'a> {
257 w: &'a mut W,
258}
259impl<'a> DEAT0_W<'a> {
260 #[doc = r"Sets the field bit"]
261 #[inline(always)]
262 pub fn set_bit(self) -> &'a mut W {
263 self.bit(true)
264 }
265 #[doc = r"Clears the field bit"]
266 #[inline(always)]
267 pub fn clear_bit(self) -> &'a mut W {
268 self.bit(false)
269 }
270 #[doc = r"Writes raw bits to the field"]
271 #[inline(always)]
272 pub fn bit(self, value: bool) -> &'a mut W {
273 self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21);
274 self.w
275 }
276}
277#[doc = "Reader of field `DEDT4`"]
278pub type DEDT4_R = crate::R<bool, bool>;
279#[doc = "Write proxy for field `DEDT4`"]
280pub struct DEDT4_W<'a> {
281 w: &'a mut W,
282}
283impl<'a> DEDT4_W<'a> {
284 #[doc = r"Sets the field bit"]
285 #[inline(always)]
286 pub fn set_bit(self) -> &'a mut W {
287 self.bit(true)
288 }
289 #[doc = r"Clears the field bit"]
290 #[inline(always)]
291 pub fn clear_bit(self) -> &'a mut W {
292 self.bit(false)
293 }
294 #[doc = r"Writes raw bits to the field"]
295 #[inline(always)]
296 pub fn bit(self, value: bool) -> &'a mut W {
297 self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20);
298 self.w
299 }
300}
301#[doc = "Reader of field `DEDT3`"]
302pub type DEDT3_R = crate::R<bool, bool>;
303#[doc = "Write proxy for field `DEDT3`"]
304pub struct DEDT3_W<'a> {
305 w: &'a mut W,
306}
307impl<'a> DEDT3_W<'a> {
308 #[doc = r"Sets the field bit"]
309 #[inline(always)]
310 pub fn set_bit(self) -> &'a mut W {
311 self.bit(true)
312 }
313 #[doc = r"Clears the field bit"]
314 #[inline(always)]
315 pub fn clear_bit(self) -> &'a mut W {
316 self.bit(false)
317 }
318 #[doc = r"Writes raw bits to the field"]
319 #[inline(always)]
320 pub fn bit(self, value: bool) -> &'a mut W {
321 self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19);
322 self.w
323 }
324}
325#[doc = "Reader of field `DEDT2`"]
326pub type DEDT2_R = crate::R<bool, bool>;
327#[doc = "Write proxy for field `DEDT2`"]
328pub struct DEDT2_W<'a> {
329 w: &'a mut W,
330}
331impl<'a> DEDT2_W<'a> {
332 #[doc = r"Sets the field bit"]
333 #[inline(always)]
334 pub fn set_bit(self) -> &'a mut W {
335 self.bit(true)
336 }
337 #[doc = r"Clears the field bit"]
338 #[inline(always)]
339 pub fn clear_bit(self) -> &'a mut W {
340 self.bit(false)
341 }
342 #[doc = r"Writes raw bits to the field"]
343 #[inline(always)]
344 pub fn bit(self, value: bool) -> &'a mut W {
345 self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
346 self.w
347 }
348}
349#[doc = "Reader of field `DEDT1`"]
350pub type DEDT1_R = crate::R<bool, bool>;
351#[doc = "Write proxy for field `DEDT1`"]
352pub struct DEDT1_W<'a> {
353 w: &'a mut W,
354}
355impl<'a> DEDT1_W<'a> {
356 #[doc = r"Sets the field bit"]
357 #[inline(always)]
358 pub fn set_bit(self) -> &'a mut W {
359 self.bit(true)
360 }
361 #[doc = r"Clears the field bit"]
362 #[inline(always)]
363 pub fn clear_bit(self) -> &'a mut W {
364 self.bit(false)
365 }
366 #[doc = r"Writes raw bits to the field"]
367 #[inline(always)]
368 pub fn bit(self, value: bool) -> &'a mut W {
369 self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
370 self.w
371 }
372}
373#[doc = "Reader of field `DEDT0`"]
374pub type DEDT0_R = crate::R<bool, bool>;
375#[doc = "Write proxy for field `DEDT0`"]
376pub struct DEDT0_W<'a> {
377 w: &'a mut W,
378}
379impl<'a> DEDT0_W<'a> {
380 #[doc = r"Sets the field bit"]
381 #[inline(always)]
382 pub fn set_bit(self) -> &'a mut W {
383 self.bit(true)
384 }
385 #[doc = r"Clears the field bit"]
386 #[inline(always)]
387 pub fn clear_bit(self) -> &'a mut W {
388 self.bit(false)
389 }
390 #[doc = r"Writes raw bits to the field"]
391 #[inline(always)]
392 pub fn bit(self, value: bool) -> &'a mut W {
393 self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
394 self.w
395 }
396}
397#[doc = "Reader of field `OVER8`"]
398pub type OVER8_R = crate::R<bool, bool>;
399#[doc = "Write proxy for field `OVER8`"]
400pub struct OVER8_W<'a> {
401 w: &'a mut W,
402}
403impl<'a> OVER8_W<'a> {
404 #[doc = r"Sets the field bit"]
405 #[inline(always)]
406 pub fn set_bit(self) -> &'a mut W {
407 self.bit(true)
408 }
409 #[doc = r"Clears the field bit"]
410 #[inline(always)]
411 pub fn clear_bit(self) -> &'a mut W {
412 self.bit(false)
413 }
414 #[doc = r"Writes raw bits to the field"]
415 #[inline(always)]
416 pub fn bit(self, value: bool) -> &'a mut W {
417 self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
418 self.w
419 }
420}
421#[doc = "Reader of field `CMIE`"]
422pub type CMIE_R = crate::R<bool, bool>;
423#[doc = "Write proxy for field `CMIE`"]
424pub struct CMIE_W<'a> {
425 w: &'a mut W,
426}
427impl<'a> CMIE_W<'a> {
428 #[doc = r"Sets the field bit"]
429 #[inline(always)]
430 pub fn set_bit(self) -> &'a mut W {
431 self.bit(true)
432 }
433 #[doc = r"Clears the field bit"]
434 #[inline(always)]
435 pub fn clear_bit(self) -> &'a mut W {
436 self.bit(false)
437 }
438 #[doc = r"Writes raw bits to the field"]
439 #[inline(always)]
440 pub fn bit(self, value: bool) -> &'a mut W {
441 self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
442 self.w
443 }
444}
445#[doc = "Reader of field `MME`"]
446pub type MME_R = crate::R<bool, bool>;
447#[doc = "Write proxy for field `MME`"]
448pub struct MME_W<'a> {
449 w: &'a mut W,
450}
451impl<'a> MME_W<'a> {
452 #[doc = r"Sets the field bit"]
453 #[inline(always)]
454 pub fn set_bit(self) -> &'a mut W {
455 self.bit(true)
456 }
457 #[doc = r"Clears the field bit"]
458 #[inline(always)]
459 pub fn clear_bit(self) -> &'a mut W {
460 self.bit(false)
461 }
462 #[doc = r"Writes raw bits to the field"]
463 #[inline(always)]
464 pub fn bit(self, value: bool) -> &'a mut W {
465 self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
466 self.w
467 }
468}
469#[doc = "Reader of field `M0`"]
470pub type M0_R = crate::R<bool, bool>;
471#[doc = "Write proxy for field `M0`"]
472pub struct M0_W<'a> {
473 w: &'a mut W,
474}
475impl<'a> M0_W<'a> {
476 #[doc = r"Sets the field bit"]
477 #[inline(always)]
478 pub fn set_bit(self) -> &'a mut W {
479 self.bit(true)
480 }
481 #[doc = r"Clears the field bit"]
482 #[inline(always)]
483 pub fn clear_bit(self) -> &'a mut W {
484 self.bit(false)
485 }
486 #[doc = r"Writes raw bits to the field"]
487 #[inline(always)]
488 pub fn bit(self, value: bool) -> &'a mut W {
489 self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
490 self.w
491 }
492}
493#[doc = "Reader of field `WAKE`"]
494pub type WAKE_R = crate::R<bool, bool>;
495#[doc = "Write proxy for field `WAKE`"]
496pub struct WAKE_W<'a> {
497 w: &'a mut W,
498}
499impl<'a> WAKE_W<'a> {
500 #[doc = r"Sets the field bit"]
501 #[inline(always)]
502 pub fn set_bit(self) -> &'a mut W {
503 self.bit(true)
504 }
505 #[doc = r"Clears the field bit"]
506 #[inline(always)]
507 pub fn clear_bit(self) -> &'a mut W {
508 self.bit(false)
509 }
510 #[doc = r"Writes raw bits to the field"]
511 #[inline(always)]
512 pub fn bit(self, value: bool) -> &'a mut W {
513 self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
514 self.w
515 }
516}
517#[doc = "Reader of field `PCE`"]
518pub type PCE_R = crate::R<bool, bool>;
519#[doc = "Write proxy for field `PCE`"]
520pub struct PCE_W<'a> {
521 w: &'a mut W,
522}
523impl<'a> PCE_W<'a> {
524 #[doc = r"Sets the field bit"]
525 #[inline(always)]
526 pub fn set_bit(self) -> &'a mut W {
527 self.bit(true)
528 }
529 #[doc = r"Clears the field bit"]
530 #[inline(always)]
531 pub fn clear_bit(self) -> &'a mut W {
532 self.bit(false)
533 }
534 #[doc = r"Writes raw bits to the field"]
535 #[inline(always)]
536 pub fn bit(self, value: bool) -> &'a mut W {
537 self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
538 self.w
539 }
540}
541#[doc = "Reader of field `PS`"]
542pub type PS_R = crate::R<bool, bool>;
543#[doc = "Write proxy for field `PS`"]
544pub struct PS_W<'a> {
545 w: &'a mut W,
546}
547impl<'a> PS_W<'a> {
548 #[doc = r"Sets the field bit"]
549 #[inline(always)]
550 pub fn set_bit(self) -> &'a mut W {
551 self.bit(true)
552 }
553 #[doc = r"Clears the field bit"]
554 #[inline(always)]
555 pub fn clear_bit(self) -> &'a mut W {
556 self.bit(false)
557 }
558 #[doc = r"Writes raw bits to the field"]
559 #[inline(always)]
560 pub fn bit(self, value: bool) -> &'a mut W {
561 self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
562 self.w
563 }
564}
565#[doc = "Reader of field `PEIE`"]
566pub type PEIE_R = crate::R<bool, bool>;
567#[doc = "Write proxy for field `PEIE`"]
568pub struct PEIE_W<'a> {
569 w: &'a mut W,
570}
571impl<'a> PEIE_W<'a> {
572 #[doc = r"Sets the field bit"]
573 #[inline(always)]
574 pub fn set_bit(self) -> &'a mut W {
575 self.bit(true)
576 }
577 #[doc = r"Clears the field bit"]
578 #[inline(always)]
579 pub fn clear_bit(self) -> &'a mut W {
580 self.bit(false)
581 }
582 #[doc = r"Writes raw bits to the field"]
583 #[inline(always)]
584 pub fn bit(self, value: bool) -> &'a mut W {
585 self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
586 self.w
587 }
588}
589#[doc = "Reader of field `TXEIE`"]
590pub type TXEIE_R = crate::R<bool, bool>;
591#[doc = "Write proxy for field `TXEIE`"]
592pub struct TXEIE_W<'a> {
593 w: &'a mut W,
594}
595impl<'a> TXEIE_W<'a> {
596 #[doc = r"Sets the field bit"]
597 #[inline(always)]
598 pub fn set_bit(self) -> &'a mut W {
599 self.bit(true)
600 }
601 #[doc = r"Clears the field bit"]
602 #[inline(always)]
603 pub fn clear_bit(self) -> &'a mut W {
604 self.bit(false)
605 }
606 #[doc = r"Writes raw bits to the field"]
607 #[inline(always)]
608 pub fn bit(self, value: bool) -> &'a mut W {
609 self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
610 self.w
611 }
612}
613#[doc = "Reader of field `TCIE`"]
614pub type TCIE_R = crate::R<bool, bool>;
615#[doc = "Write proxy for field `TCIE`"]
616pub struct TCIE_W<'a> {
617 w: &'a mut W,
618}
619impl<'a> TCIE_W<'a> {
620 #[doc = r"Sets the field bit"]
621 #[inline(always)]
622 pub fn set_bit(self) -> &'a mut W {
623 self.bit(true)
624 }
625 #[doc = r"Clears the field bit"]
626 #[inline(always)]
627 pub fn clear_bit(self) -> &'a mut W {
628 self.bit(false)
629 }
630 #[doc = r"Writes raw bits to the field"]
631 #[inline(always)]
632 pub fn bit(self, value: bool) -> &'a mut W {
633 self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
634 self.w
635 }
636}
637#[doc = "Reader of field `RXNEIE`"]
638pub type RXNEIE_R = crate::R<bool, bool>;
639#[doc = "Write proxy for field `RXNEIE`"]
640pub struct RXNEIE_W<'a> {
641 w: &'a mut W,
642}
643impl<'a> RXNEIE_W<'a> {
644 #[doc = r"Sets the field bit"]
645 #[inline(always)]
646 pub fn set_bit(self) -> &'a mut W {
647 self.bit(true)
648 }
649 #[doc = r"Clears the field bit"]
650 #[inline(always)]
651 pub fn clear_bit(self) -> &'a mut W {
652 self.bit(false)
653 }
654 #[doc = r"Writes raw bits to the field"]
655 #[inline(always)]
656 pub fn bit(self, value: bool) -> &'a mut W {
657 self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
658 self.w
659 }
660}
661#[doc = "Reader of field `IDLEIE`"]
662pub type IDLEIE_R = crate::R<bool, bool>;
663#[doc = "Write proxy for field `IDLEIE`"]
664pub struct IDLEIE_W<'a> {
665 w: &'a mut W,
666}
667impl<'a> IDLEIE_W<'a> {
668 #[doc = r"Sets the field bit"]
669 #[inline(always)]
670 pub fn set_bit(self) -> &'a mut W {
671 self.bit(true)
672 }
673 #[doc = r"Clears the field bit"]
674 #[inline(always)]
675 pub fn clear_bit(self) -> &'a mut W {
676 self.bit(false)
677 }
678 #[doc = r"Writes raw bits to the field"]
679 #[inline(always)]
680 pub fn bit(self, value: bool) -> &'a mut W {
681 self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
682 self.w
683 }
684}
685#[doc = "Reader of field `TE`"]
686pub type TE_R = crate::R<bool, bool>;
687#[doc = "Write proxy for field `TE`"]
688pub struct TE_W<'a> {
689 w: &'a mut W,
690}
691impl<'a> TE_W<'a> {
692 #[doc = r"Sets the field bit"]
693 #[inline(always)]
694 pub fn set_bit(self) -> &'a mut W {
695 self.bit(true)
696 }
697 #[doc = r"Clears the field bit"]
698 #[inline(always)]
699 pub fn clear_bit(self) -> &'a mut W {
700 self.bit(false)
701 }
702 #[doc = r"Writes raw bits to the field"]
703 #[inline(always)]
704 pub fn bit(self, value: bool) -> &'a mut W {
705 self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
706 self.w
707 }
708}
709#[doc = "Reader of field `RE`"]
710pub type RE_R = crate::R<bool, bool>;
711#[doc = "Write proxy for field `RE`"]
712pub struct RE_W<'a> {
713 w: &'a mut W,
714}
715impl<'a> RE_W<'a> {
716 #[doc = r"Sets the field bit"]
717 #[inline(always)]
718 pub fn set_bit(self) -> &'a mut W {
719 self.bit(true)
720 }
721 #[doc = r"Clears the field bit"]
722 #[inline(always)]
723 pub fn clear_bit(self) -> &'a mut W {
724 self.bit(false)
725 }
726 #[doc = r"Writes raw bits to the field"]
727 #[inline(always)]
728 pub fn bit(self, value: bool) -> &'a mut W {
729 self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
730 self.w
731 }
732}
733#[doc = "Reader of field `UESM`"]
734pub type UESM_R = crate::R<bool, bool>;
735#[doc = "Write proxy for field `UESM`"]
736pub struct UESM_W<'a> {
737 w: &'a mut W,
738}
739impl<'a> UESM_W<'a> {
740 #[doc = r"Sets the field bit"]
741 #[inline(always)]
742 pub fn set_bit(self) -> &'a mut W {
743 self.bit(true)
744 }
745 #[doc = r"Clears the field bit"]
746 #[inline(always)]
747 pub fn clear_bit(self) -> &'a mut W {
748 self.bit(false)
749 }
750 #[doc = r"Writes raw bits to the field"]
751 #[inline(always)]
752 pub fn bit(self, value: bool) -> &'a mut W {
753 self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
754 self.w
755 }
756}
757#[doc = "Reader of field `UE`"]
758pub type UE_R = crate::R<bool, bool>;
759#[doc = "Write proxy for field `UE`"]
760pub struct UE_W<'a> {
761 w: &'a mut W,
762}
763impl<'a> UE_W<'a> {
764 #[doc = r"Sets the field bit"]
765 #[inline(always)]
766 pub fn set_bit(self) -> &'a mut W {
767 self.bit(true)
768 }
769 #[doc = r"Clears the field bit"]
770 #[inline(always)]
771 pub fn clear_bit(self) -> &'a mut W {
772 self.bit(false)
773 }
774 #[doc = r"Writes raw bits to the field"]
775 #[inline(always)]
776 pub fn bit(self, value: bool) -> &'a mut W {
777 self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
778 self.w
779 }
780}
781impl R {
782 #[doc = "Bit 31 - RXFIFO Full interrupt enable"]
783 #[inline(always)]
784 pub fn rxffie(&self) -> RXFFIE_R {
785 RXFFIE_R::new(((self.bits >> 31) & 0x01) != 0)
786 }
787 #[doc = "Bit 30 - TXFIFO empty interrupt enable"]
788 #[inline(always)]
789 pub fn txfeie(&self) -> TXFEIE_R {
790 TXFEIE_R::new(((self.bits >> 30) & 0x01) != 0)
791 }
792 #[doc = "Bit 29 - FIFO mode enable"]
793 #[inline(always)]
794 pub fn fifoen(&self) -> FIFOEN_R {
795 FIFOEN_R::new(((self.bits >> 29) & 0x01) != 0)
796 }
797 #[doc = "Bit 28 - Word length"]
798 #[inline(always)]
799 pub fn m1(&self) -> M1_R {
800 M1_R::new(((self.bits >> 28) & 0x01) != 0)
801 }
802 #[doc = "Bit 27 - End of Block interrupt enable"]
803 #[inline(always)]
804 pub fn eobie(&self) -> EOBIE_R {
805 EOBIE_R::new(((self.bits >> 27) & 0x01) != 0)
806 }
807 #[doc = "Bit 26 - Receiver timeout interrupt enable"]
808 #[inline(always)]
809 pub fn rtoie(&self) -> RTOIE_R {
810 RTOIE_R::new(((self.bits >> 26) & 0x01) != 0)
811 }
812 #[doc = "Bit 25 - Driver Enable assertion time"]
813 #[inline(always)]
814 pub fn deat4(&self) -> DEAT4_R {
815 DEAT4_R::new(((self.bits >> 25) & 0x01) != 0)
816 }
817 #[doc = "Bit 24 - DEAT3"]
818 #[inline(always)]
819 pub fn deat3(&self) -> DEAT3_R {
820 DEAT3_R::new(((self.bits >> 24) & 0x01) != 0)
821 }
822 #[doc = "Bit 23 - DEAT2"]
823 #[inline(always)]
824 pub fn deat2(&self) -> DEAT2_R {
825 DEAT2_R::new(((self.bits >> 23) & 0x01) != 0)
826 }
827 #[doc = "Bit 22 - DEAT1"]
828 #[inline(always)]
829 pub fn deat1(&self) -> DEAT1_R {
830 DEAT1_R::new(((self.bits >> 22) & 0x01) != 0)
831 }
832 #[doc = "Bit 21 - DEAT0"]
833 #[inline(always)]
834 pub fn deat0(&self) -> DEAT0_R {
835 DEAT0_R::new(((self.bits >> 21) & 0x01) != 0)
836 }
837 #[doc = "Bit 20 - Driver Enable de-assertion time"]
838 #[inline(always)]
839 pub fn dedt4(&self) -> DEDT4_R {
840 DEDT4_R::new(((self.bits >> 20) & 0x01) != 0)
841 }
842 #[doc = "Bit 19 - DEDT3"]
843 #[inline(always)]
844 pub fn dedt3(&self) -> DEDT3_R {
845 DEDT3_R::new(((self.bits >> 19) & 0x01) != 0)
846 }
847 #[doc = "Bit 18 - DEDT2"]
848 #[inline(always)]
849 pub fn dedt2(&self) -> DEDT2_R {
850 DEDT2_R::new(((self.bits >> 18) & 0x01) != 0)
851 }
852 #[doc = "Bit 17 - DEDT1"]
853 #[inline(always)]
854 pub fn dedt1(&self) -> DEDT1_R {
855 DEDT1_R::new(((self.bits >> 17) & 0x01) != 0)
856 }
857 #[doc = "Bit 16 - DEDT0"]
858 #[inline(always)]
859 pub fn dedt0(&self) -> DEDT0_R {
860 DEDT0_R::new(((self.bits >> 16) & 0x01) != 0)
861 }
862 #[doc = "Bit 15 - Oversampling mode"]
863 #[inline(always)]
864 pub fn over8(&self) -> OVER8_R {
865 OVER8_R::new(((self.bits >> 15) & 0x01) != 0)
866 }
867 #[doc = "Bit 14 - Character match interrupt enable"]
868 #[inline(always)]
869 pub fn cmie(&self) -> CMIE_R {
870 CMIE_R::new(((self.bits >> 14) & 0x01) != 0)
871 }
872 #[doc = "Bit 13 - Mute mode enable"]
873 #[inline(always)]
874 pub fn mme(&self) -> MME_R {
875 MME_R::new(((self.bits >> 13) & 0x01) != 0)
876 }
877 #[doc = "Bit 12 - Word length"]
878 #[inline(always)]
879 pub fn m0(&self) -> M0_R {
880 M0_R::new(((self.bits >> 12) & 0x01) != 0)
881 }
882 #[doc = "Bit 11 - Receiver wakeup method"]
883 #[inline(always)]
884 pub fn wake(&self) -> WAKE_R {
885 WAKE_R::new(((self.bits >> 11) & 0x01) != 0)
886 }
887 #[doc = "Bit 10 - Parity control enable"]
888 #[inline(always)]
889 pub fn pce(&self) -> PCE_R {
890 PCE_R::new(((self.bits >> 10) & 0x01) != 0)
891 }
892 #[doc = "Bit 9 - Parity selection"]
893 #[inline(always)]
894 pub fn ps(&self) -> PS_R {
895 PS_R::new(((self.bits >> 9) & 0x01) != 0)
896 }
897 #[doc = "Bit 8 - PE interrupt enable"]
898 #[inline(always)]
899 pub fn peie(&self) -> PEIE_R {
900 PEIE_R::new(((self.bits >> 8) & 0x01) != 0)
901 }
902 #[doc = "Bit 7 - interrupt enable"]
903 #[inline(always)]
904 pub fn txeie(&self) -> TXEIE_R {
905 TXEIE_R::new(((self.bits >> 7) & 0x01) != 0)
906 }
907 #[doc = "Bit 6 - Transmission complete interrupt enable"]
908 #[inline(always)]
909 pub fn tcie(&self) -> TCIE_R {
910 TCIE_R::new(((self.bits >> 6) & 0x01) != 0)
911 }
912 #[doc = "Bit 5 - RXNE interrupt enable"]
913 #[inline(always)]
914 pub fn rxneie(&self) -> RXNEIE_R {
915 RXNEIE_R::new(((self.bits >> 5) & 0x01) != 0)
916 }
917 #[doc = "Bit 4 - IDLE interrupt enable"]
918 #[inline(always)]
919 pub fn idleie(&self) -> IDLEIE_R {
920 IDLEIE_R::new(((self.bits >> 4) & 0x01) != 0)
921 }
922 #[doc = "Bit 3 - Transmitter enable"]
923 #[inline(always)]
924 pub fn te(&self) -> TE_R {
925 TE_R::new(((self.bits >> 3) & 0x01) != 0)
926 }
927 #[doc = "Bit 2 - Receiver enable"]
928 #[inline(always)]
929 pub fn re(&self) -> RE_R {
930 RE_R::new(((self.bits >> 2) & 0x01) != 0)
931 }
932 #[doc = "Bit 1 - USART enable in Stop mode"]
933 #[inline(always)]
934 pub fn uesm(&self) -> UESM_R {
935 UESM_R::new(((self.bits >> 1) & 0x01) != 0)
936 }
937 #[doc = "Bit 0 - USART enable"]
938 #[inline(always)]
939 pub fn ue(&self) -> UE_R {
940 UE_R::new((self.bits & 0x01) != 0)
941 }
942}
943impl W {
944 #[doc = "Bit 31 - RXFIFO Full interrupt enable"]
945 #[inline(always)]
946 pub fn rxffie(&mut self) -> RXFFIE_W {
947 RXFFIE_W { w: self }
948 }
949 #[doc = "Bit 30 - TXFIFO empty interrupt enable"]
950 #[inline(always)]
951 pub fn txfeie(&mut self) -> TXFEIE_W {
952 TXFEIE_W { w: self }
953 }
954 #[doc = "Bit 29 - FIFO mode enable"]
955 #[inline(always)]
956 pub fn fifoen(&mut self) -> FIFOEN_W {
957 FIFOEN_W { w: self }
958 }
959 #[doc = "Bit 28 - Word length"]
960 #[inline(always)]
961 pub fn m1(&mut self) -> M1_W {
962 M1_W { w: self }
963 }
964 #[doc = "Bit 27 - End of Block interrupt enable"]
965 #[inline(always)]
966 pub fn eobie(&mut self) -> EOBIE_W {
967 EOBIE_W { w: self }
968 }
969 #[doc = "Bit 26 - Receiver timeout interrupt enable"]
970 #[inline(always)]
971 pub fn rtoie(&mut self) -> RTOIE_W {
972 RTOIE_W { w: self }
973 }
974 #[doc = "Bit 25 - Driver Enable assertion time"]
975 #[inline(always)]
976 pub fn deat4(&mut self) -> DEAT4_W {
977 DEAT4_W { w: self }
978 }
979 #[doc = "Bit 24 - DEAT3"]
980 #[inline(always)]
981 pub fn deat3(&mut self) -> DEAT3_W {
982 DEAT3_W { w: self }
983 }
984 #[doc = "Bit 23 - DEAT2"]
985 #[inline(always)]
986 pub fn deat2(&mut self) -> DEAT2_W {
987 DEAT2_W { w: self }
988 }
989 #[doc = "Bit 22 - DEAT1"]
990 #[inline(always)]
991 pub fn deat1(&mut self) -> DEAT1_W {
992 DEAT1_W { w: self }
993 }
994 #[doc = "Bit 21 - DEAT0"]
995 #[inline(always)]
996 pub fn deat0(&mut self) -> DEAT0_W {
997 DEAT0_W { w: self }
998 }
999 #[doc = "Bit 20 - Driver Enable de-assertion time"]
1000 #[inline(always)]
1001 pub fn dedt4(&mut self) -> DEDT4_W {
1002 DEDT4_W { w: self }
1003 }
1004 #[doc = "Bit 19 - DEDT3"]
1005 #[inline(always)]
1006 pub fn dedt3(&mut self) -> DEDT3_W {
1007 DEDT3_W { w: self }
1008 }
1009 #[doc = "Bit 18 - DEDT2"]
1010 #[inline(always)]
1011 pub fn dedt2(&mut self) -> DEDT2_W {
1012 DEDT2_W { w: self }
1013 }
1014 #[doc = "Bit 17 - DEDT1"]
1015 #[inline(always)]
1016 pub fn dedt1(&mut self) -> DEDT1_W {
1017 DEDT1_W { w: self }
1018 }
1019 #[doc = "Bit 16 - DEDT0"]
1020 #[inline(always)]
1021 pub fn dedt0(&mut self) -> DEDT0_W {
1022 DEDT0_W { w: self }
1023 }
1024 #[doc = "Bit 15 - Oversampling mode"]
1025 #[inline(always)]
1026 pub fn over8(&mut self) -> OVER8_W {
1027 OVER8_W { w: self }
1028 }
1029 #[doc = "Bit 14 - Character match interrupt enable"]
1030 #[inline(always)]
1031 pub fn cmie(&mut self) -> CMIE_W {
1032 CMIE_W { w: self }
1033 }
1034 #[doc = "Bit 13 - Mute mode enable"]
1035 #[inline(always)]
1036 pub fn mme(&mut self) -> MME_W {
1037 MME_W { w: self }
1038 }
1039 #[doc = "Bit 12 - Word length"]
1040 #[inline(always)]
1041 pub fn m0(&mut self) -> M0_W {
1042 M0_W { w: self }
1043 }
1044 #[doc = "Bit 11 - Receiver wakeup method"]
1045 #[inline(always)]
1046 pub fn wake(&mut self) -> WAKE_W {
1047 WAKE_W { w: self }
1048 }
1049 #[doc = "Bit 10 - Parity control enable"]
1050 #[inline(always)]
1051 pub fn pce(&mut self) -> PCE_W {
1052 PCE_W { w: self }
1053 }
1054 #[doc = "Bit 9 - Parity selection"]
1055 #[inline(always)]
1056 pub fn ps(&mut self) -> PS_W {
1057 PS_W { w: self }
1058 }
1059 #[doc = "Bit 8 - PE interrupt enable"]
1060 #[inline(always)]
1061 pub fn peie(&mut self) -> PEIE_W {
1062 PEIE_W { w: self }
1063 }
1064 #[doc = "Bit 7 - interrupt enable"]
1065 #[inline(always)]
1066 pub fn txeie(&mut self) -> TXEIE_W {
1067 TXEIE_W { w: self }
1068 }
1069 #[doc = "Bit 6 - Transmission complete interrupt enable"]
1070 #[inline(always)]
1071 pub fn tcie(&mut self) -> TCIE_W {
1072 TCIE_W { w: self }
1073 }
1074 #[doc = "Bit 5 - RXNE interrupt enable"]
1075 #[inline(always)]
1076 pub fn rxneie(&mut self) -> RXNEIE_W {
1077 RXNEIE_W { w: self }
1078 }
1079 #[doc = "Bit 4 - IDLE interrupt enable"]
1080 #[inline(always)]
1081 pub fn idleie(&mut self) -> IDLEIE_W {
1082 IDLEIE_W { w: self }
1083 }
1084 #[doc = "Bit 3 - Transmitter enable"]
1085 #[inline(always)]
1086 pub fn te(&mut self) -> TE_W {
1087 TE_W { w: self }
1088 }
1089 #[doc = "Bit 2 - Receiver enable"]
1090 #[inline(always)]
1091 pub fn re(&mut self) -> RE_W {
1092 RE_W { w: self }
1093 }
1094 #[doc = "Bit 1 - USART enable in Stop mode"]
1095 #[inline(always)]
1096 pub fn uesm(&mut self) -> UESM_W {
1097 UESM_W { w: self }
1098 }
1099 #[doc = "Bit 0 - USART enable"]
1100 #[inline(always)]
1101 pub fn ue(&mut self) -> UE_W {
1102 UE_W { w: self }
1103 }
1104}