efm32tg11b_pac/efm32tg11b540/i2c1/
ifc.rs

1#[doc = "Register `IFC` writer"]
2pub struct W(crate::W<IFC_SPEC>);
3impl core::ops::Deref for W {
4    type Target = crate::W<IFC_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl core::ops::DerefMut for W {
11    #[inline(always)]
12    fn deref_mut(&mut self) -> &mut Self::Target {
13        &mut self.0
14    }
15}
16impl From<crate::W<IFC_SPEC>> for W {
17    #[inline(always)]
18    fn from(writer: crate::W<IFC_SPEC>) -> Self {
19        W(writer)
20    }
21}
22#[doc = "Field `START` writer - Clear START Interrupt Flag"]
23pub type START_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
24#[doc = "Field `RSTART` writer - Clear RSTART Interrupt Flag"]
25pub type RSTART_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
26#[doc = "Field `ADDR` writer - Clear ADDR Interrupt Flag"]
27pub type ADDR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
28#[doc = "Field `TXC` writer - Clear TXC Interrupt Flag"]
29pub type TXC_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
30#[doc = "Field `ACK` writer - Clear ACK Interrupt Flag"]
31pub type ACK_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
32#[doc = "Field `NACK` writer - Clear NACK Interrupt Flag"]
33pub type NACK_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
34#[doc = "Field `MSTOP` writer - Clear MSTOP Interrupt Flag"]
35pub type MSTOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
36#[doc = "Field `ARBLOST` writer - Clear ARBLOST Interrupt Flag"]
37pub type ARBLOST_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
38#[doc = "Field `BUSERR` writer - Clear BUSERR Interrupt Flag"]
39pub type BUSERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
40#[doc = "Field `BUSHOLD` writer - Clear BUSHOLD Interrupt Flag"]
41pub type BUSHOLD_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
42#[doc = "Field `TXOF` writer - Clear TXOF Interrupt Flag"]
43pub type TXOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
44#[doc = "Field `RXUF` writer - Clear RXUF Interrupt Flag"]
45pub type RXUF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
46#[doc = "Field `BITO` writer - Clear BITO Interrupt Flag"]
47pub type BITO_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
48#[doc = "Field `CLTO` writer - Clear CLTO Interrupt Flag"]
49pub type CLTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
50#[doc = "Field `SSTOP` writer - Clear SSTOP Interrupt Flag"]
51pub type SSTOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
52#[doc = "Field `RXFULL` writer - Clear RXFULL Interrupt Flag"]
53pub type RXFULL_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
54#[doc = "Field `CLERR` writer - Clear CLERR Interrupt Flag"]
55pub type CLERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
56impl W {
57    #[doc = "Bit 0 - Clear START Interrupt Flag"]
58    #[inline(always)]
59    #[must_use]
60    pub fn start(&mut self) -> START_W<0> {
61        START_W::new(self)
62    }
63    #[doc = "Bit 1 - Clear RSTART Interrupt Flag"]
64    #[inline(always)]
65    #[must_use]
66    pub fn rstart(&mut self) -> RSTART_W<1> {
67        RSTART_W::new(self)
68    }
69    #[doc = "Bit 2 - Clear ADDR Interrupt Flag"]
70    #[inline(always)]
71    #[must_use]
72    pub fn addr(&mut self) -> ADDR_W<2> {
73        ADDR_W::new(self)
74    }
75    #[doc = "Bit 3 - Clear TXC Interrupt Flag"]
76    #[inline(always)]
77    #[must_use]
78    pub fn txc(&mut self) -> TXC_W<3> {
79        TXC_W::new(self)
80    }
81    #[doc = "Bit 6 - Clear ACK Interrupt Flag"]
82    #[inline(always)]
83    #[must_use]
84    pub fn ack(&mut self) -> ACK_W<6> {
85        ACK_W::new(self)
86    }
87    #[doc = "Bit 7 - Clear NACK Interrupt Flag"]
88    #[inline(always)]
89    #[must_use]
90    pub fn nack(&mut self) -> NACK_W<7> {
91        NACK_W::new(self)
92    }
93    #[doc = "Bit 8 - Clear MSTOP Interrupt Flag"]
94    #[inline(always)]
95    #[must_use]
96    pub fn mstop(&mut self) -> MSTOP_W<8> {
97        MSTOP_W::new(self)
98    }
99    #[doc = "Bit 9 - Clear ARBLOST Interrupt Flag"]
100    #[inline(always)]
101    #[must_use]
102    pub fn arblost(&mut self) -> ARBLOST_W<9> {
103        ARBLOST_W::new(self)
104    }
105    #[doc = "Bit 10 - Clear BUSERR Interrupt Flag"]
106    #[inline(always)]
107    #[must_use]
108    pub fn buserr(&mut self) -> BUSERR_W<10> {
109        BUSERR_W::new(self)
110    }
111    #[doc = "Bit 11 - Clear BUSHOLD Interrupt Flag"]
112    #[inline(always)]
113    #[must_use]
114    pub fn bushold(&mut self) -> BUSHOLD_W<11> {
115        BUSHOLD_W::new(self)
116    }
117    #[doc = "Bit 12 - Clear TXOF Interrupt Flag"]
118    #[inline(always)]
119    #[must_use]
120    pub fn txof(&mut self) -> TXOF_W<12> {
121        TXOF_W::new(self)
122    }
123    #[doc = "Bit 13 - Clear RXUF Interrupt Flag"]
124    #[inline(always)]
125    #[must_use]
126    pub fn rxuf(&mut self) -> RXUF_W<13> {
127        RXUF_W::new(self)
128    }
129    #[doc = "Bit 14 - Clear BITO Interrupt Flag"]
130    #[inline(always)]
131    #[must_use]
132    pub fn bito(&mut self) -> BITO_W<14> {
133        BITO_W::new(self)
134    }
135    #[doc = "Bit 15 - Clear CLTO Interrupt Flag"]
136    #[inline(always)]
137    #[must_use]
138    pub fn clto(&mut self) -> CLTO_W<15> {
139        CLTO_W::new(self)
140    }
141    #[doc = "Bit 16 - Clear SSTOP Interrupt Flag"]
142    #[inline(always)]
143    #[must_use]
144    pub fn sstop(&mut self) -> SSTOP_W<16> {
145        SSTOP_W::new(self)
146    }
147    #[doc = "Bit 17 - Clear RXFULL Interrupt Flag"]
148    #[inline(always)]
149    #[must_use]
150    pub fn rxfull(&mut self) -> RXFULL_W<17> {
151        RXFULL_W::new(self)
152    }
153    #[doc = "Bit 18 - Clear CLERR Interrupt Flag"]
154    #[inline(always)]
155    #[must_use]
156    pub fn clerr(&mut self) -> CLERR_W<18> {
157        CLERR_W::new(self)
158    }
159    #[doc = "Writes raw bits to the register."]
160    #[inline(always)]
161    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
162        self.0.bits(bits);
163        self
164    }
165}
166#[doc = "Interrupt Flag Clear Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ifc](index.html) module"]
167pub struct IFC_SPEC;
168impl crate::RegisterSpec for IFC_SPEC {
169    type Ux = u32;
170}
171#[doc = "`write(|w| ..)` method takes [ifc::W](W) writer structure"]
172impl crate::Writable for IFC_SPEC {
173    type Writer = W;
174    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
175    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
176}
177#[doc = "`reset()` method sets IFC to value 0"]
178impl crate::Resettable for IFC_SPEC {
179    const RESET_VALUE: Self::Ux = 0;
180}