py32f0/py32f030/usart1/
cr3.rs

1///Register `CR3` reader
2pub struct R(crate::R<CR3_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<CR3_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<CR3_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<CR3_SPEC>) -> Self {
13        R(reader)
14    }
15}
16///Register `CR3` writer
17pub struct W(crate::W<CR3_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<CR3_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<CR3_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<CR3_SPEC>) -> Self {
34        W(writer)
35    }
36}
37///Field `EIE` reader - Error interrupt enable
38pub type EIE_R = crate::BitReader<EIE_A>;
39/**Error interrupt enable
40
41Value on reset: 0*/
42#[derive(Clone, Copy, Debug, PartialEq, Eq)]
43pub enum EIE_A {
44    ///0: Error interrupt disabled
45    Disabled = 0,
46    ///1: Error interrupt enabled
47    Enabled = 1,
48}
49impl From<EIE_A> for bool {
50    #[inline(always)]
51    fn from(variant: EIE_A) -> Self {
52        variant as u8 != 0
53    }
54}
55impl EIE_R {
56    ///Get enumerated values variant
57    #[inline(always)]
58    pub fn variant(&self) -> EIE_A {
59        match self.bits {
60            false => EIE_A::Disabled,
61            true => EIE_A::Enabled,
62        }
63    }
64    ///Checks if the value of the field is `Disabled`
65    #[inline(always)]
66    pub fn is_disabled(&self) -> bool {
67        *self == EIE_A::Disabled
68    }
69    ///Checks if the value of the field is `Enabled`
70    #[inline(always)]
71    pub fn is_enabled(&self) -> bool {
72        *self == EIE_A::Enabled
73    }
74}
75///Field `EIE` writer - Error interrupt enable
76pub type EIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR3_SPEC, EIE_A, O>;
77impl<'a, const O: u8> EIE_W<'a, O> {
78    ///Error interrupt disabled
79    #[inline(always)]
80    pub fn disabled(self) -> &'a mut W {
81        self.variant(EIE_A::Disabled)
82    }
83    ///Error interrupt enabled
84    #[inline(always)]
85    pub fn enabled(self) -> &'a mut W {
86        self.variant(EIE_A::Enabled)
87    }
88}
89///Field `IREN` reader - IrDA mode enable
90pub type IREN_R = crate::BitReader<IREN_A>;
91/**IrDA mode enable
92
93Value on reset: 0*/
94#[derive(Clone, Copy, Debug, PartialEq, Eq)]
95pub enum IREN_A {
96    ///0: IrDA disabled
97    Disabled = 0,
98    ///1: IrDA enabled
99    Enabled = 1,
100}
101impl From<IREN_A> for bool {
102    #[inline(always)]
103    fn from(variant: IREN_A) -> Self {
104        variant as u8 != 0
105    }
106}
107impl IREN_R {
108    ///Get enumerated values variant
109    #[inline(always)]
110    pub fn variant(&self) -> IREN_A {
111        match self.bits {
112            false => IREN_A::Disabled,
113            true => IREN_A::Enabled,
114        }
115    }
116    ///Checks if the value of the field is `Disabled`
117    #[inline(always)]
118    pub fn is_disabled(&self) -> bool {
119        *self == IREN_A::Disabled
120    }
121    ///Checks if the value of the field is `Enabled`
122    #[inline(always)]
123    pub fn is_enabled(&self) -> bool {
124        *self == IREN_A::Enabled
125    }
126}
127///Field `IREN` writer - IrDA mode enable
128pub type IREN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR3_SPEC, IREN_A, O>;
129impl<'a, const O: u8> IREN_W<'a, O> {
130    ///IrDA disabled
131    #[inline(always)]
132    pub fn disabled(self) -> &'a mut W {
133        self.variant(IREN_A::Disabled)
134    }
135    ///IrDA enabled
136    #[inline(always)]
137    pub fn enabled(self) -> &'a mut W {
138        self.variant(IREN_A::Enabled)
139    }
140}
141///Field `IRLP` reader - IrDA low-power
142pub type IRLP_R = crate::BitReader<IRLP_A>;
143/**IrDA low-power
144
145Value on reset: 0*/
146#[derive(Clone, Copy, Debug, PartialEq, Eq)]
147pub enum IRLP_A {
148    ///0: Normal mode
149    Normal = 0,
150    ///1: Low-power mode
151    LowPower = 1,
152}
153impl From<IRLP_A> for bool {
154    #[inline(always)]
155    fn from(variant: IRLP_A) -> Self {
156        variant as u8 != 0
157    }
158}
159impl IRLP_R {
160    ///Get enumerated values variant
161    #[inline(always)]
162    pub fn variant(&self) -> IRLP_A {
163        match self.bits {
164            false => IRLP_A::Normal,
165            true => IRLP_A::LowPower,
166        }
167    }
168    ///Checks if the value of the field is `Normal`
169    #[inline(always)]
170    pub fn is_normal(&self) -> bool {
171        *self == IRLP_A::Normal
172    }
173    ///Checks if the value of the field is `LowPower`
174    #[inline(always)]
175    pub fn is_low_power(&self) -> bool {
176        *self == IRLP_A::LowPower
177    }
178}
179///Field `IRLP` writer - IrDA low-power
180pub type IRLP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR3_SPEC, IRLP_A, O>;
181impl<'a, const O: u8> IRLP_W<'a, O> {
182    ///Normal mode
183    #[inline(always)]
184    pub fn normal(self) -> &'a mut W {
185        self.variant(IRLP_A::Normal)
186    }
187    ///Low-power mode
188    #[inline(always)]
189    pub fn low_power(self) -> &'a mut W {
190        self.variant(IRLP_A::LowPower)
191    }
192}
193///Field `HDSEL` reader - Half-duplex selection
194pub type HDSEL_R = crate::BitReader<HDSEL_A>;
195/**Half-duplex selection
196
197Value on reset: 0*/
198#[derive(Clone, Copy, Debug, PartialEq, Eq)]
199pub enum HDSEL_A {
200    ///0: Half duplex mode is not selected
201    FullDuplex = 0,
202    ///1: Half duplex mode is selected
203    HalfDuplex = 1,
204}
205impl From<HDSEL_A> for bool {
206    #[inline(always)]
207    fn from(variant: HDSEL_A) -> Self {
208        variant as u8 != 0
209    }
210}
211impl HDSEL_R {
212    ///Get enumerated values variant
213    #[inline(always)]
214    pub fn variant(&self) -> HDSEL_A {
215        match self.bits {
216            false => HDSEL_A::FullDuplex,
217            true => HDSEL_A::HalfDuplex,
218        }
219    }
220    ///Checks if the value of the field is `FullDuplex`
221    #[inline(always)]
222    pub fn is_full_duplex(&self) -> bool {
223        *self == HDSEL_A::FullDuplex
224    }
225    ///Checks if the value of the field is `HalfDuplex`
226    #[inline(always)]
227    pub fn is_half_duplex(&self) -> bool {
228        *self == HDSEL_A::HalfDuplex
229    }
230}
231///Field `HDSEL` writer - Half-duplex selection
232pub type HDSEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR3_SPEC, HDSEL_A, O>;
233impl<'a, const O: u8> HDSEL_W<'a, O> {
234    ///Half duplex mode is not selected
235    #[inline(always)]
236    pub fn full_duplex(self) -> &'a mut W {
237        self.variant(HDSEL_A::FullDuplex)
238    }
239    ///Half duplex mode is selected
240    #[inline(always)]
241    pub fn half_duplex(self) -> &'a mut W {
242        self.variant(HDSEL_A::HalfDuplex)
243    }
244}
245///Field `DMAR` reader - DMA enable receiver
246pub type DMAR_R = crate::BitReader<DMAR_A>;
247/**DMA enable receiver
248
249Value on reset: 0*/
250#[derive(Clone, Copy, Debug, PartialEq, Eq)]
251pub enum DMAR_A {
252    ///0: DMA mode is disabled for reception
253    Disabled = 0,
254    ///1: DMA mode is enabled for reception
255    Enabled = 1,
256}
257impl From<DMAR_A> for bool {
258    #[inline(always)]
259    fn from(variant: DMAR_A) -> Self {
260        variant as u8 != 0
261    }
262}
263impl DMAR_R {
264    ///Get enumerated values variant
265    #[inline(always)]
266    pub fn variant(&self) -> DMAR_A {
267        match self.bits {
268            false => DMAR_A::Disabled,
269            true => DMAR_A::Enabled,
270        }
271    }
272    ///Checks if the value of the field is `Disabled`
273    #[inline(always)]
274    pub fn is_disabled(&self) -> bool {
275        *self == DMAR_A::Disabled
276    }
277    ///Checks if the value of the field is `Enabled`
278    #[inline(always)]
279    pub fn is_enabled(&self) -> bool {
280        *self == DMAR_A::Enabled
281    }
282}
283///Field `DMAR` writer - DMA enable receiver
284pub type DMAR_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR3_SPEC, DMAR_A, O>;
285impl<'a, const O: u8> DMAR_W<'a, O> {
286    ///DMA mode is disabled for reception
287    #[inline(always)]
288    pub fn disabled(self) -> &'a mut W {
289        self.variant(DMAR_A::Disabled)
290    }
291    ///DMA mode is enabled for reception
292    #[inline(always)]
293    pub fn enabled(self) -> &'a mut W {
294        self.variant(DMAR_A::Enabled)
295    }
296}
297///Field `DMAT` reader - DMA enable transmitter
298pub type DMAT_R = crate::BitReader<DMAT_A>;
299/**DMA enable transmitter
300
301Value on reset: 0*/
302#[derive(Clone, Copy, Debug, PartialEq, Eq)]
303pub enum DMAT_A {
304    ///0: DMA mode is disabled for transmission
305    Disabled = 0,
306    ///1: DMA mode is enabled for transmission
307    Enabled = 1,
308}
309impl From<DMAT_A> for bool {
310    #[inline(always)]
311    fn from(variant: DMAT_A) -> Self {
312        variant as u8 != 0
313    }
314}
315impl DMAT_R {
316    ///Get enumerated values variant
317    #[inline(always)]
318    pub fn variant(&self) -> DMAT_A {
319        match self.bits {
320            false => DMAT_A::Disabled,
321            true => DMAT_A::Enabled,
322        }
323    }
324    ///Checks if the value of the field is `Disabled`
325    #[inline(always)]
326    pub fn is_disabled(&self) -> bool {
327        *self == DMAT_A::Disabled
328    }
329    ///Checks if the value of the field is `Enabled`
330    #[inline(always)]
331    pub fn is_enabled(&self) -> bool {
332        *self == DMAT_A::Enabled
333    }
334}
335///Field `DMAT` writer - DMA enable transmitter
336pub type DMAT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR3_SPEC, DMAT_A, O>;
337impl<'a, const O: u8> DMAT_W<'a, O> {
338    ///DMA mode is disabled for transmission
339    #[inline(always)]
340    pub fn disabled(self) -> &'a mut W {
341        self.variant(DMAT_A::Disabled)
342    }
343    ///DMA mode is enabled for transmission
344    #[inline(always)]
345    pub fn enabled(self) -> &'a mut W {
346        self.variant(DMAT_A::Enabled)
347    }
348}
349///Field `RTSE` reader - RTS enable
350pub type RTSE_R = crate::BitReader<RTSE_A>;
351/**RTS enable
352
353Value on reset: 0*/
354#[derive(Clone, Copy, Debug, PartialEq, Eq)]
355pub enum RTSE_A {
356    ///0: RTS hardware flow control disabled
357    Disabled = 0,
358    ///1: RTS hardware flow control enabled
359    Enabled = 1,
360}
361impl From<RTSE_A> for bool {
362    #[inline(always)]
363    fn from(variant: RTSE_A) -> Self {
364        variant as u8 != 0
365    }
366}
367impl RTSE_R {
368    ///Get enumerated values variant
369    #[inline(always)]
370    pub fn variant(&self) -> RTSE_A {
371        match self.bits {
372            false => RTSE_A::Disabled,
373            true => RTSE_A::Enabled,
374        }
375    }
376    ///Checks if the value of the field is `Disabled`
377    #[inline(always)]
378    pub fn is_disabled(&self) -> bool {
379        *self == RTSE_A::Disabled
380    }
381    ///Checks if the value of the field is `Enabled`
382    #[inline(always)]
383    pub fn is_enabled(&self) -> bool {
384        *self == RTSE_A::Enabled
385    }
386}
387///Field `RTSE` writer - RTS enable
388pub type RTSE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR3_SPEC, RTSE_A, O>;
389impl<'a, const O: u8> RTSE_W<'a, O> {
390    ///RTS hardware flow control disabled
391    #[inline(always)]
392    pub fn disabled(self) -> &'a mut W {
393        self.variant(RTSE_A::Disabled)
394    }
395    ///RTS hardware flow control enabled
396    #[inline(always)]
397    pub fn enabled(self) -> &'a mut W {
398        self.variant(RTSE_A::Enabled)
399    }
400}
401///Field `CTSE` reader - CTS enable
402pub type CTSE_R = crate::BitReader<CTSE_A>;
403/**CTS enable
404
405Value on reset: 0*/
406#[derive(Clone, Copy, Debug, PartialEq, Eq)]
407pub enum CTSE_A {
408    ///0: CTS hardware flow control disabled
409    Disabled = 0,
410    ///1: CTS hardware flow control enabled
411    Enabled = 1,
412}
413impl From<CTSE_A> for bool {
414    #[inline(always)]
415    fn from(variant: CTSE_A) -> Self {
416        variant as u8 != 0
417    }
418}
419impl CTSE_R {
420    ///Get enumerated values variant
421    #[inline(always)]
422    pub fn variant(&self) -> CTSE_A {
423        match self.bits {
424            false => CTSE_A::Disabled,
425            true => CTSE_A::Enabled,
426        }
427    }
428    ///Checks if the value of the field is `Disabled`
429    #[inline(always)]
430    pub fn is_disabled(&self) -> bool {
431        *self == CTSE_A::Disabled
432    }
433    ///Checks if the value of the field is `Enabled`
434    #[inline(always)]
435    pub fn is_enabled(&self) -> bool {
436        *self == CTSE_A::Enabled
437    }
438}
439///Field `CTSE` writer - CTS enable
440pub type CTSE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR3_SPEC, CTSE_A, O>;
441impl<'a, const O: u8> CTSE_W<'a, O> {
442    ///CTS hardware flow control disabled
443    #[inline(always)]
444    pub fn disabled(self) -> &'a mut W {
445        self.variant(CTSE_A::Disabled)
446    }
447    ///CTS hardware flow control enabled
448    #[inline(always)]
449    pub fn enabled(self) -> &'a mut W {
450        self.variant(CTSE_A::Enabled)
451    }
452}
453///Field `CTSIE` reader - CTS interrupt enable
454pub type CTSIE_R = crate::BitReader<CTSIE_A>;
455/**CTS interrupt enable
456
457Value on reset: 0*/
458#[derive(Clone, Copy, Debug, PartialEq, Eq)]
459pub enum CTSIE_A {
460    ///0: CTS interrupt disabled
461    Disabled = 0,
462    ///1: CTS interrupt enabled
463    Enabled = 1,
464}
465impl From<CTSIE_A> for bool {
466    #[inline(always)]
467    fn from(variant: CTSIE_A) -> Self {
468        variant as u8 != 0
469    }
470}
471impl CTSIE_R {
472    ///Get enumerated values variant
473    #[inline(always)]
474    pub fn variant(&self) -> CTSIE_A {
475        match self.bits {
476            false => CTSIE_A::Disabled,
477            true => CTSIE_A::Enabled,
478        }
479    }
480    ///Checks if the value of the field is `Disabled`
481    #[inline(always)]
482    pub fn is_disabled(&self) -> bool {
483        *self == CTSIE_A::Disabled
484    }
485    ///Checks if the value of the field is `Enabled`
486    #[inline(always)]
487    pub fn is_enabled(&self) -> bool {
488        *self == CTSIE_A::Enabled
489    }
490}
491///Field `CTSIE` writer - CTS interrupt enable
492pub type CTSIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR3_SPEC, CTSIE_A, O>;
493impl<'a, const O: u8> CTSIE_W<'a, O> {
494    ///CTS interrupt disabled
495    #[inline(always)]
496    pub fn disabled(self) -> &'a mut W {
497        self.variant(CTSIE_A::Disabled)
498    }
499    ///CTS interrupt enabled
500    #[inline(always)]
501    pub fn enabled(self) -> &'a mut W {
502        self.variant(CTSIE_A::Enabled)
503    }
504}
505///Field `OVER8` reader - Oversampling mode
506pub type OVER8_R = crate::BitReader<OVER8_A>;
507/**Oversampling mode
508
509Value on reset: 0*/
510#[derive(Clone, Copy, Debug, PartialEq, Eq)]
511pub enum OVER8_A {
512    ///0: Oversampling by 16
513    Oversampling16 = 0,
514    ///1: Oversampling by 8
515    Oversampling8 = 1,
516}
517impl From<OVER8_A> for bool {
518    #[inline(always)]
519    fn from(variant: OVER8_A) -> Self {
520        variant as u8 != 0
521    }
522}
523impl OVER8_R {
524    ///Get enumerated values variant
525    #[inline(always)]
526    pub fn variant(&self) -> OVER8_A {
527        match self.bits {
528            false => OVER8_A::Oversampling16,
529            true => OVER8_A::Oversampling8,
530        }
531    }
532    ///Checks if the value of the field is `Oversampling16`
533    #[inline(always)]
534    pub fn is_oversampling16(&self) -> bool {
535        *self == OVER8_A::Oversampling16
536    }
537    ///Checks if the value of the field is `Oversampling8`
538    #[inline(always)]
539    pub fn is_oversampling8(&self) -> bool {
540        *self == OVER8_A::Oversampling8
541    }
542}
543///Field `OVER8` writer - Oversampling mode
544pub type OVER8_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR3_SPEC, OVER8_A, O>;
545impl<'a, const O: u8> OVER8_W<'a, O> {
546    ///Oversampling by 16
547    #[inline(always)]
548    pub fn oversampling16(self) -> &'a mut W {
549        self.variant(OVER8_A::Oversampling16)
550    }
551    ///Oversampling by 8
552    #[inline(always)]
553    pub fn oversampling8(self) -> &'a mut W {
554        self.variant(OVER8_A::Oversampling8)
555    }
556}
557///Field `ABREN` reader - Auto baudrate enable
558pub type ABREN_R = crate::BitReader<ABREN_A>;
559/**Auto baudrate enable
560
561Value on reset: 0*/
562#[derive(Clone, Copy, Debug, PartialEq, Eq)]
563pub enum ABREN_A {
564    ///0: Auto baud rate detection is disabled
565    Disabled = 0,
566    ///1: Auto baud rate detection is enabled
567    Enabled = 1,
568}
569impl From<ABREN_A> for bool {
570    #[inline(always)]
571    fn from(variant: ABREN_A) -> Self {
572        variant as u8 != 0
573    }
574}
575impl ABREN_R {
576    ///Get enumerated values variant
577    #[inline(always)]
578    pub fn variant(&self) -> ABREN_A {
579        match self.bits {
580            false => ABREN_A::Disabled,
581            true => ABREN_A::Enabled,
582        }
583    }
584    ///Checks if the value of the field is `Disabled`
585    #[inline(always)]
586    pub fn is_disabled(&self) -> bool {
587        *self == ABREN_A::Disabled
588    }
589    ///Checks if the value of the field is `Enabled`
590    #[inline(always)]
591    pub fn is_enabled(&self) -> bool {
592        *self == ABREN_A::Enabled
593    }
594}
595///Field `ABREN` writer - Auto baudrate enable
596pub type ABREN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR3_SPEC, ABREN_A, O>;
597impl<'a, const O: u8> ABREN_W<'a, O> {
598    ///Auto baud rate detection is disabled
599    #[inline(always)]
600    pub fn disabled(self) -> &'a mut W {
601        self.variant(ABREN_A::Disabled)
602    }
603    ///Auto baud rate detection is enabled
604    #[inline(always)]
605    pub fn enabled(self) -> &'a mut W {
606        self.variant(ABREN_A::Enabled)
607    }
608}
609///Field `ABRMOD` reader - Auto baudrate mode
610pub type ABRMOD_R = crate::FieldReader<u8, ABRMOD_A>;
611/**Auto baudrate mode
612
613Value on reset: 0*/
614#[derive(Clone, Copy, Debug, PartialEq, Eq)]
615#[repr(u8)]
616pub enum ABRMOD_A {
617    ///0: Measurement of the start bit is used to detect the baud rate
618    Start = 0,
619    ///1: Falling edge to falling edge measurement
620    Edge = 1,
621    ///2: Reserved
622    Reserved1 = 2,
623    ///3: Reserved
624    Reserved2 = 3,
625}
626impl From<ABRMOD_A> for u8 {
627    #[inline(always)]
628    fn from(variant: ABRMOD_A) -> Self {
629        variant as _
630    }
631}
632impl ABRMOD_R {
633    ///Get enumerated values variant
634    #[inline(always)]
635    pub fn variant(&self) -> ABRMOD_A {
636        match self.bits {
637            0 => ABRMOD_A::Start,
638            1 => ABRMOD_A::Edge,
639            2 => ABRMOD_A::Reserved1,
640            3 => ABRMOD_A::Reserved2,
641            _ => unreachable!(),
642        }
643    }
644    ///Checks if the value of the field is `Start`
645    #[inline(always)]
646    pub fn is_start(&self) -> bool {
647        *self == ABRMOD_A::Start
648    }
649    ///Checks if the value of the field is `Edge`
650    #[inline(always)]
651    pub fn is_edge(&self) -> bool {
652        *self == ABRMOD_A::Edge
653    }
654    ///Checks if the value of the field is `Reserved1`
655    #[inline(always)]
656    pub fn is_reserved1(&self) -> bool {
657        *self == ABRMOD_A::Reserved1
658    }
659    ///Checks if the value of the field is `Reserved2`
660    #[inline(always)]
661    pub fn is_reserved2(&self) -> bool {
662        *self == ABRMOD_A::Reserved2
663    }
664}
665///Field `ABRMOD` writer - Auto baudrate mode
666pub type ABRMOD_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CR3_SPEC, u8, ABRMOD_A, 2, O>;
667impl<'a, const O: u8> ABRMOD_W<'a, O> {
668    ///Measurement of the start bit is used to detect the baud rate
669    #[inline(always)]
670    pub fn start(self) -> &'a mut W {
671        self.variant(ABRMOD_A::Start)
672    }
673    ///Falling edge to falling edge measurement
674    #[inline(always)]
675    pub fn edge(self) -> &'a mut W {
676        self.variant(ABRMOD_A::Edge)
677    }
678    ///Reserved
679    #[inline(always)]
680    pub fn reserved1(self) -> &'a mut W {
681        self.variant(ABRMOD_A::Reserved1)
682    }
683    ///Reserved
684    #[inline(always)]
685    pub fn reserved2(self) -> &'a mut W {
686        self.variant(ABRMOD_A::Reserved2)
687    }
688}
689impl R {
690    ///Bit 0 - Error interrupt enable
691    #[inline(always)]
692    pub fn eie(&self) -> EIE_R {
693        EIE_R::new((self.bits & 1) != 0)
694    }
695    ///Bit 1 - IrDA mode enable
696    #[inline(always)]
697    pub fn iren(&self) -> IREN_R {
698        IREN_R::new(((self.bits >> 1) & 1) != 0)
699    }
700    ///Bit 2 - IrDA low-power
701    #[inline(always)]
702    pub fn irlp(&self) -> IRLP_R {
703        IRLP_R::new(((self.bits >> 2) & 1) != 0)
704    }
705    ///Bit 3 - Half-duplex selection
706    #[inline(always)]
707    pub fn hdsel(&self) -> HDSEL_R {
708        HDSEL_R::new(((self.bits >> 3) & 1) != 0)
709    }
710    ///Bit 6 - DMA enable receiver
711    #[inline(always)]
712    pub fn dmar(&self) -> DMAR_R {
713        DMAR_R::new(((self.bits >> 6) & 1) != 0)
714    }
715    ///Bit 7 - DMA enable transmitter
716    #[inline(always)]
717    pub fn dmat(&self) -> DMAT_R {
718        DMAT_R::new(((self.bits >> 7) & 1) != 0)
719    }
720    ///Bit 8 - RTS enable
721    #[inline(always)]
722    pub fn rtse(&self) -> RTSE_R {
723        RTSE_R::new(((self.bits >> 8) & 1) != 0)
724    }
725    ///Bit 9 - CTS enable
726    #[inline(always)]
727    pub fn ctse(&self) -> CTSE_R {
728        CTSE_R::new(((self.bits >> 9) & 1) != 0)
729    }
730    ///Bit 10 - CTS interrupt enable
731    #[inline(always)]
732    pub fn ctsie(&self) -> CTSIE_R {
733        CTSIE_R::new(((self.bits >> 10) & 1) != 0)
734    }
735    ///Bit 11 - Oversampling mode
736    #[inline(always)]
737    pub fn over8(&self) -> OVER8_R {
738        OVER8_R::new(((self.bits >> 11) & 1) != 0)
739    }
740    ///Bit 12 - Auto baudrate enable
741    #[inline(always)]
742    pub fn abren(&self) -> ABREN_R {
743        ABREN_R::new(((self.bits >> 12) & 1) != 0)
744    }
745    ///Bits 13:14 - Auto baudrate mode
746    #[inline(always)]
747    pub fn abrmod(&self) -> ABRMOD_R {
748        ABRMOD_R::new(((self.bits >> 13) & 3) as u8)
749    }
750}
751impl W {
752    ///Bit 0 - Error interrupt enable
753    #[inline(always)]
754    #[must_use]
755    pub fn eie(&mut self) -> EIE_W<0> {
756        EIE_W::new(self)
757    }
758    ///Bit 1 - IrDA mode enable
759    #[inline(always)]
760    #[must_use]
761    pub fn iren(&mut self) -> IREN_W<1> {
762        IREN_W::new(self)
763    }
764    ///Bit 2 - IrDA low-power
765    #[inline(always)]
766    #[must_use]
767    pub fn irlp(&mut self) -> IRLP_W<2> {
768        IRLP_W::new(self)
769    }
770    ///Bit 3 - Half-duplex selection
771    #[inline(always)]
772    #[must_use]
773    pub fn hdsel(&mut self) -> HDSEL_W<3> {
774        HDSEL_W::new(self)
775    }
776    ///Bit 6 - DMA enable receiver
777    #[inline(always)]
778    #[must_use]
779    pub fn dmar(&mut self) -> DMAR_W<6> {
780        DMAR_W::new(self)
781    }
782    ///Bit 7 - DMA enable transmitter
783    #[inline(always)]
784    #[must_use]
785    pub fn dmat(&mut self) -> DMAT_W<7> {
786        DMAT_W::new(self)
787    }
788    ///Bit 8 - RTS enable
789    #[inline(always)]
790    #[must_use]
791    pub fn rtse(&mut self) -> RTSE_W<8> {
792        RTSE_W::new(self)
793    }
794    ///Bit 9 - CTS enable
795    #[inline(always)]
796    #[must_use]
797    pub fn ctse(&mut self) -> CTSE_W<9> {
798        CTSE_W::new(self)
799    }
800    ///Bit 10 - CTS interrupt enable
801    #[inline(always)]
802    #[must_use]
803    pub fn ctsie(&mut self) -> CTSIE_W<10> {
804        CTSIE_W::new(self)
805    }
806    ///Bit 11 - Oversampling mode
807    #[inline(always)]
808    #[must_use]
809    pub fn over8(&mut self) -> OVER8_W<11> {
810        OVER8_W::new(self)
811    }
812    ///Bit 12 - Auto baudrate enable
813    #[inline(always)]
814    #[must_use]
815    pub fn abren(&mut self) -> ABREN_W<12> {
816        ABREN_W::new(self)
817    }
818    ///Bits 13:14 - Auto baudrate mode
819    #[inline(always)]
820    #[must_use]
821    pub fn abrmod(&mut self) -> ABRMOD_W<13> {
822        ABRMOD_W::new(self)
823    }
824    ///Writes raw bits to the register.
825    #[inline(always)]
826    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
827        self.0.bits(bits);
828        self
829    }
830}
831/**Control register 3
832
833This register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).
834
835For information about available fields see [cr3](index.html) module*/
836pub struct CR3_SPEC;
837impl crate::RegisterSpec for CR3_SPEC {
838    type Ux = u32;
839}
840///`read()` method returns [cr3::R](R) reader structure
841impl crate::Readable for CR3_SPEC {
842    type Reader = R;
843}
844///`write(|w| ..)` method takes [cr3::W](W) writer structure
845impl crate::Writable for CR3_SPEC {
846    type Writer = W;
847    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
848    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
849}
850///`reset()` method sets CR3 to value 0
851impl crate::Resettable for CR3_SPEC {
852    const RESET_VALUE: Self::Ux = 0;
853}