efm32zg110_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>;
50impl R {
51 #[doc = "Bit 0 - START condition Interrupt Flag"]
52 #[inline(always)]
53 pub fn start(&self) -> START_R {
54 START_R::new((self.bits & 1) != 0)
55 }
56 #[doc = "Bit 1 - Repeated START condition Interrupt Flag"]
57 #[inline(always)]
58 pub fn rstart(&self) -> RSTART_R {
59 RSTART_R::new(((self.bits >> 1) & 1) != 0)
60 }
61 #[doc = "Bit 2 - Address Interrupt Flag"]
62 #[inline(always)]
63 pub fn addr(&self) -> ADDR_R {
64 ADDR_R::new(((self.bits >> 2) & 1) != 0)
65 }
66 #[doc = "Bit 3 - Transfer Completed Interrupt Flag"]
67 #[inline(always)]
68 pub fn txc(&self) -> TXC_R {
69 TXC_R::new(((self.bits >> 3) & 1) != 0)
70 }
71 #[doc = "Bit 4 - Transmit Buffer Level Interrupt Flag"]
72 #[inline(always)]
73 pub fn txbl(&self) -> TXBL_R {
74 TXBL_R::new(((self.bits >> 4) & 1) != 0)
75 }
76 #[doc = "Bit 5 - Receive Data Valid Interrupt Flag"]
77 #[inline(always)]
78 pub fn rxdatav(&self) -> RXDATAV_R {
79 RXDATAV_R::new(((self.bits >> 5) & 1) != 0)
80 }
81 #[doc = "Bit 6 - Acknowledge Received Interrupt Flag"]
82 #[inline(always)]
83 pub fn ack(&self) -> ACK_R {
84 ACK_R::new(((self.bits >> 6) & 1) != 0)
85 }
86 #[doc = "Bit 7 - Not Acknowledge Received Interrupt Flag"]
87 #[inline(always)]
88 pub fn nack(&self) -> NACK_R {
89 NACK_R::new(((self.bits >> 7) & 1) != 0)
90 }
91 #[doc = "Bit 8 - Master STOP Condition Interrupt Flag"]
92 #[inline(always)]
93 pub fn mstop(&self) -> MSTOP_R {
94 MSTOP_R::new(((self.bits >> 8) & 1) != 0)
95 }
96 #[doc = "Bit 9 - Arbitration Lost Interrupt Flag"]
97 #[inline(always)]
98 pub fn arblost(&self) -> ARBLOST_R {
99 ARBLOST_R::new(((self.bits >> 9) & 1) != 0)
100 }
101 #[doc = "Bit 10 - Bus Error Interrupt Flag"]
102 #[inline(always)]
103 pub fn buserr(&self) -> BUSERR_R {
104 BUSERR_R::new(((self.bits >> 10) & 1) != 0)
105 }
106 #[doc = "Bit 11 - Bus Held Interrupt Flag"]
107 #[inline(always)]
108 pub fn bushold(&self) -> BUSHOLD_R {
109 BUSHOLD_R::new(((self.bits >> 11) & 1) != 0)
110 }
111 #[doc = "Bit 12 - Transmit Buffer Overflow Interrupt Flag"]
112 #[inline(always)]
113 pub fn txof(&self) -> TXOF_R {
114 TXOF_R::new(((self.bits >> 12) & 1) != 0)
115 }
116 #[doc = "Bit 13 - Receive Buffer Underflow Interrupt Flag"]
117 #[inline(always)]
118 pub fn rxuf(&self) -> RXUF_R {
119 RXUF_R::new(((self.bits >> 13) & 1) != 0)
120 }
121 #[doc = "Bit 14 - Bus Idle Timeout Interrupt Flag"]
122 #[inline(always)]
123 pub fn bito(&self) -> BITO_R {
124 BITO_R::new(((self.bits >> 14) & 1) != 0)
125 }
126 #[doc = "Bit 15 - Clock Low Timeout Interrupt Flag"]
127 #[inline(always)]
128 pub fn clto(&self) -> CLTO_R {
129 CLTO_R::new(((self.bits >> 15) & 1) != 0)
130 }
131 #[doc = "Bit 16 - Slave STOP condition Interrupt Flag"]
132 #[inline(always)]
133 pub fn sstop(&self) -> SSTOP_R {
134 SSTOP_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 0x10"]
147impl crate::Resettable for IF_SPEC {
148 #[inline(always)]
149 fn reset_value() -> Self::Ux {
150 0x10
151 }
152}