efm32pg22_pac/efm32pg22c200/timer3_ns/
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 = "Register `IF` writer"]
17pub struct W(crate::W<IF_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<IF_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<IF_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<IF_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `OF` reader - Overflow Interrupt Flag"]
38pub type OF_R = crate::BitReader<bool>;
39#[doc = "Field `OF` writer - Overflow Interrupt Flag"]
40pub type OF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
41#[doc = "Field `UF` reader - Underflow Interrupt Flag"]
42pub type UF_R = crate::BitReader<bool>;
43#[doc = "Field `UF` writer - Underflow Interrupt Flag"]
44pub type UF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
45#[doc = "Field `DIRCHG` reader - Direction Change Detect Interrupt Flag"]
46pub type DIRCHG_R = crate::BitReader<bool>;
47#[doc = "Field `DIRCHG` writer - Direction Change Detect Interrupt Flag"]
48pub type DIRCHG_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
49#[doc = "Field `CC0` reader - Capture Compare Channel 0 Interrupt Flag"]
50pub type CC0_R = crate::BitReader<bool>;
51#[doc = "Field `CC0` writer - Capture Compare Channel 0 Interrupt Flag"]
52pub type CC0_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
53#[doc = "Field `CC1` reader - Capture Compare Channel 1 Interrupt Flag"]
54pub type CC1_R = crate::BitReader<bool>;
55#[doc = "Field `CC1` writer - Capture Compare Channel 1 Interrupt Flag"]
56pub type CC1_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
57#[doc = "Field `CC2` reader - Capture Compare Channel 2 Interrupt Flag"]
58pub type CC2_R = crate::BitReader<bool>;
59#[doc = "Field `CC2` writer - Capture Compare Channel 2 Interrupt Flag"]
60pub type CC2_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
61#[doc = "Field `ICFWLFULL0` reader - Input Capture Watermark Level Full"]
62pub type ICFWLFULL0_R = crate::BitReader<bool>;
63#[doc = "Field `ICFWLFULL0` writer - Input Capture Watermark Level Full"]
64pub type ICFWLFULL0_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
65#[doc = "Field `ICFWLFULL1` reader - Input Capture Watermark Level Full"]
66pub type ICFWLFULL1_R = crate::BitReader<bool>;
67#[doc = "Field `ICFWLFULL1` writer - Input Capture Watermark Level Full"]
68pub type ICFWLFULL1_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
69#[doc = "Field `ICFWLFULL2` reader - Input Capture Watermark Level Full"]
70pub type ICFWLFULL2_R = crate::BitReader<bool>;
71#[doc = "Field `ICFWLFULL2` writer - Input Capture Watermark Level Full"]
72pub type ICFWLFULL2_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
73#[doc = "Field `ICFOF0` reader - Input Capture FIFO overflow"]
74pub type ICFOF0_R = crate::BitReader<bool>;
75#[doc = "Field `ICFOF0` writer - Input Capture FIFO overflow"]
76pub type ICFOF0_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
77#[doc = "Field `ICFOF1` reader - Input Capture FIFO overflow"]
78pub type ICFOF1_R = crate::BitReader<bool>;
79#[doc = "Field `ICFOF1` writer - Input Capture FIFO overflow"]
80pub type ICFOF1_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
81#[doc = "Field `ICFOF2` reader - Input Capture FIFO overflow"]
82pub type ICFOF2_R = crate::BitReader<bool>;
83#[doc = "Field `ICFOF2` writer - Input Capture FIFO overflow"]
84pub type ICFOF2_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
85#[doc = "Field `ICFUF0` reader - Input capture FIFO underflow"]
86pub type ICFUF0_R = crate::BitReader<bool>;
87#[doc = "Field `ICFUF0` writer - Input capture FIFO underflow"]
88pub type ICFUF0_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
89#[doc = "Field `ICFUF1` reader - Input capture FIFO underflow"]
90pub type ICFUF1_R = crate::BitReader<bool>;
91#[doc = "Field `ICFUF1` writer - Input capture FIFO underflow"]
92pub type ICFUF1_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
93#[doc = "Field `ICFUF2` reader - Input capture FIFO underflow"]
94pub type ICFUF2_R = crate::BitReader<bool>;
95#[doc = "Field `ICFUF2` writer - Input capture FIFO underflow"]
96pub type ICFUF2_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
97impl R {
98    #[doc = "Bit 0 - Overflow Interrupt Flag"]
99    #[inline(always)]
100    pub fn of(&self) -> OF_R {
101        OF_R::new((self.bits & 1) != 0)
102    }
103    #[doc = "Bit 1 - Underflow Interrupt Flag"]
104    #[inline(always)]
105    pub fn uf(&self) -> UF_R {
106        UF_R::new(((self.bits >> 1) & 1) != 0)
107    }
108    #[doc = "Bit 2 - Direction Change Detect Interrupt Flag"]
109    #[inline(always)]
110    pub fn dirchg(&self) -> DIRCHG_R {
111        DIRCHG_R::new(((self.bits >> 2) & 1) != 0)
112    }
113    #[doc = "Bit 4 - Capture Compare Channel 0 Interrupt Flag"]
114    #[inline(always)]
115    pub fn cc0(&self) -> CC0_R {
116        CC0_R::new(((self.bits >> 4) & 1) != 0)
117    }
118    #[doc = "Bit 5 - Capture Compare Channel 1 Interrupt Flag"]
119    #[inline(always)]
120    pub fn cc1(&self) -> CC1_R {
121        CC1_R::new(((self.bits >> 5) & 1) != 0)
122    }
123    #[doc = "Bit 6 - Capture Compare Channel 2 Interrupt Flag"]
124    #[inline(always)]
125    pub fn cc2(&self) -> CC2_R {
126        CC2_R::new(((self.bits >> 6) & 1) != 0)
127    }
128    #[doc = "Bit 16 - Input Capture Watermark Level Full"]
129    #[inline(always)]
130    pub fn icfwlfull0(&self) -> ICFWLFULL0_R {
131        ICFWLFULL0_R::new(((self.bits >> 16) & 1) != 0)
132    }
133    #[doc = "Bit 17 - Input Capture Watermark Level Full"]
134    #[inline(always)]
135    pub fn icfwlfull1(&self) -> ICFWLFULL1_R {
136        ICFWLFULL1_R::new(((self.bits >> 17) & 1) != 0)
137    }
138    #[doc = "Bit 18 - Input Capture Watermark Level Full"]
139    #[inline(always)]
140    pub fn icfwlfull2(&self) -> ICFWLFULL2_R {
141        ICFWLFULL2_R::new(((self.bits >> 18) & 1) != 0)
142    }
143    #[doc = "Bit 20 - Input Capture FIFO overflow"]
144    #[inline(always)]
145    pub fn icfof0(&self) -> ICFOF0_R {
146        ICFOF0_R::new(((self.bits >> 20) & 1) != 0)
147    }
148    #[doc = "Bit 21 - Input Capture FIFO overflow"]
149    #[inline(always)]
150    pub fn icfof1(&self) -> ICFOF1_R {
151        ICFOF1_R::new(((self.bits >> 21) & 1) != 0)
152    }
153    #[doc = "Bit 22 - Input Capture FIFO overflow"]
154    #[inline(always)]
155    pub fn icfof2(&self) -> ICFOF2_R {
156        ICFOF2_R::new(((self.bits >> 22) & 1) != 0)
157    }
158    #[doc = "Bit 24 - Input capture FIFO underflow"]
159    #[inline(always)]
160    pub fn icfuf0(&self) -> ICFUF0_R {
161        ICFUF0_R::new(((self.bits >> 24) & 1) != 0)
162    }
163    #[doc = "Bit 25 - Input capture FIFO underflow"]
164    #[inline(always)]
165    pub fn icfuf1(&self) -> ICFUF1_R {
166        ICFUF1_R::new(((self.bits >> 25) & 1) != 0)
167    }
168    #[doc = "Bit 26 - Input capture FIFO underflow"]
169    #[inline(always)]
170    pub fn icfuf2(&self) -> ICFUF2_R {
171        ICFUF2_R::new(((self.bits >> 26) & 1) != 0)
172    }
173}
174impl W {
175    #[doc = "Bit 0 - Overflow Interrupt Flag"]
176    #[inline(always)]
177    #[must_use]
178    pub fn of(&mut self) -> OF_W<0> {
179        OF_W::new(self)
180    }
181    #[doc = "Bit 1 - Underflow Interrupt Flag"]
182    #[inline(always)]
183    #[must_use]
184    pub fn uf(&mut self) -> UF_W<1> {
185        UF_W::new(self)
186    }
187    #[doc = "Bit 2 - Direction Change Detect Interrupt Flag"]
188    #[inline(always)]
189    #[must_use]
190    pub fn dirchg(&mut self) -> DIRCHG_W<2> {
191        DIRCHG_W::new(self)
192    }
193    #[doc = "Bit 4 - Capture Compare Channel 0 Interrupt Flag"]
194    #[inline(always)]
195    #[must_use]
196    pub fn cc0(&mut self) -> CC0_W<4> {
197        CC0_W::new(self)
198    }
199    #[doc = "Bit 5 - Capture Compare Channel 1 Interrupt Flag"]
200    #[inline(always)]
201    #[must_use]
202    pub fn cc1(&mut self) -> CC1_W<5> {
203        CC1_W::new(self)
204    }
205    #[doc = "Bit 6 - Capture Compare Channel 2 Interrupt Flag"]
206    #[inline(always)]
207    #[must_use]
208    pub fn cc2(&mut self) -> CC2_W<6> {
209        CC2_W::new(self)
210    }
211    #[doc = "Bit 16 - Input Capture Watermark Level Full"]
212    #[inline(always)]
213    #[must_use]
214    pub fn icfwlfull0(&mut self) -> ICFWLFULL0_W<16> {
215        ICFWLFULL0_W::new(self)
216    }
217    #[doc = "Bit 17 - Input Capture Watermark Level Full"]
218    #[inline(always)]
219    #[must_use]
220    pub fn icfwlfull1(&mut self) -> ICFWLFULL1_W<17> {
221        ICFWLFULL1_W::new(self)
222    }
223    #[doc = "Bit 18 - Input Capture Watermark Level Full"]
224    #[inline(always)]
225    #[must_use]
226    pub fn icfwlfull2(&mut self) -> ICFWLFULL2_W<18> {
227        ICFWLFULL2_W::new(self)
228    }
229    #[doc = "Bit 20 - Input Capture FIFO overflow"]
230    #[inline(always)]
231    #[must_use]
232    pub fn icfof0(&mut self) -> ICFOF0_W<20> {
233        ICFOF0_W::new(self)
234    }
235    #[doc = "Bit 21 - Input Capture FIFO overflow"]
236    #[inline(always)]
237    #[must_use]
238    pub fn icfof1(&mut self) -> ICFOF1_W<21> {
239        ICFOF1_W::new(self)
240    }
241    #[doc = "Bit 22 - Input Capture FIFO overflow"]
242    #[inline(always)]
243    #[must_use]
244    pub fn icfof2(&mut self) -> ICFOF2_W<22> {
245        ICFOF2_W::new(self)
246    }
247    #[doc = "Bit 24 - Input capture FIFO underflow"]
248    #[inline(always)]
249    #[must_use]
250    pub fn icfuf0(&mut self) -> ICFUF0_W<24> {
251        ICFUF0_W::new(self)
252    }
253    #[doc = "Bit 25 - Input capture FIFO underflow"]
254    #[inline(always)]
255    #[must_use]
256    pub fn icfuf1(&mut self) -> ICFUF1_W<25> {
257        ICFUF1_W::new(self)
258    }
259    #[doc = "Bit 26 - Input capture FIFO underflow"]
260    #[inline(always)]
261    #[must_use]
262    pub fn icfuf2(&mut self) -> ICFUF2_W<26> {
263        ICFUF2_W::new(self)
264    }
265    #[doc = "Writes raw bits to the register."]
266    #[inline(always)]
267    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
268        self.0.bits(bits);
269        self
270    }
271}
272#[doc = "No Description\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 [if_](index.html) module"]
273pub struct IF_SPEC;
274impl crate::RegisterSpec for IF_SPEC {
275    type Ux = u32;
276}
277#[doc = "`read()` method returns [if_::R](R) reader structure"]
278impl crate::Readable for IF_SPEC {
279    type Reader = R;
280}
281#[doc = "`write(|w| ..)` method takes [if_::W](W) writer structure"]
282impl crate::Writable for IF_SPEC {
283    type Writer = W;
284    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
285    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
286}
287#[doc = "`reset()` method sets IF to value 0"]
288impl crate::Resettable for IF_SPEC {
289    const RESET_VALUE: Self::Ux = 0;
290}