efm32tg11b540_pac/usart3/
if_.rs

1#[doc = "Register `IF` reader"]
2pub struct R(crate::R<IF_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<IF_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<IF_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<IF_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `TXC` reader - TX Complete Interrupt Flag"]
17pub type TXC_R = crate::BitReader<bool>;
18#[doc = "Field `TXBL` reader - TX Buffer Level Interrupt Flag"]
19pub type TXBL_R = crate::BitReader<bool>;
20#[doc = "Field `RXDATAV` reader - RX Data Valid Interrupt Flag"]
21pub type RXDATAV_R = crate::BitReader<bool>;
22#[doc = "Field `RXFULL` reader - RX Buffer Full Interrupt Flag"]
23pub type RXFULL_R = crate::BitReader<bool>;
24#[doc = "Field `RXOF` reader - RX Overflow Interrupt Flag"]
25pub type RXOF_R = crate::BitReader<bool>;
26#[doc = "Field `RXUF` reader - RX Underflow Interrupt Flag"]
27pub type RXUF_R = crate::BitReader<bool>;
28#[doc = "Field `TXOF` reader - TX Overflow Interrupt Flag"]
29pub type TXOF_R = crate::BitReader<bool>;
30#[doc = "Field `TXUF` reader - TX Underflow Interrupt Flag"]
31pub type TXUF_R = crate::BitReader<bool>;
32#[doc = "Field `PERR` reader - Parity Error Interrupt Flag"]
33pub type PERR_R = crate::BitReader<bool>;
34#[doc = "Field `FERR` reader - Framing Error Interrupt Flag"]
35pub type FERR_R = crate::BitReader<bool>;
36#[doc = "Field `MPAF` reader - Multi-Processor Address Frame Interrupt Flag"]
37pub type MPAF_R = crate::BitReader<bool>;
38#[doc = "Field `SSM` reader - Slave-Select in Master Mode Interrupt Flag"]
39pub type SSM_R = crate::BitReader<bool>;
40#[doc = "Field `CCF` reader - Collision Check Fail Interrupt Flag"]
41pub type CCF_R = crate::BitReader<bool>;
42#[doc = "Field `TXIDLE` reader - TX Idle Interrupt Flag"]
43pub type TXIDLE_R = crate::BitReader<bool>;
44#[doc = "Field `TCMP0` reader - Timer Comparator 0 Interrupt Flag"]
45pub type TCMP0_R = crate::BitReader<bool>;
46#[doc = "Field `TCMP1` reader - Timer Comparator 1 Interrupt Flag"]
47pub type TCMP1_R = crate::BitReader<bool>;
48#[doc = "Field `TCMP2` reader - Timer Comparator 2 Interrupt Flag"]
49pub type TCMP2_R = crate::BitReader<bool>;
50impl R {
51    #[doc = "Bit 0 - TX Complete Interrupt Flag"]
52    #[inline(always)]
53    pub fn txc(&self) -> TXC_R {
54        TXC_R::new((self.bits & 1) != 0)
55    }
56    #[doc = "Bit 1 - TX Buffer Level Interrupt Flag"]
57    #[inline(always)]
58    pub fn txbl(&self) -> TXBL_R {
59        TXBL_R::new(((self.bits >> 1) & 1) != 0)
60    }
61    #[doc = "Bit 2 - RX Data Valid Interrupt Flag"]
62    #[inline(always)]
63    pub fn rxdatav(&self) -> RXDATAV_R {
64        RXDATAV_R::new(((self.bits >> 2) & 1) != 0)
65    }
66    #[doc = "Bit 3 - RX Buffer Full Interrupt Flag"]
67    #[inline(always)]
68    pub fn rxfull(&self) -> RXFULL_R {
69        RXFULL_R::new(((self.bits >> 3) & 1) != 0)
70    }
71    #[doc = "Bit 4 - RX Overflow Interrupt Flag"]
72    #[inline(always)]
73    pub fn rxof(&self) -> RXOF_R {
74        RXOF_R::new(((self.bits >> 4) & 1) != 0)
75    }
76    #[doc = "Bit 5 - RX Underflow Interrupt Flag"]
77    #[inline(always)]
78    pub fn rxuf(&self) -> RXUF_R {
79        RXUF_R::new(((self.bits >> 5) & 1) != 0)
80    }
81    #[doc = "Bit 6 - TX Overflow Interrupt Flag"]
82    #[inline(always)]
83    pub fn txof(&self) -> TXOF_R {
84        TXOF_R::new(((self.bits >> 6) & 1) != 0)
85    }
86    #[doc = "Bit 7 - TX Underflow Interrupt Flag"]
87    #[inline(always)]
88    pub fn txuf(&self) -> TXUF_R {
89        TXUF_R::new(((self.bits >> 7) & 1) != 0)
90    }
91    #[doc = "Bit 8 - Parity Error Interrupt Flag"]
92    #[inline(always)]
93    pub fn perr(&self) -> PERR_R {
94        PERR_R::new(((self.bits >> 8) & 1) != 0)
95    }
96    #[doc = "Bit 9 - Framing Error Interrupt Flag"]
97    #[inline(always)]
98    pub fn ferr(&self) -> FERR_R {
99        FERR_R::new(((self.bits >> 9) & 1) != 0)
100    }
101    #[doc = "Bit 10 - Multi-Processor Address Frame Interrupt Flag"]
102    #[inline(always)]
103    pub fn mpaf(&self) -> MPAF_R {
104        MPAF_R::new(((self.bits >> 10) & 1) != 0)
105    }
106    #[doc = "Bit 11 - Slave-Select in Master Mode Interrupt Flag"]
107    #[inline(always)]
108    pub fn ssm(&self) -> SSM_R {
109        SSM_R::new(((self.bits >> 11) & 1) != 0)
110    }
111    #[doc = "Bit 12 - Collision Check Fail Interrupt Flag"]
112    #[inline(always)]
113    pub fn ccf(&self) -> CCF_R {
114        CCF_R::new(((self.bits >> 12) & 1) != 0)
115    }
116    #[doc = "Bit 13 - TX Idle Interrupt Flag"]
117    #[inline(always)]
118    pub fn txidle(&self) -> TXIDLE_R {
119        TXIDLE_R::new(((self.bits >> 13) & 1) != 0)
120    }
121    #[doc = "Bit 14 - Timer Comparator 0 Interrupt Flag"]
122    #[inline(always)]
123    pub fn tcmp0(&self) -> TCMP0_R {
124        TCMP0_R::new(((self.bits >> 14) & 1) != 0)
125    }
126    #[doc = "Bit 15 - Timer Comparator 1 Interrupt Flag"]
127    #[inline(always)]
128    pub fn tcmp1(&self) -> TCMP1_R {
129        TCMP1_R::new(((self.bits >> 15) & 1) != 0)
130    }
131    #[doc = "Bit 16 - Timer Comparator 2 Interrupt Flag"]
132    #[inline(always)]
133    pub fn tcmp2(&self) -> TCMP2_R {
134        TCMP2_R::new(((self.bits >> 16) & 1) != 0)
135    }
136}
137#[doc = "Interrupt Flag Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [if_](index.html) module"]
138pub struct IF_SPEC;
139impl crate::RegisterSpec for IF_SPEC {
140    type Ux = u32;
141}
142#[doc = "`read()` method returns [if_::R](R) reader structure"]
143impl crate::Readable for IF_SPEC {
144    type Reader = R;
145}
146#[doc = "`reset()` method sets IF to value 0x02"]
147impl crate::Resettable for IF_SPEC {
148    #[inline(always)]
149    fn reset_value() -> Self::Ux {
150        0x02
151    }
152}