stm32f429/uart4/
cr1.rs

1#[doc = r" Value read from the register"]
2pub struct R {
3    bits: u32,
4}
5#[doc = r" Value to write to the register"]
6pub struct W {
7    bits: u32,
8}
9impl super::CR1 {
10    #[doc = r" Modifies the contents of the register"]
11    #[inline]
12    pub fn modify<F>(&self, f: F)
13    where
14        for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
15    {
16        let bits = self.register.get();
17        let r = R { bits: bits };
18        let mut w = W { bits: bits };
19        f(&r, &mut w);
20        self.register.set(w.bits);
21    }
22    #[doc = r" Reads the contents of the register"]
23    #[inline]
24    pub fn read(&self) -> R {
25        R {
26            bits: self.register.get(),
27        }
28    }
29    #[doc = r" Writes to the register"]
30    #[inline]
31    pub fn write<F>(&self, f: F)
32    where
33        F: FnOnce(&mut W) -> &mut W,
34    {
35        let mut w = W::reset_value();
36        f(&mut w);
37        self.register.set(w.bits);
38    }
39    #[doc = r" Writes the reset value to the register"]
40    #[inline]
41    pub fn reset(&self) {
42        self.write(|w| w)
43    }
44}
45#[doc = r" Value of the field"]
46pub struct OVER8R {
47    bits: bool,
48}
49impl OVER8R {
50    #[doc = r" Value of the field as raw bits"]
51    #[inline]
52    pub fn bit(&self) -> bool {
53        self.bits
54    }
55    #[doc = r" Returns `true` if the bit is clear (0)"]
56    #[inline]
57    pub fn bit_is_clear(&self) -> bool {
58        !self.bit()
59    }
60    #[doc = r" Returns `true` if the bit is set (1)"]
61    #[inline]
62    pub fn bit_is_set(&self) -> bool {
63        self.bit()
64    }
65}
66#[doc = r" Value of the field"]
67pub struct UER {
68    bits: bool,
69}
70impl UER {
71    #[doc = r" Value of the field as raw bits"]
72    #[inline]
73    pub fn bit(&self) -> bool {
74        self.bits
75    }
76    #[doc = r" Returns `true` if the bit is clear (0)"]
77    #[inline]
78    pub fn bit_is_clear(&self) -> bool {
79        !self.bit()
80    }
81    #[doc = r" Returns `true` if the bit is set (1)"]
82    #[inline]
83    pub fn bit_is_set(&self) -> bool {
84        self.bit()
85    }
86}
87#[doc = r" Value of the field"]
88pub struct MR {
89    bits: bool,
90}
91impl MR {
92    #[doc = r" Value of the field as raw bits"]
93    #[inline]
94    pub fn bit(&self) -> bool {
95        self.bits
96    }
97    #[doc = r" Returns `true` if the bit is clear (0)"]
98    #[inline]
99    pub fn bit_is_clear(&self) -> bool {
100        !self.bit()
101    }
102    #[doc = r" Returns `true` if the bit is set (1)"]
103    #[inline]
104    pub fn bit_is_set(&self) -> bool {
105        self.bit()
106    }
107}
108#[doc = r" Value of the field"]
109pub struct WAKER {
110    bits: bool,
111}
112impl WAKER {
113    #[doc = r" Value of the field as raw bits"]
114    #[inline]
115    pub fn bit(&self) -> bool {
116        self.bits
117    }
118    #[doc = r" Returns `true` if the bit is clear (0)"]
119    #[inline]
120    pub fn bit_is_clear(&self) -> bool {
121        !self.bit()
122    }
123    #[doc = r" Returns `true` if the bit is set (1)"]
124    #[inline]
125    pub fn bit_is_set(&self) -> bool {
126        self.bit()
127    }
128}
129#[doc = r" Value of the field"]
130pub struct PCER {
131    bits: bool,
132}
133impl PCER {
134    #[doc = r" Value of the field as raw bits"]
135    #[inline]
136    pub fn bit(&self) -> bool {
137        self.bits
138    }
139    #[doc = r" Returns `true` if the bit is clear (0)"]
140    #[inline]
141    pub fn bit_is_clear(&self) -> bool {
142        !self.bit()
143    }
144    #[doc = r" Returns `true` if the bit is set (1)"]
145    #[inline]
146    pub fn bit_is_set(&self) -> bool {
147        self.bit()
148    }
149}
150#[doc = r" Value of the field"]
151pub struct PSR {
152    bits: bool,
153}
154impl PSR {
155    #[doc = r" Value of the field as raw bits"]
156    #[inline]
157    pub fn bit(&self) -> bool {
158        self.bits
159    }
160    #[doc = r" Returns `true` if the bit is clear (0)"]
161    #[inline]
162    pub fn bit_is_clear(&self) -> bool {
163        !self.bit()
164    }
165    #[doc = r" Returns `true` if the bit is set (1)"]
166    #[inline]
167    pub fn bit_is_set(&self) -> bool {
168        self.bit()
169    }
170}
171#[doc = r" Value of the field"]
172pub struct PEIER {
173    bits: bool,
174}
175impl PEIER {
176    #[doc = r" Value of the field as raw bits"]
177    #[inline]
178    pub fn bit(&self) -> bool {
179        self.bits
180    }
181    #[doc = r" Returns `true` if the bit is clear (0)"]
182    #[inline]
183    pub fn bit_is_clear(&self) -> bool {
184        !self.bit()
185    }
186    #[doc = r" Returns `true` if the bit is set (1)"]
187    #[inline]
188    pub fn bit_is_set(&self) -> bool {
189        self.bit()
190    }
191}
192#[doc = r" Value of the field"]
193pub struct TXEIER {
194    bits: bool,
195}
196impl TXEIER {
197    #[doc = r" Value of the field as raw bits"]
198    #[inline]
199    pub fn bit(&self) -> bool {
200        self.bits
201    }
202    #[doc = r" Returns `true` if the bit is clear (0)"]
203    #[inline]
204    pub fn bit_is_clear(&self) -> bool {
205        !self.bit()
206    }
207    #[doc = r" Returns `true` if the bit is set (1)"]
208    #[inline]
209    pub fn bit_is_set(&self) -> bool {
210        self.bit()
211    }
212}
213#[doc = r" Value of the field"]
214pub struct TCIER {
215    bits: bool,
216}
217impl TCIER {
218    #[doc = r" Value of the field as raw bits"]
219    #[inline]
220    pub fn bit(&self) -> bool {
221        self.bits
222    }
223    #[doc = r" Returns `true` if the bit is clear (0)"]
224    #[inline]
225    pub fn bit_is_clear(&self) -> bool {
226        !self.bit()
227    }
228    #[doc = r" Returns `true` if the bit is set (1)"]
229    #[inline]
230    pub fn bit_is_set(&self) -> bool {
231        self.bit()
232    }
233}
234#[doc = r" Value of the field"]
235pub struct RXNEIER {
236    bits: bool,
237}
238impl RXNEIER {
239    #[doc = r" Value of the field as raw bits"]
240    #[inline]
241    pub fn bit(&self) -> bool {
242        self.bits
243    }
244    #[doc = r" Returns `true` if the bit is clear (0)"]
245    #[inline]
246    pub fn bit_is_clear(&self) -> bool {
247        !self.bit()
248    }
249    #[doc = r" Returns `true` if the bit is set (1)"]
250    #[inline]
251    pub fn bit_is_set(&self) -> bool {
252        self.bit()
253    }
254}
255#[doc = r" Value of the field"]
256pub struct IDLEIER {
257    bits: bool,
258}
259impl IDLEIER {
260    #[doc = r" Value of the field as raw bits"]
261    #[inline]
262    pub fn bit(&self) -> bool {
263        self.bits
264    }
265    #[doc = r" Returns `true` if the bit is clear (0)"]
266    #[inline]
267    pub fn bit_is_clear(&self) -> bool {
268        !self.bit()
269    }
270    #[doc = r" Returns `true` if the bit is set (1)"]
271    #[inline]
272    pub fn bit_is_set(&self) -> bool {
273        self.bit()
274    }
275}
276#[doc = r" Value of the field"]
277pub struct TER {
278    bits: bool,
279}
280impl TER {
281    #[doc = r" Value of the field as raw bits"]
282    #[inline]
283    pub fn bit(&self) -> bool {
284        self.bits
285    }
286    #[doc = r" Returns `true` if the bit is clear (0)"]
287    #[inline]
288    pub fn bit_is_clear(&self) -> bool {
289        !self.bit()
290    }
291    #[doc = r" Returns `true` if the bit is set (1)"]
292    #[inline]
293    pub fn bit_is_set(&self) -> bool {
294        self.bit()
295    }
296}
297#[doc = r" Value of the field"]
298pub struct RER {
299    bits: bool,
300}
301impl RER {
302    #[doc = r" Value of the field as raw bits"]
303    #[inline]
304    pub fn bit(&self) -> bool {
305        self.bits
306    }
307    #[doc = r" Returns `true` if the bit is clear (0)"]
308    #[inline]
309    pub fn bit_is_clear(&self) -> bool {
310        !self.bit()
311    }
312    #[doc = r" Returns `true` if the bit is set (1)"]
313    #[inline]
314    pub fn bit_is_set(&self) -> bool {
315        self.bit()
316    }
317}
318#[doc = r" Value of the field"]
319pub struct RWUR {
320    bits: bool,
321}
322impl RWUR {
323    #[doc = r" Value of the field as raw bits"]
324    #[inline]
325    pub fn bit(&self) -> bool {
326        self.bits
327    }
328    #[doc = r" Returns `true` if the bit is clear (0)"]
329    #[inline]
330    pub fn bit_is_clear(&self) -> bool {
331        !self.bit()
332    }
333    #[doc = r" Returns `true` if the bit is set (1)"]
334    #[inline]
335    pub fn bit_is_set(&self) -> bool {
336        self.bit()
337    }
338}
339#[doc = r" Value of the field"]
340pub struct SBKR {
341    bits: bool,
342}
343impl SBKR {
344    #[doc = r" Value of the field as raw bits"]
345    #[inline]
346    pub fn bit(&self) -> bool {
347        self.bits
348    }
349    #[doc = r" Returns `true` if the bit is clear (0)"]
350    #[inline]
351    pub fn bit_is_clear(&self) -> bool {
352        !self.bit()
353    }
354    #[doc = r" Returns `true` if the bit is set (1)"]
355    #[inline]
356    pub fn bit_is_set(&self) -> bool {
357        self.bit()
358    }
359}
360#[doc = r" Proxy"]
361pub struct _OVER8W<'a> {
362    w: &'a mut W,
363}
364impl<'a> _OVER8W<'a> {
365    #[doc = r" Sets the field bit"]
366    pub fn set_bit(self) -> &'a mut W {
367        self.bit(true)
368    }
369    #[doc = r" Clears the field bit"]
370    pub fn clear_bit(self) -> &'a mut W {
371        self.bit(false)
372    }
373    #[doc = r" Writes raw bits to the field"]
374    #[inline]
375    pub fn bit(self, value: bool) -> &'a mut W {
376        const MASK: bool = true;
377        const OFFSET: u8 = 15;
378        self.w.bits &= !((MASK as u32) << OFFSET);
379        self.w.bits |= ((value & MASK) as u32) << OFFSET;
380        self.w
381    }
382}
383#[doc = r" Proxy"]
384pub struct _UEW<'a> {
385    w: &'a mut W,
386}
387impl<'a> _UEW<'a> {
388    #[doc = r" Sets the field bit"]
389    pub fn set_bit(self) -> &'a mut W {
390        self.bit(true)
391    }
392    #[doc = r" Clears the field bit"]
393    pub fn clear_bit(self) -> &'a mut W {
394        self.bit(false)
395    }
396    #[doc = r" Writes raw bits to the field"]
397    #[inline]
398    pub fn bit(self, value: bool) -> &'a mut W {
399        const MASK: bool = true;
400        const OFFSET: u8 = 13;
401        self.w.bits &= !((MASK as u32) << OFFSET);
402        self.w.bits |= ((value & MASK) as u32) << OFFSET;
403        self.w
404    }
405}
406#[doc = r" Proxy"]
407pub struct _MW<'a> {
408    w: &'a mut W,
409}
410impl<'a> _MW<'a> {
411    #[doc = r" Sets the field bit"]
412    pub fn set_bit(self) -> &'a mut W {
413        self.bit(true)
414    }
415    #[doc = r" Clears the field bit"]
416    pub fn clear_bit(self) -> &'a mut W {
417        self.bit(false)
418    }
419    #[doc = r" Writes raw bits to the field"]
420    #[inline]
421    pub fn bit(self, value: bool) -> &'a mut W {
422        const MASK: bool = true;
423        const OFFSET: u8 = 12;
424        self.w.bits &= !((MASK as u32) << OFFSET);
425        self.w.bits |= ((value & MASK) as u32) << OFFSET;
426        self.w
427    }
428}
429#[doc = r" Proxy"]
430pub struct _WAKEW<'a> {
431    w: &'a mut W,
432}
433impl<'a> _WAKEW<'a> {
434    #[doc = r" Sets the field bit"]
435    pub fn set_bit(self) -> &'a mut W {
436        self.bit(true)
437    }
438    #[doc = r" Clears the field bit"]
439    pub fn clear_bit(self) -> &'a mut W {
440        self.bit(false)
441    }
442    #[doc = r" Writes raw bits to the field"]
443    #[inline]
444    pub fn bit(self, value: bool) -> &'a mut W {
445        const MASK: bool = true;
446        const OFFSET: u8 = 11;
447        self.w.bits &= !((MASK as u32) << OFFSET);
448        self.w.bits |= ((value & MASK) as u32) << OFFSET;
449        self.w
450    }
451}
452#[doc = r" Proxy"]
453pub struct _PCEW<'a> {
454    w: &'a mut W,
455}
456impl<'a> _PCEW<'a> {
457    #[doc = r" Sets the field bit"]
458    pub fn set_bit(self) -> &'a mut W {
459        self.bit(true)
460    }
461    #[doc = r" Clears the field bit"]
462    pub fn clear_bit(self) -> &'a mut W {
463        self.bit(false)
464    }
465    #[doc = r" Writes raw bits to the field"]
466    #[inline]
467    pub fn bit(self, value: bool) -> &'a mut W {
468        const MASK: bool = true;
469        const OFFSET: u8 = 10;
470        self.w.bits &= !((MASK as u32) << OFFSET);
471        self.w.bits |= ((value & MASK) as u32) << OFFSET;
472        self.w
473    }
474}
475#[doc = r" Proxy"]
476pub struct _PSW<'a> {
477    w: &'a mut W,
478}
479impl<'a> _PSW<'a> {
480    #[doc = r" Sets the field bit"]
481    pub fn set_bit(self) -> &'a mut W {
482        self.bit(true)
483    }
484    #[doc = r" Clears the field bit"]
485    pub fn clear_bit(self) -> &'a mut W {
486        self.bit(false)
487    }
488    #[doc = r" Writes raw bits to the field"]
489    #[inline]
490    pub fn bit(self, value: bool) -> &'a mut W {
491        const MASK: bool = true;
492        const OFFSET: u8 = 9;
493        self.w.bits &= !((MASK as u32) << OFFSET);
494        self.w.bits |= ((value & MASK) as u32) << OFFSET;
495        self.w
496    }
497}
498#[doc = r" Proxy"]
499pub struct _PEIEW<'a> {
500    w: &'a mut W,
501}
502impl<'a> _PEIEW<'a> {
503    #[doc = r" Sets the field bit"]
504    pub fn set_bit(self) -> &'a mut W {
505        self.bit(true)
506    }
507    #[doc = r" Clears the field bit"]
508    pub fn clear_bit(self) -> &'a mut W {
509        self.bit(false)
510    }
511    #[doc = r" Writes raw bits to the field"]
512    #[inline]
513    pub fn bit(self, value: bool) -> &'a mut W {
514        const MASK: bool = true;
515        const OFFSET: u8 = 8;
516        self.w.bits &= !((MASK as u32) << OFFSET);
517        self.w.bits |= ((value & MASK) as u32) << OFFSET;
518        self.w
519    }
520}
521#[doc = r" Proxy"]
522pub struct _TXEIEW<'a> {
523    w: &'a mut W,
524}
525impl<'a> _TXEIEW<'a> {
526    #[doc = r" Sets the field bit"]
527    pub fn set_bit(self) -> &'a mut W {
528        self.bit(true)
529    }
530    #[doc = r" Clears the field bit"]
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]
536    pub fn bit(self, value: bool) -> &'a mut W {
537        const MASK: bool = true;
538        const OFFSET: u8 = 7;
539        self.w.bits &= !((MASK as u32) << OFFSET);
540        self.w.bits |= ((value & MASK) as u32) << OFFSET;
541        self.w
542    }
543}
544#[doc = r" Proxy"]
545pub struct _TCIEW<'a> {
546    w: &'a mut W,
547}
548impl<'a> _TCIEW<'a> {
549    #[doc = r" Sets the field bit"]
550    pub fn set_bit(self) -> &'a mut W {
551        self.bit(true)
552    }
553    #[doc = r" Clears the field bit"]
554    pub fn clear_bit(self) -> &'a mut W {
555        self.bit(false)
556    }
557    #[doc = r" Writes raw bits to the field"]
558    #[inline]
559    pub fn bit(self, value: bool) -> &'a mut W {
560        const MASK: bool = true;
561        const OFFSET: u8 = 6;
562        self.w.bits &= !((MASK as u32) << OFFSET);
563        self.w.bits |= ((value & MASK) as u32) << OFFSET;
564        self.w
565    }
566}
567#[doc = r" Proxy"]
568pub struct _RXNEIEW<'a> {
569    w: &'a mut W,
570}
571impl<'a> _RXNEIEW<'a> {
572    #[doc = r" Sets the field bit"]
573    pub fn set_bit(self) -> &'a mut W {
574        self.bit(true)
575    }
576    #[doc = r" Clears the field bit"]
577    pub fn clear_bit(self) -> &'a mut W {
578        self.bit(false)
579    }
580    #[doc = r" Writes raw bits to the field"]
581    #[inline]
582    pub fn bit(self, value: bool) -> &'a mut W {
583        const MASK: bool = true;
584        const OFFSET: u8 = 5;
585        self.w.bits &= !((MASK as u32) << OFFSET);
586        self.w.bits |= ((value & MASK) as u32) << OFFSET;
587        self.w
588    }
589}
590#[doc = r" Proxy"]
591pub struct _IDLEIEW<'a> {
592    w: &'a mut W,
593}
594impl<'a> _IDLEIEW<'a> {
595    #[doc = r" Sets the field bit"]
596    pub fn set_bit(self) -> &'a mut W {
597        self.bit(true)
598    }
599    #[doc = r" Clears the field bit"]
600    pub fn clear_bit(self) -> &'a mut W {
601        self.bit(false)
602    }
603    #[doc = r" Writes raw bits to the field"]
604    #[inline]
605    pub fn bit(self, value: bool) -> &'a mut W {
606        const MASK: bool = true;
607        const OFFSET: u8 = 4;
608        self.w.bits &= !((MASK as u32) << OFFSET);
609        self.w.bits |= ((value & MASK) as u32) << OFFSET;
610        self.w
611    }
612}
613#[doc = r" Proxy"]
614pub struct _TEW<'a> {
615    w: &'a mut W,
616}
617impl<'a> _TEW<'a> {
618    #[doc = r" Sets the field bit"]
619    pub fn set_bit(self) -> &'a mut W {
620        self.bit(true)
621    }
622    #[doc = r" Clears the field bit"]
623    pub fn clear_bit(self) -> &'a mut W {
624        self.bit(false)
625    }
626    #[doc = r" Writes raw bits to the field"]
627    #[inline]
628    pub fn bit(self, value: bool) -> &'a mut W {
629        const MASK: bool = true;
630        const OFFSET: u8 = 3;
631        self.w.bits &= !((MASK as u32) << OFFSET);
632        self.w.bits |= ((value & MASK) as u32) << OFFSET;
633        self.w
634    }
635}
636#[doc = r" Proxy"]
637pub struct _REW<'a> {
638    w: &'a mut W,
639}
640impl<'a> _REW<'a> {
641    #[doc = r" Sets the field bit"]
642    pub fn set_bit(self) -> &'a mut W {
643        self.bit(true)
644    }
645    #[doc = r" Clears the field bit"]
646    pub fn clear_bit(self) -> &'a mut W {
647        self.bit(false)
648    }
649    #[doc = r" Writes raw bits to the field"]
650    #[inline]
651    pub fn bit(self, value: bool) -> &'a mut W {
652        const MASK: bool = true;
653        const OFFSET: u8 = 2;
654        self.w.bits &= !((MASK as u32) << OFFSET);
655        self.w.bits |= ((value & MASK) as u32) << OFFSET;
656        self.w
657    }
658}
659#[doc = r" Proxy"]
660pub struct _RWUW<'a> {
661    w: &'a mut W,
662}
663impl<'a> _RWUW<'a> {
664    #[doc = r" Sets the field bit"]
665    pub fn set_bit(self) -> &'a mut W {
666        self.bit(true)
667    }
668    #[doc = r" Clears the field bit"]
669    pub fn clear_bit(self) -> &'a mut W {
670        self.bit(false)
671    }
672    #[doc = r" Writes raw bits to the field"]
673    #[inline]
674    pub fn bit(self, value: bool) -> &'a mut W {
675        const MASK: bool = true;
676        const OFFSET: u8 = 1;
677        self.w.bits &= !((MASK as u32) << OFFSET);
678        self.w.bits |= ((value & MASK) as u32) << OFFSET;
679        self.w
680    }
681}
682#[doc = r" Proxy"]
683pub struct _SBKW<'a> {
684    w: &'a mut W,
685}
686impl<'a> _SBKW<'a> {
687    #[doc = r" Sets the field bit"]
688    pub fn set_bit(self) -> &'a mut W {
689        self.bit(true)
690    }
691    #[doc = r" Clears the field bit"]
692    pub fn clear_bit(self) -> &'a mut W {
693        self.bit(false)
694    }
695    #[doc = r" Writes raw bits to the field"]
696    #[inline]
697    pub fn bit(self, value: bool) -> &'a mut W {
698        const MASK: bool = true;
699        const OFFSET: u8 = 0;
700        self.w.bits &= !((MASK as u32) << OFFSET);
701        self.w.bits |= ((value & MASK) as u32) << OFFSET;
702        self.w
703    }
704}
705impl R {
706    #[doc = r" Value of the register as raw bits"]
707    #[inline]
708    pub fn bits(&self) -> u32 {
709        self.bits
710    }
711    #[doc = "Bit 15 - Oversampling mode"]
712    #[inline]
713    pub fn over8(&self) -> OVER8R {
714        let bits = {
715            const MASK: bool = true;
716            const OFFSET: u8 = 15;
717            ((self.bits >> OFFSET) & MASK as u32) != 0
718        };
719        OVER8R { bits }
720    }
721    #[doc = "Bit 13 - USART enable"]
722    #[inline]
723    pub fn ue(&self) -> UER {
724        let bits = {
725            const MASK: bool = true;
726            const OFFSET: u8 = 13;
727            ((self.bits >> OFFSET) & MASK as u32) != 0
728        };
729        UER { bits }
730    }
731    #[doc = "Bit 12 - Word length"]
732    #[inline]
733    pub fn m(&self) -> MR {
734        let bits = {
735            const MASK: bool = true;
736            const OFFSET: u8 = 12;
737            ((self.bits >> OFFSET) & MASK as u32) != 0
738        };
739        MR { bits }
740    }
741    #[doc = "Bit 11 - Wakeup method"]
742    #[inline]
743    pub fn wake(&self) -> WAKER {
744        let bits = {
745            const MASK: bool = true;
746            const OFFSET: u8 = 11;
747            ((self.bits >> OFFSET) & MASK as u32) != 0
748        };
749        WAKER { bits }
750    }
751    #[doc = "Bit 10 - Parity control enable"]
752    #[inline]
753    pub fn pce(&self) -> PCER {
754        let bits = {
755            const MASK: bool = true;
756            const OFFSET: u8 = 10;
757            ((self.bits >> OFFSET) & MASK as u32) != 0
758        };
759        PCER { bits }
760    }
761    #[doc = "Bit 9 - Parity selection"]
762    #[inline]
763    pub fn ps(&self) -> PSR {
764        let bits = {
765            const MASK: bool = true;
766            const OFFSET: u8 = 9;
767            ((self.bits >> OFFSET) & MASK as u32) != 0
768        };
769        PSR { bits }
770    }
771    #[doc = "Bit 8 - PE interrupt enable"]
772    #[inline]
773    pub fn peie(&self) -> PEIER {
774        let bits = {
775            const MASK: bool = true;
776            const OFFSET: u8 = 8;
777            ((self.bits >> OFFSET) & MASK as u32) != 0
778        };
779        PEIER { bits }
780    }
781    #[doc = "Bit 7 - TXE interrupt enable"]
782    #[inline]
783    pub fn txeie(&self) -> TXEIER {
784        let bits = {
785            const MASK: bool = true;
786            const OFFSET: u8 = 7;
787            ((self.bits >> OFFSET) & MASK as u32) != 0
788        };
789        TXEIER { bits }
790    }
791    #[doc = "Bit 6 - Transmission complete interrupt enable"]
792    #[inline]
793    pub fn tcie(&self) -> TCIER {
794        let bits = {
795            const MASK: bool = true;
796            const OFFSET: u8 = 6;
797            ((self.bits >> OFFSET) & MASK as u32) != 0
798        };
799        TCIER { bits }
800    }
801    #[doc = "Bit 5 - RXNE interrupt enable"]
802    #[inline]
803    pub fn rxneie(&self) -> RXNEIER {
804        let bits = {
805            const MASK: bool = true;
806            const OFFSET: u8 = 5;
807            ((self.bits >> OFFSET) & MASK as u32) != 0
808        };
809        RXNEIER { bits }
810    }
811    #[doc = "Bit 4 - IDLE interrupt enable"]
812    #[inline]
813    pub fn idleie(&self) -> IDLEIER {
814        let bits = {
815            const MASK: bool = true;
816            const OFFSET: u8 = 4;
817            ((self.bits >> OFFSET) & MASK as u32) != 0
818        };
819        IDLEIER { bits }
820    }
821    #[doc = "Bit 3 - Transmitter enable"]
822    #[inline]
823    pub fn te(&self) -> TER {
824        let bits = {
825            const MASK: bool = true;
826            const OFFSET: u8 = 3;
827            ((self.bits >> OFFSET) & MASK as u32) != 0
828        };
829        TER { bits }
830    }
831    #[doc = "Bit 2 - Receiver enable"]
832    #[inline]
833    pub fn re(&self) -> RER {
834        let bits = {
835            const MASK: bool = true;
836            const OFFSET: u8 = 2;
837            ((self.bits >> OFFSET) & MASK as u32) != 0
838        };
839        RER { bits }
840    }
841    #[doc = "Bit 1 - Receiver wakeup"]
842    #[inline]
843    pub fn rwu(&self) -> RWUR {
844        let bits = {
845            const MASK: bool = true;
846            const OFFSET: u8 = 1;
847            ((self.bits >> OFFSET) & MASK as u32) != 0
848        };
849        RWUR { bits }
850    }
851    #[doc = "Bit 0 - Send break"]
852    #[inline]
853    pub fn sbk(&self) -> SBKR {
854        let bits = {
855            const MASK: bool = true;
856            const OFFSET: u8 = 0;
857            ((self.bits >> OFFSET) & MASK as u32) != 0
858        };
859        SBKR { bits }
860    }
861}
862impl W {
863    #[doc = r" Reset value of the register"]
864    #[inline]
865    pub fn reset_value() -> W {
866        W { bits: 0 }
867    }
868    #[doc = r" Writes raw bits to the register"]
869    #[inline]
870    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
871        self.bits = bits;
872        self
873    }
874    #[doc = "Bit 15 - Oversampling mode"]
875    #[inline]
876    pub fn over8(&mut self) -> _OVER8W {
877        _OVER8W { w: self }
878    }
879    #[doc = "Bit 13 - USART enable"]
880    #[inline]
881    pub fn ue(&mut self) -> _UEW {
882        _UEW { w: self }
883    }
884    #[doc = "Bit 12 - Word length"]
885    #[inline]
886    pub fn m(&mut self) -> _MW {
887        _MW { w: self }
888    }
889    #[doc = "Bit 11 - Wakeup method"]
890    #[inline]
891    pub fn wake(&mut self) -> _WAKEW {
892        _WAKEW { w: self }
893    }
894    #[doc = "Bit 10 - Parity control enable"]
895    #[inline]
896    pub fn pce(&mut self) -> _PCEW {
897        _PCEW { w: self }
898    }
899    #[doc = "Bit 9 - Parity selection"]
900    #[inline]
901    pub fn ps(&mut self) -> _PSW {
902        _PSW { w: self }
903    }
904    #[doc = "Bit 8 - PE interrupt enable"]
905    #[inline]
906    pub fn peie(&mut self) -> _PEIEW {
907        _PEIEW { w: self }
908    }
909    #[doc = "Bit 7 - TXE interrupt enable"]
910    #[inline]
911    pub fn txeie(&mut self) -> _TXEIEW {
912        _TXEIEW { w: self }
913    }
914    #[doc = "Bit 6 - Transmission complete interrupt enable"]
915    #[inline]
916    pub fn tcie(&mut self) -> _TCIEW {
917        _TCIEW { w: self }
918    }
919    #[doc = "Bit 5 - RXNE interrupt enable"]
920    #[inline]
921    pub fn rxneie(&mut self) -> _RXNEIEW {
922        _RXNEIEW { w: self }
923    }
924    #[doc = "Bit 4 - IDLE interrupt enable"]
925    #[inline]
926    pub fn idleie(&mut self) -> _IDLEIEW {
927        _IDLEIEW { w: self }
928    }
929    #[doc = "Bit 3 - Transmitter enable"]
930    #[inline]
931    pub fn te(&mut self) -> _TEW {
932        _TEW { w: self }
933    }
934    #[doc = "Bit 2 - Receiver enable"]
935    #[inline]
936    pub fn re(&mut self) -> _REW {
937        _REW { w: self }
938    }
939    #[doc = "Bit 1 - Receiver wakeup"]
940    #[inline]
941    pub fn rwu(&mut self) -> _RWUW {
942        _RWUW { w: self }
943    }
944    #[doc = "Bit 0 - Send break"]
945    #[inline]
946    pub fn sbk(&mut self) -> _SBKW {
947        _SBKW { w: self }
948    }
949}