efm32gg12b510_pac/lesense/
if_.rs

1#[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 `CH0` reader - CH0 Interrupt Flag"]
17pub type CH0_R = crate::BitReader<bool>;
18#[doc = "Field `CH1` reader - CH1 Interrupt Flag"]
19pub type CH1_R = crate::BitReader<bool>;
20#[doc = "Field `CH2` reader - CH2 Interrupt Flag"]
21pub type CH2_R = crate::BitReader<bool>;
22#[doc = "Field `CH3` reader - CH3 Interrupt Flag"]
23pub type CH3_R = crate::BitReader<bool>;
24#[doc = "Field `CH4` reader - CH4 Interrupt Flag"]
25pub type CH4_R = crate::BitReader<bool>;
26#[doc = "Field `CH5` reader - CH5 Interrupt Flag"]
27pub type CH5_R = crate::BitReader<bool>;
28#[doc = "Field `CH6` reader - CH6 Interrupt Flag"]
29pub type CH6_R = crate::BitReader<bool>;
30#[doc = "Field `CH7` reader - CH7 Interrupt Flag"]
31pub type CH7_R = crate::BitReader<bool>;
32#[doc = "Field `CH8` reader - CH8 Interrupt Flag"]
33pub type CH8_R = crate::BitReader<bool>;
34#[doc = "Field `CH9` reader - CH9 Interrupt Flag"]
35pub type CH9_R = crate::BitReader<bool>;
36#[doc = "Field `CH10` reader - CH10 Interrupt Flag"]
37pub type CH10_R = crate::BitReader<bool>;
38#[doc = "Field `CH11` reader - CH11 Interrupt Flag"]
39pub type CH11_R = crate::BitReader<bool>;
40#[doc = "Field `CH12` reader - CH12 Interrupt Flag"]
41pub type CH12_R = crate::BitReader<bool>;
42#[doc = "Field `CH13` reader - CH13 Interrupt Flag"]
43pub type CH13_R = crate::BitReader<bool>;
44#[doc = "Field `CH14` reader - CH14 Interrupt Flag"]
45pub type CH14_R = crate::BitReader<bool>;
46#[doc = "Field `CH15` reader - CH15 Interrupt Flag"]
47pub type CH15_R = crate::BitReader<bool>;
48#[doc = "Field `SCANCOMPLETE` reader - SCANCOMPLETE Interrupt Flag"]
49pub type SCANCOMPLETE_R = crate::BitReader<bool>;
50#[doc = "Field `DEC` reader - DEC Interrupt Flag"]
51pub type DEC_R = crate::BitReader<bool>;
52#[doc = "Field `DECERR` reader - DECERR Interrupt Flag"]
53pub type DECERR_R = crate::BitReader<bool>;
54#[doc = "Field `BUFDATAV` reader - BUFDATAV Interrupt Flag"]
55pub type BUFDATAV_R = crate::BitReader<bool>;
56#[doc = "Field `BUFLEVEL` reader - BUFLEVEL Interrupt Flag"]
57pub type BUFLEVEL_R = crate::BitReader<bool>;
58#[doc = "Field `BUFOF` reader - BUFOF Interrupt Flag"]
59pub type BUFOF_R = crate::BitReader<bool>;
60#[doc = "Field `CNTOF` reader - CNTOF Interrupt Flag"]
61pub type CNTOF_R = crate::BitReader<bool>;
62impl R {
63    #[doc = "Bit 0 - CH0 Interrupt Flag"]
64    #[inline(always)]
65    pub fn ch0(&self) -> CH0_R {
66        CH0_R::new((self.bits & 1) != 0)
67    }
68    #[doc = "Bit 1 - CH1 Interrupt Flag"]
69    #[inline(always)]
70    pub fn ch1(&self) -> CH1_R {
71        CH1_R::new(((self.bits >> 1) & 1) != 0)
72    }
73    #[doc = "Bit 2 - CH2 Interrupt Flag"]
74    #[inline(always)]
75    pub fn ch2(&self) -> CH2_R {
76        CH2_R::new(((self.bits >> 2) & 1) != 0)
77    }
78    #[doc = "Bit 3 - CH3 Interrupt Flag"]
79    #[inline(always)]
80    pub fn ch3(&self) -> CH3_R {
81        CH3_R::new(((self.bits >> 3) & 1) != 0)
82    }
83    #[doc = "Bit 4 - CH4 Interrupt Flag"]
84    #[inline(always)]
85    pub fn ch4(&self) -> CH4_R {
86        CH4_R::new(((self.bits >> 4) & 1) != 0)
87    }
88    #[doc = "Bit 5 - CH5 Interrupt Flag"]
89    #[inline(always)]
90    pub fn ch5(&self) -> CH5_R {
91        CH5_R::new(((self.bits >> 5) & 1) != 0)
92    }
93    #[doc = "Bit 6 - CH6 Interrupt Flag"]
94    #[inline(always)]
95    pub fn ch6(&self) -> CH6_R {
96        CH6_R::new(((self.bits >> 6) & 1) != 0)
97    }
98    #[doc = "Bit 7 - CH7 Interrupt Flag"]
99    #[inline(always)]
100    pub fn ch7(&self) -> CH7_R {
101        CH7_R::new(((self.bits >> 7) & 1) != 0)
102    }
103    #[doc = "Bit 8 - CH8 Interrupt Flag"]
104    #[inline(always)]
105    pub fn ch8(&self) -> CH8_R {
106        CH8_R::new(((self.bits >> 8) & 1) != 0)
107    }
108    #[doc = "Bit 9 - CH9 Interrupt Flag"]
109    #[inline(always)]
110    pub fn ch9(&self) -> CH9_R {
111        CH9_R::new(((self.bits >> 9) & 1) != 0)
112    }
113    #[doc = "Bit 10 - CH10 Interrupt Flag"]
114    #[inline(always)]
115    pub fn ch10(&self) -> CH10_R {
116        CH10_R::new(((self.bits >> 10) & 1) != 0)
117    }
118    #[doc = "Bit 11 - CH11 Interrupt Flag"]
119    #[inline(always)]
120    pub fn ch11(&self) -> CH11_R {
121        CH11_R::new(((self.bits >> 11) & 1) != 0)
122    }
123    #[doc = "Bit 12 - CH12 Interrupt Flag"]
124    #[inline(always)]
125    pub fn ch12(&self) -> CH12_R {
126        CH12_R::new(((self.bits >> 12) & 1) != 0)
127    }
128    #[doc = "Bit 13 - CH13 Interrupt Flag"]
129    #[inline(always)]
130    pub fn ch13(&self) -> CH13_R {
131        CH13_R::new(((self.bits >> 13) & 1) != 0)
132    }
133    #[doc = "Bit 14 - CH14 Interrupt Flag"]
134    #[inline(always)]
135    pub fn ch14(&self) -> CH14_R {
136        CH14_R::new(((self.bits >> 14) & 1) != 0)
137    }
138    #[doc = "Bit 15 - CH15 Interrupt Flag"]
139    #[inline(always)]
140    pub fn ch15(&self) -> CH15_R {
141        CH15_R::new(((self.bits >> 15) & 1) != 0)
142    }
143    #[doc = "Bit 16 - SCANCOMPLETE Interrupt Flag"]
144    #[inline(always)]
145    pub fn scancomplete(&self) -> SCANCOMPLETE_R {
146        SCANCOMPLETE_R::new(((self.bits >> 16) & 1) != 0)
147    }
148    #[doc = "Bit 17 - DEC Interrupt Flag"]
149    #[inline(always)]
150    pub fn dec(&self) -> DEC_R {
151        DEC_R::new(((self.bits >> 17) & 1) != 0)
152    }
153    #[doc = "Bit 18 - DECERR Interrupt Flag"]
154    #[inline(always)]
155    pub fn decerr(&self) -> DECERR_R {
156        DECERR_R::new(((self.bits >> 18) & 1) != 0)
157    }
158    #[doc = "Bit 19 - BUFDATAV Interrupt Flag"]
159    #[inline(always)]
160    pub fn bufdatav(&self) -> BUFDATAV_R {
161        BUFDATAV_R::new(((self.bits >> 19) & 1) != 0)
162    }
163    #[doc = "Bit 20 - BUFLEVEL Interrupt Flag"]
164    #[inline(always)]
165    pub fn buflevel(&self) -> BUFLEVEL_R {
166        BUFLEVEL_R::new(((self.bits >> 20) & 1) != 0)
167    }
168    #[doc = "Bit 21 - BUFOF Interrupt Flag"]
169    #[inline(always)]
170    pub fn bufof(&self) -> BUFOF_R {
171        BUFOF_R::new(((self.bits >> 21) & 1) != 0)
172    }
173    #[doc = "Bit 22 - CNTOF Interrupt Flag"]
174    #[inline(always)]
175    pub fn cntof(&self) -> CNTOF_R {
176        CNTOF_R::new(((self.bits >> 22) & 1) != 0)
177    }
178}
179#[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"]
180pub struct IF_SPEC;
181impl crate::RegisterSpec for IF_SPEC {
182    type Ux = u32;
183}
184#[doc = "`read()` method returns [if_::R](R) reader structure"]
185impl crate::Readable for IF_SPEC {
186    type Reader = R;
187}
188#[doc = "`reset()` method sets IF to value 0"]
189impl crate::Resettable for IF_SPEC {
190    #[inline(always)]
191    fn reset_value() -> Self::Ux {
192        0
193    }
194}