efm32wg942_pac/leuart1/
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 `RXOF` reader - RX Overflow Interrupt Flag"]
23pub type RXOF_R = crate::BitReader<bool>;
24#[doc = "Field `RXUF` reader - RX Underflow Interrupt Flag"]
25pub type RXUF_R = crate::BitReader<bool>;
26#[doc = "Field `TXOF` reader - TX Overflow Interrupt Flag"]
27pub type TXOF_R = crate::BitReader<bool>;
28#[doc = "Field `PERR` reader - Parity Error Interrupt Flag"]
29pub type PERR_R = crate::BitReader<bool>;
30#[doc = "Field `FERR` reader - Framing Error Interrupt Flag"]
31pub type FERR_R = crate::BitReader<bool>;
32#[doc = "Field `MPAF` reader - Multi-Processor Address Frame Interrupt Flag"]
33pub type MPAF_R = crate::BitReader<bool>;
34#[doc = "Field `STARTF` reader - Start Frame Interrupt Flag"]
35pub type STARTF_R = crate::BitReader<bool>;
36#[doc = "Field `SIGF` reader - Signal Frame Interrupt Flag"]
37pub type SIGF_R = crate::BitReader<bool>;
38impl R {
39 #[doc = "Bit 0 - TX Complete Interrupt Flag"]
40 #[inline(always)]
41 pub fn txc(&self) -> TXC_R {
42 TXC_R::new((self.bits & 1) != 0)
43 }
44 #[doc = "Bit 1 - TX Buffer Level Interrupt Flag"]
45 #[inline(always)]
46 pub fn txbl(&self) -> TXBL_R {
47 TXBL_R::new(((self.bits >> 1) & 1) != 0)
48 }
49 #[doc = "Bit 2 - RX Data Valid Interrupt Flag"]
50 #[inline(always)]
51 pub fn rxdatav(&self) -> RXDATAV_R {
52 RXDATAV_R::new(((self.bits >> 2) & 1) != 0)
53 }
54 #[doc = "Bit 3 - RX Overflow Interrupt Flag"]
55 #[inline(always)]
56 pub fn rxof(&self) -> RXOF_R {
57 RXOF_R::new(((self.bits >> 3) & 1) != 0)
58 }
59 #[doc = "Bit 4 - RX Underflow Interrupt Flag"]
60 #[inline(always)]
61 pub fn rxuf(&self) -> RXUF_R {
62 RXUF_R::new(((self.bits >> 4) & 1) != 0)
63 }
64 #[doc = "Bit 5 - TX Overflow Interrupt Flag"]
65 #[inline(always)]
66 pub fn txof(&self) -> TXOF_R {
67 TXOF_R::new(((self.bits >> 5) & 1) != 0)
68 }
69 #[doc = "Bit 6 - Parity Error Interrupt Flag"]
70 #[inline(always)]
71 pub fn perr(&self) -> PERR_R {
72 PERR_R::new(((self.bits >> 6) & 1) != 0)
73 }
74 #[doc = "Bit 7 - Framing Error Interrupt Flag"]
75 #[inline(always)]
76 pub fn ferr(&self) -> FERR_R {
77 FERR_R::new(((self.bits >> 7) & 1) != 0)
78 }
79 #[doc = "Bit 8 - Multi-Processor Address Frame Interrupt Flag"]
80 #[inline(always)]
81 pub fn mpaf(&self) -> MPAF_R {
82 MPAF_R::new(((self.bits >> 8) & 1) != 0)
83 }
84 #[doc = "Bit 9 - Start Frame Interrupt Flag"]
85 #[inline(always)]
86 pub fn startf(&self) -> STARTF_R {
87 STARTF_R::new(((self.bits >> 9) & 1) != 0)
88 }
89 #[doc = "Bit 10 - Signal Frame Interrupt Flag"]
90 #[inline(always)]
91 pub fn sigf(&self) -> SIGF_R {
92 SIGF_R::new(((self.bits >> 10) & 1) != 0)
93 }
94}
95#[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"]
96pub struct IF_SPEC;
97impl crate::RegisterSpec for IF_SPEC {
98 type Ux = u32;
99}
100#[doc = "`read()` method returns [if_::R](R) reader structure"]
101impl crate::Readable for IF_SPEC {
102 type Reader = R;
103}
104#[doc = "`reset()` method sets IF to value 0x02"]
105impl crate::Resettable for IF_SPEC {
106 #[inline(always)]
107 fn reset_value() -> Self::Ux {
108 0x02
109 }
110}