efm32pg1b200_pac/i2c0/
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 `START` reader - START Condition Interrupt Flag"]
17pub type START_R = crate::BitReader<bool>;
18#[doc = "Field `RSTART` reader - Repeated START Condition Interrupt Flag"]
19pub type RSTART_R = crate::BitReader<bool>;
20#[doc = "Field `ADDR` reader - Address Interrupt Flag"]
21pub type ADDR_R = crate::BitReader<bool>;
22#[doc = "Field `TXC` reader - Transfer Completed Interrupt Flag"]
23pub type TXC_R = crate::BitReader<bool>;
24#[doc = "Field `TXBL` reader - Transmit Buffer Level Interrupt Flag"]
25pub type TXBL_R = crate::BitReader<bool>;
26#[doc = "Field `RXDATAV` reader - Receive Data Valid Interrupt Flag"]
27pub type RXDATAV_R = crate::BitReader<bool>;
28#[doc = "Field `ACK` reader - Acknowledge Received Interrupt Flag"]
29pub type ACK_R = crate::BitReader<bool>;
30#[doc = "Field `NACK` reader - Not Acknowledge Received Interrupt Flag"]
31pub type NACK_R = crate::BitReader<bool>;
32#[doc = "Field `MSTOP` reader - Master STOP Condition Interrupt Flag"]
33pub type MSTOP_R = crate::BitReader<bool>;
34#[doc = "Field `ARBLOST` reader - Arbitration Lost Interrupt Flag"]
35pub type ARBLOST_R = crate::BitReader<bool>;
36#[doc = "Field `BUSERR` reader - Bus Error Interrupt Flag"]
37pub type BUSERR_R = crate::BitReader<bool>;
38#[doc = "Field `BUSHOLD` reader - Bus Held Interrupt Flag"]
39pub type BUSHOLD_R = crate::BitReader<bool>;
40#[doc = "Field `TXOF` reader - Transmit Buffer Overflow Interrupt Flag"]
41pub type TXOF_R = crate::BitReader<bool>;
42#[doc = "Field `RXUF` reader - Receive Buffer Underflow Interrupt Flag"]
43pub type RXUF_R = crate::BitReader<bool>;
44#[doc = "Field `BITO` reader - Bus Idle Timeout Interrupt Flag"]
45pub type BITO_R = crate::BitReader<bool>;
46#[doc = "Field `CLTO` reader - Clock Low Timeout Interrupt Flag"]
47pub type CLTO_R = crate::BitReader<bool>;
48#[doc = "Field `SSTOP` reader - Slave STOP Condition Interrupt Flag"]
49pub type SSTOP_R = crate::BitReader<bool>;
50#[doc = "Field `RXFULL` reader - Receive Buffer Full Interrupt Flag"]
51pub type RXFULL_R = crate::BitReader<bool>;
52#[doc = "Field `CLERR` reader - Clock Low Error Interrupt Flag"]
53pub type CLERR_R = crate::BitReader<bool>;
54impl R {
55 #[doc = "Bit 0 - START Condition Interrupt Flag"]
56 #[inline(always)]
57 pub fn start(&self) -> START_R {
58 START_R::new((self.bits & 1) != 0)
59 }
60 #[doc = "Bit 1 - Repeated START Condition Interrupt Flag"]
61 #[inline(always)]
62 pub fn rstart(&self) -> RSTART_R {
63 RSTART_R::new(((self.bits >> 1) & 1) != 0)
64 }
65 #[doc = "Bit 2 - Address Interrupt Flag"]
66 #[inline(always)]
67 pub fn addr(&self) -> ADDR_R {
68 ADDR_R::new(((self.bits >> 2) & 1) != 0)
69 }
70 #[doc = "Bit 3 - Transfer Completed Interrupt Flag"]
71 #[inline(always)]
72 pub fn txc(&self) -> TXC_R {
73 TXC_R::new(((self.bits >> 3) & 1) != 0)
74 }
75 #[doc = "Bit 4 - Transmit Buffer Level Interrupt Flag"]
76 #[inline(always)]
77 pub fn txbl(&self) -> TXBL_R {
78 TXBL_R::new(((self.bits >> 4) & 1) != 0)
79 }
80 #[doc = "Bit 5 - Receive Data Valid Interrupt Flag"]
81 #[inline(always)]
82 pub fn rxdatav(&self) -> RXDATAV_R {
83 RXDATAV_R::new(((self.bits >> 5) & 1) != 0)
84 }
85 #[doc = "Bit 6 - Acknowledge Received Interrupt Flag"]
86 #[inline(always)]
87 pub fn ack(&self) -> ACK_R {
88 ACK_R::new(((self.bits >> 6) & 1) != 0)
89 }
90 #[doc = "Bit 7 - Not Acknowledge Received Interrupt Flag"]
91 #[inline(always)]
92 pub fn nack(&self) -> NACK_R {
93 NACK_R::new(((self.bits >> 7) & 1) != 0)
94 }
95 #[doc = "Bit 8 - Master STOP Condition Interrupt Flag"]
96 #[inline(always)]
97 pub fn mstop(&self) -> MSTOP_R {
98 MSTOP_R::new(((self.bits >> 8) & 1) != 0)
99 }
100 #[doc = "Bit 9 - Arbitration Lost Interrupt Flag"]
101 #[inline(always)]
102 pub fn arblost(&self) -> ARBLOST_R {
103 ARBLOST_R::new(((self.bits >> 9) & 1) != 0)
104 }
105 #[doc = "Bit 10 - Bus Error Interrupt Flag"]
106 #[inline(always)]
107 pub fn buserr(&self) -> BUSERR_R {
108 BUSERR_R::new(((self.bits >> 10) & 1) != 0)
109 }
110 #[doc = "Bit 11 - Bus Held Interrupt Flag"]
111 #[inline(always)]
112 pub fn bushold(&self) -> BUSHOLD_R {
113 BUSHOLD_R::new(((self.bits >> 11) & 1) != 0)
114 }
115 #[doc = "Bit 12 - Transmit Buffer Overflow Interrupt Flag"]
116 #[inline(always)]
117 pub fn txof(&self) -> TXOF_R {
118 TXOF_R::new(((self.bits >> 12) & 1) != 0)
119 }
120 #[doc = "Bit 13 - Receive Buffer Underflow Interrupt Flag"]
121 #[inline(always)]
122 pub fn rxuf(&self) -> RXUF_R {
123 RXUF_R::new(((self.bits >> 13) & 1) != 0)
124 }
125 #[doc = "Bit 14 - Bus Idle Timeout Interrupt Flag"]
126 #[inline(always)]
127 pub fn bito(&self) -> BITO_R {
128 BITO_R::new(((self.bits >> 14) & 1) != 0)
129 }
130 #[doc = "Bit 15 - Clock Low Timeout Interrupt Flag"]
131 #[inline(always)]
132 pub fn clto(&self) -> CLTO_R {
133 CLTO_R::new(((self.bits >> 15) & 1) != 0)
134 }
135 #[doc = "Bit 16 - Slave STOP Condition Interrupt Flag"]
136 #[inline(always)]
137 pub fn sstop(&self) -> SSTOP_R {
138 SSTOP_R::new(((self.bits >> 16) & 1) != 0)
139 }
140 #[doc = "Bit 17 - Receive Buffer Full Interrupt Flag"]
141 #[inline(always)]
142 pub fn rxfull(&self) -> RXFULL_R {
143 RXFULL_R::new(((self.bits >> 17) & 1) != 0)
144 }
145 #[doc = "Bit 18 - Clock Low Error Interrupt Flag"]
146 #[inline(always)]
147 pub fn clerr(&self) -> CLERR_R {
148 CLERR_R::new(((self.bits >> 18) & 1) != 0)
149 }
150}
151#[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"]
152pub struct IF_SPEC;
153impl crate::RegisterSpec for IF_SPEC {
154 type Ux = u32;
155}
156#[doc = "`read()` method returns [if_::R](R) reader structure"]
157impl crate::Readable for IF_SPEC {
158 type Reader = R;
159}
160#[doc = "`reset()` method sets IF to value 0x10"]
161impl crate::Resettable for IF_SPEC {
162 #[inline(always)]
163 fn reset_value() -> Self::Ux {
164 0x10
165 }
166}