efm32gg_pac/efm32gg230/lesense/
ien.rs

1#[doc = "Register `IEN` reader"]
2pub struct R(crate::R<IEN_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<IEN_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<IEN_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<IEN_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `IEN` writer"]
17pub struct W(crate::W<IEN_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<IEN_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<IEN_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<IEN_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `CH0` reader - "]
38pub type CH0_R = crate::BitReader<bool>;
39#[doc = "Field `CH0` writer - "]
40pub type CH0_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
41#[doc = "Field `CH1` reader - "]
42pub type CH1_R = crate::BitReader<bool>;
43#[doc = "Field `CH1` writer - "]
44pub type CH1_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
45#[doc = "Field `CH2` reader - "]
46pub type CH2_R = crate::BitReader<bool>;
47#[doc = "Field `CH2` writer - "]
48pub type CH2_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
49#[doc = "Field `CH3` reader - "]
50pub type CH3_R = crate::BitReader<bool>;
51#[doc = "Field `CH3` writer - "]
52pub type CH3_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
53#[doc = "Field `CH4` reader - "]
54pub type CH4_R = crate::BitReader<bool>;
55#[doc = "Field `CH4` writer - "]
56pub type CH4_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
57#[doc = "Field `CH5` reader - "]
58pub type CH5_R = crate::BitReader<bool>;
59#[doc = "Field `CH5` writer - "]
60pub type CH5_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
61#[doc = "Field `CH6` reader - "]
62pub type CH6_R = crate::BitReader<bool>;
63#[doc = "Field `CH6` writer - "]
64pub type CH6_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
65#[doc = "Field `CH7` reader - "]
66pub type CH7_R = crate::BitReader<bool>;
67#[doc = "Field `CH7` writer - "]
68pub type CH7_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
69#[doc = "Field `CH8` reader - "]
70pub type CH8_R = crate::BitReader<bool>;
71#[doc = "Field `CH8` writer - "]
72pub type CH8_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
73#[doc = "Field `CH9` reader - "]
74pub type CH9_R = crate::BitReader<bool>;
75#[doc = "Field `CH9` writer - "]
76pub type CH9_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
77#[doc = "Field `CH10` reader - "]
78pub type CH10_R = crate::BitReader<bool>;
79#[doc = "Field `CH10` writer - "]
80pub type CH10_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
81#[doc = "Field `CH11` reader - "]
82pub type CH11_R = crate::BitReader<bool>;
83#[doc = "Field `CH11` writer - "]
84pub type CH11_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
85#[doc = "Field `CH12` reader - "]
86pub type CH12_R = crate::BitReader<bool>;
87#[doc = "Field `CH12` writer - "]
88pub type CH12_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
89#[doc = "Field `CH13` reader - "]
90pub type CH13_R = crate::BitReader<bool>;
91#[doc = "Field `CH13` writer - "]
92pub type CH13_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
93#[doc = "Field `CH14` reader - "]
94pub type CH14_R = crate::BitReader<bool>;
95#[doc = "Field `CH14` writer - "]
96pub type CH14_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
97#[doc = "Field `CH15` reader - "]
98pub type CH15_R = crate::BitReader<bool>;
99#[doc = "Field `CH15` writer - "]
100pub type CH15_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
101#[doc = "Field `SCANCOMPLETE` reader - "]
102pub type SCANCOMPLETE_R = crate::BitReader<bool>;
103#[doc = "Field `SCANCOMPLETE` writer - "]
104pub type SCANCOMPLETE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
105#[doc = "Field `DEC` reader - "]
106pub type DEC_R = crate::BitReader<bool>;
107#[doc = "Field `DEC` writer - "]
108pub type DEC_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
109#[doc = "Field `DECERR` reader - "]
110pub type DECERR_R = crate::BitReader<bool>;
111#[doc = "Field `DECERR` writer - "]
112pub type DECERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
113#[doc = "Field `BUFDATAV` reader - "]
114pub type BUFDATAV_R = crate::BitReader<bool>;
115#[doc = "Field `BUFDATAV` writer - "]
116pub type BUFDATAV_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
117#[doc = "Field `BUFLEVEL` reader - "]
118pub type BUFLEVEL_R = crate::BitReader<bool>;
119#[doc = "Field `BUFLEVEL` writer - "]
120pub type BUFLEVEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
121#[doc = "Field `BUFOF` reader - "]
122pub type BUFOF_R = crate::BitReader<bool>;
123#[doc = "Field `BUFOF` writer - "]
124pub type BUFOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
125#[doc = "Field `CNTOF` reader - "]
126pub type CNTOF_R = crate::BitReader<bool>;
127#[doc = "Field `CNTOF` writer - "]
128pub type CNTOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
129impl R {
130    #[doc = "Bit 0"]
131    #[inline(always)]
132    pub fn ch0(&self) -> CH0_R {
133        CH0_R::new((self.bits & 1) != 0)
134    }
135    #[doc = "Bit 1"]
136    #[inline(always)]
137    pub fn ch1(&self) -> CH1_R {
138        CH1_R::new(((self.bits >> 1) & 1) != 0)
139    }
140    #[doc = "Bit 2"]
141    #[inline(always)]
142    pub fn ch2(&self) -> CH2_R {
143        CH2_R::new(((self.bits >> 2) & 1) != 0)
144    }
145    #[doc = "Bit 3"]
146    #[inline(always)]
147    pub fn ch3(&self) -> CH3_R {
148        CH3_R::new(((self.bits >> 3) & 1) != 0)
149    }
150    #[doc = "Bit 4"]
151    #[inline(always)]
152    pub fn ch4(&self) -> CH4_R {
153        CH4_R::new(((self.bits >> 4) & 1) != 0)
154    }
155    #[doc = "Bit 5"]
156    #[inline(always)]
157    pub fn ch5(&self) -> CH5_R {
158        CH5_R::new(((self.bits >> 5) & 1) != 0)
159    }
160    #[doc = "Bit 6"]
161    #[inline(always)]
162    pub fn ch6(&self) -> CH6_R {
163        CH6_R::new(((self.bits >> 6) & 1) != 0)
164    }
165    #[doc = "Bit 7"]
166    #[inline(always)]
167    pub fn ch7(&self) -> CH7_R {
168        CH7_R::new(((self.bits >> 7) & 1) != 0)
169    }
170    #[doc = "Bit 8"]
171    #[inline(always)]
172    pub fn ch8(&self) -> CH8_R {
173        CH8_R::new(((self.bits >> 8) & 1) != 0)
174    }
175    #[doc = "Bit 9"]
176    #[inline(always)]
177    pub fn ch9(&self) -> CH9_R {
178        CH9_R::new(((self.bits >> 9) & 1) != 0)
179    }
180    #[doc = "Bit 10"]
181    #[inline(always)]
182    pub fn ch10(&self) -> CH10_R {
183        CH10_R::new(((self.bits >> 10) & 1) != 0)
184    }
185    #[doc = "Bit 11"]
186    #[inline(always)]
187    pub fn ch11(&self) -> CH11_R {
188        CH11_R::new(((self.bits >> 11) & 1) != 0)
189    }
190    #[doc = "Bit 12"]
191    #[inline(always)]
192    pub fn ch12(&self) -> CH12_R {
193        CH12_R::new(((self.bits >> 12) & 1) != 0)
194    }
195    #[doc = "Bit 13"]
196    #[inline(always)]
197    pub fn ch13(&self) -> CH13_R {
198        CH13_R::new(((self.bits >> 13) & 1) != 0)
199    }
200    #[doc = "Bit 14"]
201    #[inline(always)]
202    pub fn ch14(&self) -> CH14_R {
203        CH14_R::new(((self.bits >> 14) & 1) != 0)
204    }
205    #[doc = "Bit 15"]
206    #[inline(always)]
207    pub fn ch15(&self) -> CH15_R {
208        CH15_R::new(((self.bits >> 15) & 1) != 0)
209    }
210    #[doc = "Bit 16"]
211    #[inline(always)]
212    pub fn scancomplete(&self) -> SCANCOMPLETE_R {
213        SCANCOMPLETE_R::new(((self.bits >> 16) & 1) != 0)
214    }
215    #[doc = "Bit 17"]
216    #[inline(always)]
217    pub fn dec(&self) -> DEC_R {
218        DEC_R::new(((self.bits >> 17) & 1) != 0)
219    }
220    #[doc = "Bit 18"]
221    #[inline(always)]
222    pub fn decerr(&self) -> DECERR_R {
223        DECERR_R::new(((self.bits >> 18) & 1) != 0)
224    }
225    #[doc = "Bit 19"]
226    #[inline(always)]
227    pub fn bufdatav(&self) -> BUFDATAV_R {
228        BUFDATAV_R::new(((self.bits >> 19) & 1) != 0)
229    }
230    #[doc = "Bit 20"]
231    #[inline(always)]
232    pub fn buflevel(&self) -> BUFLEVEL_R {
233        BUFLEVEL_R::new(((self.bits >> 20) & 1) != 0)
234    }
235    #[doc = "Bit 21"]
236    #[inline(always)]
237    pub fn bufof(&self) -> BUFOF_R {
238        BUFOF_R::new(((self.bits >> 21) & 1) != 0)
239    }
240    #[doc = "Bit 22"]
241    #[inline(always)]
242    pub fn cntof(&self) -> CNTOF_R {
243        CNTOF_R::new(((self.bits >> 22) & 1) != 0)
244    }
245}
246impl W {
247    #[doc = "Bit 0"]
248    #[inline(always)]
249    #[must_use]
250    pub fn ch0(&mut self) -> CH0_W<0> {
251        CH0_W::new(self)
252    }
253    #[doc = "Bit 1"]
254    #[inline(always)]
255    #[must_use]
256    pub fn ch1(&mut self) -> CH1_W<1> {
257        CH1_W::new(self)
258    }
259    #[doc = "Bit 2"]
260    #[inline(always)]
261    #[must_use]
262    pub fn ch2(&mut self) -> CH2_W<2> {
263        CH2_W::new(self)
264    }
265    #[doc = "Bit 3"]
266    #[inline(always)]
267    #[must_use]
268    pub fn ch3(&mut self) -> CH3_W<3> {
269        CH3_W::new(self)
270    }
271    #[doc = "Bit 4"]
272    #[inline(always)]
273    #[must_use]
274    pub fn ch4(&mut self) -> CH4_W<4> {
275        CH4_W::new(self)
276    }
277    #[doc = "Bit 5"]
278    #[inline(always)]
279    #[must_use]
280    pub fn ch5(&mut self) -> CH5_W<5> {
281        CH5_W::new(self)
282    }
283    #[doc = "Bit 6"]
284    #[inline(always)]
285    #[must_use]
286    pub fn ch6(&mut self) -> CH6_W<6> {
287        CH6_W::new(self)
288    }
289    #[doc = "Bit 7"]
290    #[inline(always)]
291    #[must_use]
292    pub fn ch7(&mut self) -> CH7_W<7> {
293        CH7_W::new(self)
294    }
295    #[doc = "Bit 8"]
296    #[inline(always)]
297    #[must_use]
298    pub fn ch8(&mut self) -> CH8_W<8> {
299        CH8_W::new(self)
300    }
301    #[doc = "Bit 9"]
302    #[inline(always)]
303    #[must_use]
304    pub fn ch9(&mut self) -> CH9_W<9> {
305        CH9_W::new(self)
306    }
307    #[doc = "Bit 10"]
308    #[inline(always)]
309    #[must_use]
310    pub fn ch10(&mut self) -> CH10_W<10> {
311        CH10_W::new(self)
312    }
313    #[doc = "Bit 11"]
314    #[inline(always)]
315    #[must_use]
316    pub fn ch11(&mut self) -> CH11_W<11> {
317        CH11_W::new(self)
318    }
319    #[doc = "Bit 12"]
320    #[inline(always)]
321    #[must_use]
322    pub fn ch12(&mut self) -> CH12_W<12> {
323        CH12_W::new(self)
324    }
325    #[doc = "Bit 13"]
326    #[inline(always)]
327    #[must_use]
328    pub fn ch13(&mut self) -> CH13_W<13> {
329        CH13_W::new(self)
330    }
331    #[doc = "Bit 14"]
332    #[inline(always)]
333    #[must_use]
334    pub fn ch14(&mut self) -> CH14_W<14> {
335        CH14_W::new(self)
336    }
337    #[doc = "Bit 15"]
338    #[inline(always)]
339    #[must_use]
340    pub fn ch15(&mut self) -> CH15_W<15> {
341        CH15_W::new(self)
342    }
343    #[doc = "Bit 16"]
344    #[inline(always)]
345    #[must_use]
346    pub fn scancomplete(&mut self) -> SCANCOMPLETE_W<16> {
347        SCANCOMPLETE_W::new(self)
348    }
349    #[doc = "Bit 17"]
350    #[inline(always)]
351    #[must_use]
352    pub fn dec(&mut self) -> DEC_W<17> {
353        DEC_W::new(self)
354    }
355    #[doc = "Bit 18"]
356    #[inline(always)]
357    #[must_use]
358    pub fn decerr(&mut self) -> DECERR_W<18> {
359        DECERR_W::new(self)
360    }
361    #[doc = "Bit 19"]
362    #[inline(always)]
363    #[must_use]
364    pub fn bufdatav(&mut self) -> BUFDATAV_W<19> {
365        BUFDATAV_W::new(self)
366    }
367    #[doc = "Bit 20"]
368    #[inline(always)]
369    #[must_use]
370    pub fn buflevel(&mut self) -> BUFLEVEL_W<20> {
371        BUFLEVEL_W::new(self)
372    }
373    #[doc = "Bit 21"]
374    #[inline(always)]
375    #[must_use]
376    pub fn bufof(&mut self) -> BUFOF_W<21> {
377        BUFOF_W::new(self)
378    }
379    #[doc = "Bit 22"]
380    #[inline(always)]
381    #[must_use]
382    pub fn cntof(&mut self) -> CNTOF_W<22> {
383        CNTOF_W::new(self)
384    }
385    #[doc = "Writes raw bits to the register."]
386    #[inline(always)]
387    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
388        self.0.bits(bits);
389        self
390    }
391}
392#[doc = "Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ien](index.html) module"]
393pub struct IEN_SPEC;
394impl crate::RegisterSpec for IEN_SPEC {
395    type Ux = u32;
396}
397#[doc = "`read()` method returns [ien::R](R) reader structure"]
398impl crate::Readable for IEN_SPEC {
399    type Reader = R;
400}
401#[doc = "`write(|w| ..)` method takes [ien::W](W) writer structure"]
402impl crate::Writable for IEN_SPEC {
403    type Writer = W;
404    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
405    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
406}
407#[doc = "`reset()` method sets IEN to value 0"]
408impl crate::Resettable for IEN_SPEC {
409    const RESET_VALUE: Self::Ux = 0;
410}