efm32wg890_pac/uart0/
if_.rs1#[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>;
42impl R {
43 #[doc = "Bit 0 - TX Complete Interrupt Flag"]
44 #[inline(always)]
45 pub fn txc(&self) -> TXC_R {
46 TXC_R::new((self.bits & 1) != 0)
47 }
48 #[doc = "Bit 1 - TX Buffer Level Interrupt Flag"]
49 #[inline(always)]
50 pub fn txbl(&self) -> TXBL_R {
51 TXBL_R::new(((self.bits >> 1) & 1) != 0)
52 }
53 #[doc = "Bit 2 - RX Data Valid Interrupt Flag"]
54 #[inline(always)]
55 pub fn rxdatav(&self) -> RXDATAV_R {
56 RXDATAV_R::new(((self.bits >> 2) & 1) != 0)
57 }
58 #[doc = "Bit 3 - RX Buffer Full Interrupt Flag"]
59 #[inline(always)]
60 pub fn rxfull(&self) -> RXFULL_R {
61 RXFULL_R::new(((self.bits >> 3) & 1) != 0)
62 }
63 #[doc = "Bit 4 - RX Overflow Interrupt Flag"]
64 #[inline(always)]
65 pub fn rxof(&self) -> RXOF_R {
66 RXOF_R::new(((self.bits >> 4) & 1) != 0)
67 }
68 #[doc = "Bit 5 - RX Underflow Interrupt Flag"]
69 #[inline(always)]
70 pub fn rxuf(&self) -> RXUF_R {
71 RXUF_R::new(((self.bits >> 5) & 1) != 0)
72 }
73 #[doc = "Bit 6 - TX Overflow Interrupt Flag"]
74 #[inline(always)]
75 pub fn txof(&self) -> TXOF_R {
76 TXOF_R::new(((self.bits >> 6) & 1) != 0)
77 }
78 #[doc = "Bit 7 - TX Underflow Interrupt Flag"]
79 #[inline(always)]
80 pub fn txuf(&self) -> TXUF_R {
81 TXUF_R::new(((self.bits >> 7) & 1) != 0)
82 }
83 #[doc = "Bit 8 - Parity Error Interrupt Flag"]
84 #[inline(always)]
85 pub fn perr(&self) -> PERR_R {
86 PERR_R::new(((self.bits >> 8) & 1) != 0)
87 }
88 #[doc = "Bit 9 - Framing Error Interrupt Flag"]
89 #[inline(always)]
90 pub fn ferr(&self) -> FERR_R {
91 FERR_R::new(((self.bits >> 9) & 1) != 0)
92 }
93 #[doc = "Bit 10 - Multi-Processor Address Frame Interrupt Flag"]
94 #[inline(always)]
95 pub fn mpaf(&self) -> MPAF_R {
96 MPAF_R::new(((self.bits >> 10) & 1) != 0)
97 }
98 #[doc = "Bit 11 - Slave-Select In Master Mode Interrupt Flag"]
99 #[inline(always)]
100 pub fn ssm(&self) -> SSM_R {
101 SSM_R::new(((self.bits >> 11) & 1) != 0)
102 }
103 #[doc = "Bit 12 - Collision Check Fail Interrupt Flag"]
104 #[inline(always)]
105 pub fn ccf(&self) -> CCF_R {
106 CCF_R::new(((self.bits >> 12) & 1) != 0)
107 }
108}
109#[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"]
110pub struct IF_SPEC;
111impl crate::RegisterSpec for IF_SPEC {
112 type Ux = u32;
113}
114#[doc = "`read()` method returns [if_::R](R) reader structure"]
115impl crate::Readable for IF_SPEC {
116 type Reader = R;
117}
118#[doc = "`reset()` method sets IF to value 0x02"]
119impl crate::Resettable for IF_SPEC {
120 #[inline(always)]
121 fn reset_value() -> Self::Ux {
122 0x02
123 }
124}