efm32wg280_pac/lesense/
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 `CH0` writer - "]
23pub type CH0_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 0>;
24#[doc = "Field `CH1` writer - "]
25pub type CH1_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 1>;
26#[doc = "Field `CH2` writer - "]
27pub type CH2_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 2>;
28#[doc = "Field `CH3` writer - "]
29pub type CH3_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 3>;
30#[doc = "Field `CH4` writer - "]
31pub type CH4_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 4>;
32#[doc = "Field `CH5` writer - "]
33pub type CH5_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 5>;
34#[doc = "Field `CH6` writer - "]
35pub type CH6_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 6>;
36#[doc = "Field `CH7` writer - "]
37pub type CH7_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 7>;
38#[doc = "Field `CH8` writer - "]
39pub type CH8_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 8>;
40#[doc = "Field `CH9` writer - "]
41pub type CH9_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 9>;
42#[doc = "Field `CH10` writer - "]
43pub type CH10_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 10>;
44#[doc = "Field `CH11` writer - "]
45pub type CH11_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 11>;
46#[doc = "Field `CH12` writer - "]
47pub type CH12_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 12>;
48#[doc = "Field `CH13` writer - "]
49pub type CH13_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 13>;
50#[doc = "Field `CH14` writer - "]
51pub type CH14_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 14>;
52#[doc = "Field `CH15` writer - "]
53pub type CH15_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 15>;
54#[doc = "Field `SCANCOMPLETE` writer - "]
55pub type SCANCOMPLETE_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 16>;
56#[doc = "Field `DEC` writer - "]
57pub type DEC_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 17>;
58#[doc = "Field `DECERR` writer - "]
59pub type DECERR_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 18>;
60#[doc = "Field `BUFDATAV` writer - "]
61pub type BUFDATAV_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 19>;
62#[doc = "Field `BUFLEVEL` writer - "]
63pub type BUFLEVEL_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 20>;
64#[doc = "Field `BUFOF` writer - "]
65pub type BUFOF_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 21>;
66#[doc = "Field `CNTOF` writer - "]
67pub type CNTOF_W<'a> = crate::BitWriter<'a, u32, IFC_SPEC, bool, 22>;
68impl W {
69    #[doc = "Bit 0"]
70    #[inline(always)]
71    pub fn ch0(&mut self) -> CH0_W {
72        CH0_W::new(self)
73    }
74    #[doc = "Bit 1"]
75    #[inline(always)]
76    pub fn ch1(&mut self) -> CH1_W {
77        CH1_W::new(self)
78    }
79    #[doc = "Bit 2"]
80    #[inline(always)]
81    pub fn ch2(&mut self) -> CH2_W {
82        CH2_W::new(self)
83    }
84    #[doc = "Bit 3"]
85    #[inline(always)]
86    pub fn ch3(&mut self) -> CH3_W {
87        CH3_W::new(self)
88    }
89    #[doc = "Bit 4"]
90    #[inline(always)]
91    pub fn ch4(&mut self) -> CH4_W {
92        CH4_W::new(self)
93    }
94    #[doc = "Bit 5"]
95    #[inline(always)]
96    pub fn ch5(&mut self) -> CH5_W {
97        CH5_W::new(self)
98    }
99    #[doc = "Bit 6"]
100    #[inline(always)]
101    pub fn ch6(&mut self) -> CH6_W {
102        CH6_W::new(self)
103    }
104    #[doc = "Bit 7"]
105    #[inline(always)]
106    pub fn ch7(&mut self) -> CH7_W {
107        CH7_W::new(self)
108    }
109    #[doc = "Bit 8"]
110    #[inline(always)]
111    pub fn ch8(&mut self) -> CH8_W {
112        CH8_W::new(self)
113    }
114    #[doc = "Bit 9"]
115    #[inline(always)]
116    pub fn ch9(&mut self) -> CH9_W {
117        CH9_W::new(self)
118    }
119    #[doc = "Bit 10"]
120    #[inline(always)]
121    pub fn ch10(&mut self) -> CH10_W {
122        CH10_W::new(self)
123    }
124    #[doc = "Bit 11"]
125    #[inline(always)]
126    pub fn ch11(&mut self) -> CH11_W {
127        CH11_W::new(self)
128    }
129    #[doc = "Bit 12"]
130    #[inline(always)]
131    pub fn ch12(&mut self) -> CH12_W {
132        CH12_W::new(self)
133    }
134    #[doc = "Bit 13"]
135    #[inline(always)]
136    pub fn ch13(&mut self) -> CH13_W {
137        CH13_W::new(self)
138    }
139    #[doc = "Bit 14"]
140    #[inline(always)]
141    pub fn ch14(&mut self) -> CH14_W {
142        CH14_W::new(self)
143    }
144    #[doc = "Bit 15"]
145    #[inline(always)]
146    pub fn ch15(&mut self) -> CH15_W {
147        CH15_W::new(self)
148    }
149    #[doc = "Bit 16"]
150    #[inline(always)]
151    pub fn scancomplete(&mut self) -> SCANCOMPLETE_W {
152        SCANCOMPLETE_W::new(self)
153    }
154    #[doc = "Bit 17"]
155    #[inline(always)]
156    pub fn dec(&mut self) -> DEC_W {
157        DEC_W::new(self)
158    }
159    #[doc = "Bit 18"]
160    #[inline(always)]
161    pub fn decerr(&mut self) -> DECERR_W {
162        DECERR_W::new(self)
163    }
164    #[doc = "Bit 19"]
165    #[inline(always)]
166    pub fn bufdatav(&mut self) -> BUFDATAV_W {
167        BUFDATAV_W::new(self)
168    }
169    #[doc = "Bit 20"]
170    #[inline(always)]
171    pub fn buflevel(&mut self) -> BUFLEVEL_W {
172        BUFLEVEL_W::new(self)
173    }
174    #[doc = "Bit 21"]
175    #[inline(always)]
176    pub fn bufof(&mut self) -> BUFOF_W {
177        BUFOF_W::new(self)
178    }
179    #[doc = "Bit 22"]
180    #[inline(always)]
181    pub fn cntof(&mut self) -> CNTOF_W {
182        CNTOF_W::new(self)
183    }
184    #[doc = "Writes raw bits to the register."]
185    #[inline(always)]
186    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
187        self.0.bits(bits);
188        self
189    }
190}
191#[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"]
192pub struct IFC_SPEC;
193impl crate::RegisterSpec for IFC_SPEC {
194    type Ux = u32;
195}
196#[doc = "`write(|w| ..)` method takes [ifc::W](W) writer structure"]
197impl crate::Writable for IFC_SPEC {
198    type Writer = W;
199}
200#[doc = "`reset()` method sets IFC to value 0"]
201impl crate::Resettable for IFC_SPEC {
202    #[inline(always)]
203    fn reset_value() -> Self::Ux {
204        0
205    }
206}