ambiq_apollo3_pac2/ctimer/
stmintstat.rs1#[doc = "Register `STMINTSTAT` reader"]
2pub struct R(crate::R<STMINTSTAT_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<STMINTSTAT_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<STMINTSTAT_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<STMINTSTAT_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `STMINTSTAT` writer"]
17pub struct W(crate::W<STMINTSTAT_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<STMINTSTAT_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<STMINTSTAT_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<STMINTSTAT_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "CAPTURE register D has grabbed the value in the counter\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39pub enum CAPTURED_A {
40    #[doc = "1: Capture D interrupt status bit was set. value."]
41    CAPD_INT = 1,
42}
43impl From<CAPTURED_A> for bool {
44    #[inline(always)]
45    fn from(variant: CAPTURED_A) -> Self {
46        variant as u8 != 0
47    }
48}
49#[doc = "Field `CAPTURED` reader - CAPTURE register D has grabbed the value in the counter"]
50pub struct CAPTURED_R(crate::FieldReader<bool, CAPTURED_A>);
51impl CAPTURED_R {
52    pub(crate) fn new(bits: bool) -> Self {
53        CAPTURED_R(crate::FieldReader::new(bits))
54    }
55    #[doc = r"Get enumerated values variant"]
56    #[inline(always)]
57    pub fn variant(&self) -> Option<CAPTURED_A> {
58        match self.bits {
59            true => Some(CAPTURED_A::CAPD_INT),
60            _ => None,
61        }
62    }
63    #[doc = "Checks if the value of the field is `CAPD_INT`"]
64    #[inline(always)]
65    pub fn is_capd_int(&self) -> bool {
66        **self == CAPTURED_A::CAPD_INT
67    }
68}
69impl core::ops::Deref for CAPTURED_R {
70    type Target = crate::FieldReader<bool, CAPTURED_A>;
71    #[inline(always)]
72    fn deref(&self) -> &Self::Target {
73        &self.0
74    }
75}
76#[doc = "Field `CAPTURED` writer - CAPTURE register D has grabbed the value in the counter"]
77pub struct CAPTURED_W<'a> {
78    w: &'a mut W,
79}
80impl<'a> CAPTURED_W<'a> {
81    #[doc = r"Writes `variant` to the field"]
82    #[inline(always)]
83    pub fn variant(self, variant: CAPTURED_A) -> &'a mut W {
84        self.bit(variant.into())
85    }
86    #[doc = "Capture D interrupt status bit was set. value."]
87    #[inline(always)]
88    pub fn capd_int(self) -> &'a mut W {
89        self.variant(CAPTURED_A::CAPD_INT)
90    }
91    #[doc = r"Sets the field bit"]
92    #[inline(always)]
93    pub fn set_bit(self) -> &'a mut W {
94        self.bit(true)
95    }
96    #[doc = r"Clears the field bit"]
97    #[inline(always)]
98    pub fn clear_bit(self) -> &'a mut W {
99        self.bit(false)
100    }
101    #[doc = r"Writes raw bits to the field"]
102    #[inline(always)]
103    pub fn bit(self, value: bool) -> &'a mut W {
104        self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12);
105        self.w
106    }
107}
108#[doc = "CAPTURE register C has grabbed the value in the counter\n\nValue on reset: 0"]
109#[derive(Clone, Copy, Debug, PartialEq)]
110pub enum CAPTUREC_A {
111    #[doc = "1: CAPTURE C interrupt status bit was set. value."]
112    CAPC_INT = 1,
113}
114impl From<CAPTUREC_A> for bool {
115    #[inline(always)]
116    fn from(variant: CAPTUREC_A) -> Self {
117        variant as u8 != 0
118    }
119}
120#[doc = "Field `CAPTUREC` reader - CAPTURE register C has grabbed the value in the counter"]
121pub struct CAPTUREC_R(crate::FieldReader<bool, CAPTUREC_A>);
122impl CAPTUREC_R {
123    pub(crate) fn new(bits: bool) -> Self {
124        CAPTUREC_R(crate::FieldReader::new(bits))
125    }
126    #[doc = r"Get enumerated values variant"]
127    #[inline(always)]
128    pub fn variant(&self) -> Option<CAPTUREC_A> {
129        match self.bits {
130            true => Some(CAPTUREC_A::CAPC_INT),
131            _ => None,
132        }
133    }
134    #[doc = "Checks if the value of the field is `CAPC_INT`"]
135    #[inline(always)]
136    pub fn is_capc_int(&self) -> bool {
137        **self == CAPTUREC_A::CAPC_INT
138    }
139}
140impl core::ops::Deref for CAPTUREC_R {
141    type Target = crate::FieldReader<bool, CAPTUREC_A>;
142    #[inline(always)]
143    fn deref(&self) -> &Self::Target {
144        &self.0
145    }
146}
147#[doc = "Field `CAPTUREC` writer - CAPTURE register C has grabbed the value in the counter"]
148pub struct CAPTUREC_W<'a> {
149    w: &'a mut W,
150}
151impl<'a> CAPTUREC_W<'a> {
152    #[doc = r"Writes `variant` to the field"]
153    #[inline(always)]
154    pub fn variant(self, variant: CAPTUREC_A) -> &'a mut W {
155        self.bit(variant.into())
156    }
157    #[doc = "CAPTURE C interrupt status bit was set. value."]
158    #[inline(always)]
159    pub fn capc_int(self) -> &'a mut W {
160        self.variant(CAPTUREC_A::CAPC_INT)
161    }
162    #[doc = r"Sets the field bit"]
163    #[inline(always)]
164    pub fn set_bit(self) -> &'a mut W {
165        self.bit(true)
166    }
167    #[doc = r"Clears the field bit"]
168    #[inline(always)]
169    pub fn clear_bit(self) -> &'a mut W {
170        self.bit(false)
171    }
172    #[doc = r"Writes raw bits to the field"]
173    #[inline(always)]
174    pub fn bit(self, value: bool) -> &'a mut W {
175        self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
176        self.w
177    }
178}
179#[doc = "CAPTURE register B has grabbed the value in the counter\n\nValue on reset: 0"]
180#[derive(Clone, Copy, Debug, PartialEq)]
181pub enum CAPTUREB_A {
182    #[doc = "1: CAPTURE B interrupt status bit was set. value."]
183    CAPB_INT = 1,
184}
185impl From<CAPTUREB_A> for bool {
186    #[inline(always)]
187    fn from(variant: CAPTUREB_A) -> Self {
188        variant as u8 != 0
189    }
190}
191#[doc = "Field `CAPTUREB` reader - CAPTURE register B has grabbed the value in the counter"]
192pub struct CAPTUREB_R(crate::FieldReader<bool, CAPTUREB_A>);
193impl CAPTUREB_R {
194    pub(crate) fn new(bits: bool) -> Self {
195        CAPTUREB_R(crate::FieldReader::new(bits))
196    }
197    #[doc = r"Get enumerated values variant"]
198    #[inline(always)]
199    pub fn variant(&self) -> Option<CAPTUREB_A> {
200        match self.bits {
201            true => Some(CAPTUREB_A::CAPB_INT),
202            _ => None,
203        }
204    }
205    #[doc = "Checks if the value of the field is `CAPB_INT`"]
206    #[inline(always)]
207    pub fn is_capb_int(&self) -> bool {
208        **self == CAPTUREB_A::CAPB_INT
209    }
210}
211impl core::ops::Deref for CAPTUREB_R {
212    type Target = crate::FieldReader<bool, CAPTUREB_A>;
213    #[inline(always)]
214    fn deref(&self) -> &Self::Target {
215        &self.0
216    }
217}
218#[doc = "Field `CAPTUREB` writer - CAPTURE register B has grabbed the value in the counter"]
219pub struct CAPTUREB_W<'a> {
220    w: &'a mut W,
221}
222impl<'a> CAPTUREB_W<'a> {
223    #[doc = r"Writes `variant` to the field"]
224    #[inline(always)]
225    pub fn variant(self, variant: CAPTUREB_A) -> &'a mut W {
226        self.bit(variant.into())
227    }
228    #[doc = "CAPTURE B interrupt status bit was set. value."]
229    #[inline(always)]
230    pub fn capb_int(self) -> &'a mut W {
231        self.variant(CAPTUREB_A::CAPB_INT)
232    }
233    #[doc = r"Sets the field bit"]
234    #[inline(always)]
235    pub fn set_bit(self) -> &'a mut W {
236        self.bit(true)
237    }
238    #[doc = r"Clears the field bit"]
239    #[inline(always)]
240    pub fn clear_bit(self) -> &'a mut W {
241        self.bit(false)
242    }
243    #[doc = r"Writes raw bits to the field"]
244    #[inline(always)]
245    pub fn bit(self, value: bool) -> &'a mut W {
246        self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
247        self.w
248    }
249}
250#[doc = "CAPTURE register A has grabbed the value in the counter\n\nValue on reset: 0"]
251#[derive(Clone, Copy, Debug, PartialEq)]
252pub enum CAPTUREA_A {
253    #[doc = "1: CAPTURE A interrupt status bit was set. value."]
254    CAPA_INT = 1,
255}
256impl From<CAPTUREA_A> for bool {
257    #[inline(always)]
258    fn from(variant: CAPTUREA_A) -> Self {
259        variant as u8 != 0
260    }
261}
262#[doc = "Field `CAPTUREA` reader - CAPTURE register A has grabbed the value in the counter"]
263pub struct CAPTUREA_R(crate::FieldReader<bool, CAPTUREA_A>);
264impl CAPTUREA_R {
265    pub(crate) fn new(bits: bool) -> Self {
266        CAPTUREA_R(crate::FieldReader::new(bits))
267    }
268    #[doc = r"Get enumerated values variant"]
269    #[inline(always)]
270    pub fn variant(&self) -> Option<CAPTUREA_A> {
271        match self.bits {
272            true => Some(CAPTUREA_A::CAPA_INT),
273            _ => None,
274        }
275    }
276    #[doc = "Checks if the value of the field is `CAPA_INT`"]
277    #[inline(always)]
278    pub fn is_capa_int(&self) -> bool {
279        **self == CAPTUREA_A::CAPA_INT
280    }
281}
282impl core::ops::Deref for CAPTUREA_R {
283    type Target = crate::FieldReader<bool, CAPTUREA_A>;
284    #[inline(always)]
285    fn deref(&self) -> &Self::Target {
286        &self.0
287    }
288}
289#[doc = "Field `CAPTUREA` writer - CAPTURE register A has grabbed the value in the counter"]
290pub struct CAPTUREA_W<'a> {
291    w: &'a mut W,
292}
293impl<'a> CAPTUREA_W<'a> {
294    #[doc = r"Writes `variant` to the field"]
295    #[inline(always)]
296    pub fn variant(self, variant: CAPTUREA_A) -> &'a mut W {
297        self.bit(variant.into())
298    }
299    #[doc = "CAPTURE A interrupt status bit was set. value."]
300    #[inline(always)]
301    pub fn capa_int(self) -> &'a mut W {
302        self.variant(CAPTUREA_A::CAPA_INT)
303    }
304    #[doc = r"Sets the field bit"]
305    #[inline(always)]
306    pub fn set_bit(self) -> &'a mut W {
307        self.bit(true)
308    }
309    #[doc = r"Clears the field bit"]
310    #[inline(always)]
311    pub fn clear_bit(self) -> &'a mut W {
312        self.bit(false)
313    }
314    #[doc = r"Writes raw bits to the field"]
315    #[inline(always)]
316    pub fn bit(self, value: bool) -> &'a mut W {
317        self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
318        self.w
319    }
320}
321#[doc = "COUNTER over flowed from 0xFFFFFFFF back to 0x00000000.\n\nValue on reset: 0"]
322#[derive(Clone, Copy, Debug, PartialEq)]
323pub enum OVERFLOW_A {
324    #[doc = "1: Overflow interrupt status bit was set. value."]
325    OFLOW_INT = 1,
326}
327impl From<OVERFLOW_A> for bool {
328    #[inline(always)]
329    fn from(variant: OVERFLOW_A) -> Self {
330        variant as u8 != 0
331    }
332}
333#[doc = "Field `OVERFLOW` reader - COUNTER over flowed from 0xFFFFFFFF back to 0x00000000."]
334pub struct OVERFLOW_R(crate::FieldReader<bool, OVERFLOW_A>);
335impl OVERFLOW_R {
336    pub(crate) fn new(bits: bool) -> Self {
337        OVERFLOW_R(crate::FieldReader::new(bits))
338    }
339    #[doc = r"Get enumerated values variant"]
340    #[inline(always)]
341    pub fn variant(&self) -> Option<OVERFLOW_A> {
342        match self.bits {
343            true => Some(OVERFLOW_A::OFLOW_INT),
344            _ => None,
345        }
346    }
347    #[doc = "Checks if the value of the field is `OFLOW_INT`"]
348    #[inline(always)]
349    pub fn is_oflow_int(&self) -> bool {
350        **self == OVERFLOW_A::OFLOW_INT
351    }
352}
353impl core::ops::Deref for OVERFLOW_R {
354    type Target = crate::FieldReader<bool, OVERFLOW_A>;
355    #[inline(always)]
356    fn deref(&self) -> &Self::Target {
357        &self.0
358    }
359}
360#[doc = "Field `OVERFLOW` writer - COUNTER over flowed from 0xFFFFFFFF back to 0x00000000."]
361pub struct OVERFLOW_W<'a> {
362    w: &'a mut W,
363}
364impl<'a> OVERFLOW_W<'a> {
365    #[doc = r"Writes `variant` to the field"]
366    #[inline(always)]
367    pub fn variant(self, variant: OVERFLOW_A) -> &'a mut W {
368        self.bit(variant.into())
369    }
370    #[doc = "Overflow interrupt status bit was set. value."]
371    #[inline(always)]
372    pub fn oflow_int(self) -> &'a mut W {
373        self.variant(OVERFLOW_A::OFLOW_INT)
374    }
375    #[doc = r"Sets the field bit"]
376    #[inline(always)]
377    pub fn set_bit(self) -> &'a mut W {
378        self.bit(true)
379    }
380    #[doc = r"Clears the field bit"]
381    #[inline(always)]
382    pub fn clear_bit(self) -> &'a mut W {
383        self.bit(false)
384    }
385    #[doc = r"Writes raw bits to the field"]
386    #[inline(always)]
387    pub fn bit(self, value: bool) -> &'a mut W {
388        self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
389        self.w
390    }
391}
392#[doc = "COUNTER is greater than or equal to COMPARE register H.\n\nValue on reset: 0"]
393#[derive(Clone, Copy, Debug, PartialEq)]
394pub enum COMPAREH_A {
395    #[doc = "1: COUNTER greater than or equal to COMPARE register. value."]
396    COMPARED = 1,
397}
398impl From<COMPAREH_A> for bool {
399    #[inline(always)]
400    fn from(variant: COMPAREH_A) -> Self {
401        variant as u8 != 0
402    }
403}
404#[doc = "Field `COMPAREH` reader - COUNTER is greater than or equal to COMPARE register H."]
405pub struct COMPAREH_R(crate::FieldReader<bool, COMPAREH_A>);
406impl COMPAREH_R {
407    pub(crate) fn new(bits: bool) -> Self {
408        COMPAREH_R(crate::FieldReader::new(bits))
409    }
410    #[doc = r"Get enumerated values variant"]
411    #[inline(always)]
412    pub fn variant(&self) -> Option<COMPAREH_A> {
413        match self.bits {
414            true => Some(COMPAREH_A::COMPARED),
415            _ => None,
416        }
417    }
418    #[doc = "Checks if the value of the field is `COMPARED`"]
419    #[inline(always)]
420    pub fn is_compared(&self) -> bool {
421        **self == COMPAREH_A::COMPARED
422    }
423}
424impl core::ops::Deref for COMPAREH_R {
425    type Target = crate::FieldReader<bool, COMPAREH_A>;
426    #[inline(always)]
427    fn deref(&self) -> &Self::Target {
428        &self.0
429    }
430}
431#[doc = "Field `COMPAREH` writer - COUNTER is greater than or equal to COMPARE register H."]
432pub struct COMPAREH_W<'a> {
433    w: &'a mut W,
434}
435impl<'a> COMPAREH_W<'a> {
436    #[doc = r"Writes `variant` to the field"]
437    #[inline(always)]
438    pub fn variant(self, variant: COMPAREH_A) -> &'a mut W {
439        self.bit(variant.into())
440    }
441    #[doc = "COUNTER greater than or equal to COMPARE register. value."]
442    #[inline(always)]
443    pub fn compared(self) -> &'a mut W {
444        self.variant(COMPAREH_A::COMPARED)
445    }
446    #[doc = r"Sets the field bit"]
447    #[inline(always)]
448    pub fn set_bit(self) -> &'a mut W {
449        self.bit(true)
450    }
451    #[doc = r"Clears the field bit"]
452    #[inline(always)]
453    pub fn clear_bit(self) -> &'a mut W {
454        self.bit(false)
455    }
456    #[doc = r"Writes raw bits to the field"]
457    #[inline(always)]
458    pub fn bit(self, value: bool) -> &'a mut W {
459        self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
460        self.w
461    }
462}
463#[doc = "COUNTER is greater than or equal to COMPARE register G.\n\nValue on reset: 0"]
464#[derive(Clone, Copy, Debug, PartialEq)]
465pub enum COMPAREG_A {
466    #[doc = "1: COUNTER greater than or equal to COMPARE register. value."]
467    COMPARED = 1,
468}
469impl From<COMPAREG_A> for bool {
470    #[inline(always)]
471    fn from(variant: COMPAREG_A) -> Self {
472        variant as u8 != 0
473    }
474}
475#[doc = "Field `COMPAREG` reader - COUNTER is greater than or equal to COMPARE register G."]
476pub struct COMPAREG_R(crate::FieldReader<bool, COMPAREG_A>);
477impl COMPAREG_R {
478    pub(crate) fn new(bits: bool) -> Self {
479        COMPAREG_R(crate::FieldReader::new(bits))
480    }
481    #[doc = r"Get enumerated values variant"]
482    #[inline(always)]
483    pub fn variant(&self) -> Option<COMPAREG_A> {
484        match self.bits {
485            true => Some(COMPAREG_A::COMPARED),
486            _ => None,
487        }
488    }
489    #[doc = "Checks if the value of the field is `COMPARED`"]
490    #[inline(always)]
491    pub fn is_compared(&self) -> bool {
492        **self == COMPAREG_A::COMPARED
493    }
494}
495impl core::ops::Deref for COMPAREG_R {
496    type Target = crate::FieldReader<bool, COMPAREG_A>;
497    #[inline(always)]
498    fn deref(&self) -> &Self::Target {
499        &self.0
500    }
501}
502#[doc = "Field `COMPAREG` writer - COUNTER is greater than or equal to COMPARE register G."]
503pub struct COMPAREG_W<'a> {
504    w: &'a mut W,
505}
506impl<'a> COMPAREG_W<'a> {
507    #[doc = r"Writes `variant` to the field"]
508    #[inline(always)]
509    pub fn variant(self, variant: COMPAREG_A) -> &'a mut W {
510        self.bit(variant.into())
511    }
512    #[doc = "COUNTER greater than or equal to COMPARE register. value."]
513    #[inline(always)]
514    pub fn compared(self) -> &'a mut W {
515        self.variant(COMPAREG_A::COMPARED)
516    }
517    #[doc = r"Sets the field bit"]
518    #[inline(always)]
519    pub fn set_bit(self) -> &'a mut W {
520        self.bit(true)
521    }
522    #[doc = r"Clears the field bit"]
523    #[inline(always)]
524    pub fn clear_bit(self) -> &'a mut W {
525        self.bit(false)
526    }
527    #[doc = r"Writes raw bits to the field"]
528    #[inline(always)]
529    pub fn bit(self, value: bool) -> &'a mut W {
530        self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
531        self.w
532    }
533}
534#[doc = "COUNTER is greater than or equal to COMPARE register F.\n\nValue on reset: 0"]
535#[derive(Clone, Copy, Debug, PartialEq)]
536pub enum COMPAREF_A {
537    #[doc = "1: COUNTER greater than or equal to COMPARE register. value."]
538    COMPARED = 1,
539}
540impl From<COMPAREF_A> for bool {
541    #[inline(always)]
542    fn from(variant: COMPAREF_A) -> Self {
543        variant as u8 != 0
544    }
545}
546#[doc = "Field `COMPAREF` reader - COUNTER is greater than or equal to COMPARE register F."]
547pub struct COMPAREF_R(crate::FieldReader<bool, COMPAREF_A>);
548impl COMPAREF_R {
549    pub(crate) fn new(bits: bool) -> Self {
550        COMPAREF_R(crate::FieldReader::new(bits))
551    }
552    #[doc = r"Get enumerated values variant"]
553    #[inline(always)]
554    pub fn variant(&self) -> Option<COMPAREF_A> {
555        match self.bits {
556            true => Some(COMPAREF_A::COMPARED),
557            _ => None,
558        }
559    }
560    #[doc = "Checks if the value of the field is `COMPARED`"]
561    #[inline(always)]
562    pub fn is_compared(&self) -> bool {
563        **self == COMPAREF_A::COMPARED
564    }
565}
566impl core::ops::Deref for COMPAREF_R {
567    type Target = crate::FieldReader<bool, COMPAREF_A>;
568    #[inline(always)]
569    fn deref(&self) -> &Self::Target {
570        &self.0
571    }
572}
573#[doc = "Field `COMPAREF` writer - COUNTER is greater than or equal to COMPARE register F."]
574pub struct COMPAREF_W<'a> {
575    w: &'a mut W,
576}
577impl<'a> COMPAREF_W<'a> {
578    #[doc = r"Writes `variant` to the field"]
579    #[inline(always)]
580    pub fn variant(self, variant: COMPAREF_A) -> &'a mut W {
581        self.bit(variant.into())
582    }
583    #[doc = "COUNTER greater than or equal to COMPARE register. value."]
584    #[inline(always)]
585    pub fn compared(self) -> &'a mut W {
586        self.variant(COMPAREF_A::COMPARED)
587    }
588    #[doc = r"Sets the field bit"]
589    #[inline(always)]
590    pub fn set_bit(self) -> &'a mut W {
591        self.bit(true)
592    }
593    #[doc = r"Clears the field bit"]
594    #[inline(always)]
595    pub fn clear_bit(self) -> &'a mut W {
596        self.bit(false)
597    }
598    #[doc = r"Writes raw bits to the field"]
599    #[inline(always)]
600    pub fn bit(self, value: bool) -> &'a mut W {
601        self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
602        self.w
603    }
604}
605#[doc = "COUNTER is greater than or equal to COMPARE register E.\n\nValue on reset: 0"]
606#[derive(Clone, Copy, Debug, PartialEq)]
607pub enum COMPAREE_A {
608    #[doc = "1: COUNTER greater than or equal to COMPARE register. value."]
609    COMPARED = 1,
610}
611impl From<COMPAREE_A> for bool {
612    #[inline(always)]
613    fn from(variant: COMPAREE_A) -> Self {
614        variant as u8 != 0
615    }
616}
617#[doc = "Field `COMPAREE` reader - COUNTER is greater than or equal to COMPARE register E."]
618pub struct COMPAREE_R(crate::FieldReader<bool, COMPAREE_A>);
619impl COMPAREE_R {
620    pub(crate) fn new(bits: bool) -> Self {
621        COMPAREE_R(crate::FieldReader::new(bits))
622    }
623    #[doc = r"Get enumerated values variant"]
624    #[inline(always)]
625    pub fn variant(&self) -> Option<COMPAREE_A> {
626        match self.bits {
627            true => Some(COMPAREE_A::COMPARED),
628            _ => None,
629        }
630    }
631    #[doc = "Checks if the value of the field is `COMPARED`"]
632    #[inline(always)]
633    pub fn is_compared(&self) -> bool {
634        **self == COMPAREE_A::COMPARED
635    }
636}
637impl core::ops::Deref for COMPAREE_R {
638    type Target = crate::FieldReader<bool, COMPAREE_A>;
639    #[inline(always)]
640    fn deref(&self) -> &Self::Target {
641        &self.0
642    }
643}
644#[doc = "Field `COMPAREE` writer - COUNTER is greater than or equal to COMPARE register E."]
645pub struct COMPAREE_W<'a> {
646    w: &'a mut W,
647}
648impl<'a> COMPAREE_W<'a> {
649    #[doc = r"Writes `variant` to the field"]
650    #[inline(always)]
651    pub fn variant(self, variant: COMPAREE_A) -> &'a mut W {
652        self.bit(variant.into())
653    }
654    #[doc = "COUNTER greater than or equal to COMPARE register. value."]
655    #[inline(always)]
656    pub fn compared(self) -> &'a mut W {
657        self.variant(COMPAREE_A::COMPARED)
658    }
659    #[doc = r"Sets the field bit"]
660    #[inline(always)]
661    pub fn set_bit(self) -> &'a mut W {
662        self.bit(true)
663    }
664    #[doc = r"Clears the field bit"]
665    #[inline(always)]
666    pub fn clear_bit(self) -> &'a mut W {
667        self.bit(false)
668    }
669    #[doc = r"Writes raw bits to the field"]
670    #[inline(always)]
671    pub fn bit(self, value: bool) -> &'a mut W {
672        self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
673        self.w
674    }
675}
676#[doc = "COUNTER is greater than or equal to COMPARE register D.\n\nValue on reset: 0"]
677#[derive(Clone, Copy, Debug, PartialEq)]
678pub enum COMPARED_A {
679    #[doc = "1: COUNTER greater than or equal to COMPARE register. value."]
680    COMPARED = 1,
681}
682impl From<COMPARED_A> for bool {
683    #[inline(always)]
684    fn from(variant: COMPARED_A) -> Self {
685        variant as u8 != 0
686    }
687}
688#[doc = "Field `COMPARED` reader - COUNTER is greater than or equal to COMPARE register D."]
689pub struct COMPARED_R(crate::FieldReader<bool, COMPARED_A>);
690impl COMPARED_R {
691    pub(crate) fn new(bits: bool) -> Self {
692        COMPARED_R(crate::FieldReader::new(bits))
693    }
694    #[doc = r"Get enumerated values variant"]
695    #[inline(always)]
696    pub fn variant(&self) -> Option<COMPARED_A> {
697        match self.bits {
698            true => Some(COMPARED_A::COMPARED),
699            _ => None,
700        }
701    }
702    #[doc = "Checks if the value of the field is `COMPARED`"]
703    #[inline(always)]
704    pub fn is_compared(&self) -> bool {
705        **self == COMPARED_A::COMPARED
706    }
707}
708impl core::ops::Deref for COMPARED_R {
709    type Target = crate::FieldReader<bool, COMPARED_A>;
710    #[inline(always)]
711    fn deref(&self) -> &Self::Target {
712        &self.0
713    }
714}
715#[doc = "Field `COMPARED` writer - COUNTER is greater than or equal to COMPARE register D."]
716pub struct COMPARED_W<'a> {
717    w: &'a mut W,
718}
719impl<'a> COMPARED_W<'a> {
720    #[doc = r"Writes `variant` to the field"]
721    #[inline(always)]
722    pub fn variant(self, variant: COMPARED_A) -> &'a mut W {
723        self.bit(variant.into())
724    }
725    #[doc = "COUNTER greater than or equal to COMPARE register. value."]
726    #[inline(always)]
727    pub fn compared(self) -> &'a mut W {
728        self.variant(COMPARED_A::COMPARED)
729    }
730    #[doc = r"Sets the field bit"]
731    #[inline(always)]
732    pub fn set_bit(self) -> &'a mut W {
733        self.bit(true)
734    }
735    #[doc = r"Clears the field bit"]
736    #[inline(always)]
737    pub fn clear_bit(self) -> &'a mut W {
738        self.bit(false)
739    }
740    #[doc = r"Writes raw bits to the field"]
741    #[inline(always)]
742    pub fn bit(self, value: bool) -> &'a mut W {
743        self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
744        self.w
745    }
746}
747#[doc = "COUNTER is greater than or equal to COMPARE register C.\n\nValue on reset: 0"]
748#[derive(Clone, Copy, Debug, PartialEq)]
749pub enum COMPAREC_A {
750    #[doc = "1: COUNTER greater than or equal to COMPARE register. value."]
751    COMPARED = 1,
752}
753impl From<COMPAREC_A> for bool {
754    #[inline(always)]
755    fn from(variant: COMPAREC_A) -> Self {
756        variant as u8 != 0
757    }
758}
759#[doc = "Field `COMPAREC` reader - COUNTER is greater than or equal to COMPARE register C."]
760pub struct COMPAREC_R(crate::FieldReader<bool, COMPAREC_A>);
761impl COMPAREC_R {
762    pub(crate) fn new(bits: bool) -> Self {
763        COMPAREC_R(crate::FieldReader::new(bits))
764    }
765    #[doc = r"Get enumerated values variant"]
766    #[inline(always)]
767    pub fn variant(&self) -> Option<COMPAREC_A> {
768        match self.bits {
769            true => Some(COMPAREC_A::COMPARED),
770            _ => None,
771        }
772    }
773    #[doc = "Checks if the value of the field is `COMPARED`"]
774    #[inline(always)]
775    pub fn is_compared(&self) -> bool {
776        **self == COMPAREC_A::COMPARED
777    }
778}
779impl core::ops::Deref for COMPAREC_R {
780    type Target = crate::FieldReader<bool, COMPAREC_A>;
781    #[inline(always)]
782    fn deref(&self) -> &Self::Target {
783        &self.0
784    }
785}
786#[doc = "Field `COMPAREC` writer - COUNTER is greater than or equal to COMPARE register C."]
787pub struct COMPAREC_W<'a> {
788    w: &'a mut W,
789}
790impl<'a> COMPAREC_W<'a> {
791    #[doc = r"Writes `variant` to the field"]
792    #[inline(always)]
793    pub fn variant(self, variant: COMPAREC_A) -> &'a mut W {
794        self.bit(variant.into())
795    }
796    #[doc = "COUNTER greater than or equal to COMPARE register. value."]
797    #[inline(always)]
798    pub fn compared(self) -> &'a mut W {
799        self.variant(COMPAREC_A::COMPARED)
800    }
801    #[doc = r"Sets the field bit"]
802    #[inline(always)]
803    pub fn set_bit(self) -> &'a mut W {
804        self.bit(true)
805    }
806    #[doc = r"Clears the field bit"]
807    #[inline(always)]
808    pub fn clear_bit(self) -> &'a mut W {
809        self.bit(false)
810    }
811    #[doc = r"Writes raw bits to the field"]
812    #[inline(always)]
813    pub fn bit(self, value: bool) -> &'a mut W {
814        self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
815        self.w
816    }
817}
818#[doc = "COUNTER is greater than or equal to COMPARE register B.\n\nValue on reset: 0"]
819#[derive(Clone, Copy, Debug, PartialEq)]
820pub enum COMPAREB_A {
821    #[doc = "1: COUNTER greater than or equal to COMPARE register. value."]
822    COMPARED = 1,
823}
824impl From<COMPAREB_A> for bool {
825    #[inline(always)]
826    fn from(variant: COMPAREB_A) -> Self {
827        variant as u8 != 0
828    }
829}
830#[doc = "Field `COMPAREB` reader - COUNTER is greater than or equal to COMPARE register B."]
831pub struct COMPAREB_R(crate::FieldReader<bool, COMPAREB_A>);
832impl COMPAREB_R {
833    pub(crate) fn new(bits: bool) -> Self {
834        COMPAREB_R(crate::FieldReader::new(bits))
835    }
836    #[doc = r"Get enumerated values variant"]
837    #[inline(always)]
838    pub fn variant(&self) -> Option<COMPAREB_A> {
839        match self.bits {
840            true => Some(COMPAREB_A::COMPARED),
841            _ => None,
842        }
843    }
844    #[doc = "Checks if the value of the field is `COMPARED`"]
845    #[inline(always)]
846    pub fn is_compared(&self) -> bool {
847        **self == COMPAREB_A::COMPARED
848    }
849}
850impl core::ops::Deref for COMPAREB_R {
851    type Target = crate::FieldReader<bool, COMPAREB_A>;
852    #[inline(always)]
853    fn deref(&self) -> &Self::Target {
854        &self.0
855    }
856}
857#[doc = "Field `COMPAREB` writer - COUNTER is greater than or equal to COMPARE register B."]
858pub struct COMPAREB_W<'a> {
859    w: &'a mut W,
860}
861impl<'a> COMPAREB_W<'a> {
862    #[doc = r"Writes `variant` to the field"]
863    #[inline(always)]
864    pub fn variant(self, variant: COMPAREB_A) -> &'a mut W {
865        self.bit(variant.into())
866    }
867    #[doc = "COUNTER greater than or equal to COMPARE register. value."]
868    #[inline(always)]
869    pub fn compared(self) -> &'a mut W {
870        self.variant(COMPAREB_A::COMPARED)
871    }
872    #[doc = r"Sets the field bit"]
873    #[inline(always)]
874    pub fn set_bit(self) -> &'a mut W {
875        self.bit(true)
876    }
877    #[doc = r"Clears the field bit"]
878    #[inline(always)]
879    pub fn clear_bit(self) -> &'a mut W {
880        self.bit(false)
881    }
882    #[doc = r"Writes raw bits to the field"]
883    #[inline(always)]
884    pub fn bit(self, value: bool) -> &'a mut W {
885        self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
886        self.w
887    }
888}
889#[doc = "COUNTER is greater than or equal to COMPARE register A.\n\nValue on reset: 0"]
890#[derive(Clone, Copy, Debug, PartialEq)]
891pub enum COMPAREA_A {
892    #[doc = "1: COUNTER greater than or equal to COMPARE register. value."]
893    COMPARED = 1,
894}
895impl From<COMPAREA_A> for bool {
896    #[inline(always)]
897    fn from(variant: COMPAREA_A) -> Self {
898        variant as u8 != 0
899    }
900}
901#[doc = "Field `COMPAREA` reader - COUNTER is greater than or equal to COMPARE register A."]
902pub struct COMPAREA_R(crate::FieldReader<bool, COMPAREA_A>);
903impl COMPAREA_R {
904    pub(crate) fn new(bits: bool) -> Self {
905        COMPAREA_R(crate::FieldReader::new(bits))
906    }
907    #[doc = r"Get enumerated values variant"]
908    #[inline(always)]
909    pub fn variant(&self) -> Option<COMPAREA_A> {
910        match self.bits {
911            true => Some(COMPAREA_A::COMPARED),
912            _ => None,
913        }
914    }
915    #[doc = "Checks if the value of the field is `COMPARED`"]
916    #[inline(always)]
917    pub fn is_compared(&self) -> bool {
918        **self == COMPAREA_A::COMPARED
919    }
920}
921impl core::ops::Deref for COMPAREA_R {
922    type Target = crate::FieldReader<bool, COMPAREA_A>;
923    #[inline(always)]
924    fn deref(&self) -> &Self::Target {
925        &self.0
926    }
927}
928#[doc = "Field `COMPAREA` writer - COUNTER is greater than or equal to COMPARE register A."]
929pub struct COMPAREA_W<'a> {
930    w: &'a mut W,
931}
932impl<'a> COMPAREA_W<'a> {
933    #[doc = r"Writes `variant` to the field"]
934    #[inline(always)]
935    pub fn variant(self, variant: COMPAREA_A) -> &'a mut W {
936        self.bit(variant.into())
937    }
938    #[doc = "COUNTER greater than or equal to COMPARE register. value."]
939    #[inline(always)]
940    pub fn compared(self) -> &'a mut W {
941        self.variant(COMPAREA_A::COMPARED)
942    }
943    #[doc = r"Sets the field bit"]
944    #[inline(always)]
945    pub fn set_bit(self) -> &'a mut W {
946        self.bit(true)
947    }
948    #[doc = r"Clears the field bit"]
949    #[inline(always)]
950    pub fn clear_bit(self) -> &'a mut W {
951        self.bit(false)
952    }
953    #[doc = r"Writes raw bits to the field"]
954    #[inline(always)]
955    pub fn bit(self, value: bool) -> &'a mut W {
956        self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
957        self.w
958    }
959}
960impl R {
961    #[doc = "Bit 12 - CAPTURE register D has grabbed the value in the counter"]
962    #[inline(always)]
963    pub fn captured(&self) -> CAPTURED_R {
964        CAPTURED_R::new(((self.bits >> 12) & 0x01) != 0)
965    }
966    #[doc = "Bit 11 - CAPTURE register C has grabbed the value in the counter"]
967    #[inline(always)]
968    pub fn capturec(&self) -> CAPTUREC_R {
969        CAPTUREC_R::new(((self.bits >> 11) & 0x01) != 0)
970    }
971    #[doc = "Bit 10 - CAPTURE register B has grabbed the value in the counter"]
972    #[inline(always)]
973    pub fn captureb(&self) -> CAPTUREB_R {
974        CAPTUREB_R::new(((self.bits >> 10) & 0x01) != 0)
975    }
976    #[doc = "Bit 9 - CAPTURE register A has grabbed the value in the counter"]
977    #[inline(always)]
978    pub fn capturea(&self) -> CAPTUREA_R {
979        CAPTUREA_R::new(((self.bits >> 9) & 0x01) != 0)
980    }
981    #[doc = "Bit 8 - COUNTER over flowed from 0xFFFFFFFF back to 0x00000000."]
982    #[inline(always)]
983    pub fn overflow(&self) -> OVERFLOW_R {
984        OVERFLOW_R::new(((self.bits >> 8) & 0x01) != 0)
985    }
986    #[doc = "Bit 7 - COUNTER is greater than or equal to COMPARE register H."]
987    #[inline(always)]
988    pub fn compareh(&self) -> COMPAREH_R {
989        COMPAREH_R::new(((self.bits >> 7) & 0x01) != 0)
990    }
991    #[doc = "Bit 6 - COUNTER is greater than or equal to COMPARE register G."]
992    #[inline(always)]
993    pub fn compareg(&self) -> COMPAREG_R {
994        COMPAREG_R::new(((self.bits >> 6) & 0x01) != 0)
995    }
996    #[doc = "Bit 5 - COUNTER is greater than or equal to COMPARE register F."]
997    #[inline(always)]
998    pub fn comparef(&self) -> COMPAREF_R {
999        COMPAREF_R::new(((self.bits >> 5) & 0x01) != 0)
1000    }
1001    #[doc = "Bit 4 - COUNTER is greater than or equal to COMPARE register E."]
1002    #[inline(always)]
1003    pub fn comparee(&self) -> COMPAREE_R {
1004        COMPAREE_R::new(((self.bits >> 4) & 0x01) != 0)
1005    }
1006    #[doc = "Bit 3 - COUNTER is greater than or equal to COMPARE register D."]
1007    #[inline(always)]
1008    pub fn compared(&self) -> COMPARED_R {
1009        COMPARED_R::new(((self.bits >> 3) & 0x01) != 0)
1010    }
1011    #[doc = "Bit 2 - COUNTER is greater than or equal to COMPARE register C."]
1012    #[inline(always)]
1013    pub fn comparec(&self) -> COMPAREC_R {
1014        COMPAREC_R::new(((self.bits >> 2) & 0x01) != 0)
1015    }
1016    #[doc = "Bit 1 - COUNTER is greater than or equal to COMPARE register B."]
1017    #[inline(always)]
1018    pub fn compareb(&self) -> COMPAREB_R {
1019        COMPAREB_R::new(((self.bits >> 1) & 0x01) != 0)
1020    }
1021    #[doc = "Bit 0 - COUNTER is greater than or equal to COMPARE register A."]
1022    #[inline(always)]
1023    pub fn comparea(&self) -> COMPAREA_R {
1024        COMPAREA_R::new((self.bits & 0x01) != 0)
1025    }
1026}
1027impl W {
1028    #[doc = "Bit 12 - CAPTURE register D has grabbed the value in the counter"]
1029    #[inline(always)]
1030    pub fn captured(&mut self) -> CAPTURED_W {
1031        CAPTURED_W { w: self }
1032    }
1033    #[doc = "Bit 11 - CAPTURE register C has grabbed the value in the counter"]
1034    #[inline(always)]
1035    pub fn capturec(&mut self) -> CAPTUREC_W {
1036        CAPTUREC_W { w: self }
1037    }
1038    #[doc = "Bit 10 - CAPTURE register B has grabbed the value in the counter"]
1039    #[inline(always)]
1040    pub fn captureb(&mut self) -> CAPTUREB_W {
1041        CAPTUREB_W { w: self }
1042    }
1043    #[doc = "Bit 9 - CAPTURE register A has grabbed the value in the counter"]
1044    #[inline(always)]
1045    pub fn capturea(&mut self) -> CAPTUREA_W {
1046        CAPTUREA_W { w: self }
1047    }
1048    #[doc = "Bit 8 - COUNTER over flowed from 0xFFFFFFFF back to 0x00000000."]
1049    #[inline(always)]
1050    pub fn overflow(&mut self) -> OVERFLOW_W {
1051        OVERFLOW_W { w: self }
1052    }
1053    #[doc = "Bit 7 - COUNTER is greater than or equal to COMPARE register H."]
1054    #[inline(always)]
1055    pub fn compareh(&mut self) -> COMPAREH_W {
1056        COMPAREH_W { w: self }
1057    }
1058    #[doc = "Bit 6 - COUNTER is greater than or equal to COMPARE register G."]
1059    #[inline(always)]
1060    pub fn compareg(&mut self) -> COMPAREG_W {
1061        COMPAREG_W { w: self }
1062    }
1063    #[doc = "Bit 5 - COUNTER is greater than or equal to COMPARE register F."]
1064    #[inline(always)]
1065    pub fn comparef(&mut self) -> COMPAREF_W {
1066        COMPAREF_W { w: self }
1067    }
1068    #[doc = "Bit 4 - COUNTER is greater than or equal to COMPARE register E."]
1069    #[inline(always)]
1070    pub fn comparee(&mut self) -> COMPAREE_W {
1071        COMPAREE_W { w: self }
1072    }
1073    #[doc = "Bit 3 - COUNTER is greater than or equal to COMPARE register D."]
1074    #[inline(always)]
1075    pub fn compared(&mut self) -> COMPARED_W {
1076        COMPARED_W { w: self }
1077    }
1078    #[doc = "Bit 2 - COUNTER is greater than or equal to COMPARE register C."]
1079    #[inline(always)]
1080    pub fn comparec(&mut self) -> COMPAREC_W {
1081        COMPAREC_W { w: self }
1082    }
1083    #[doc = "Bit 1 - COUNTER is greater than or equal to COMPARE register B."]
1084    #[inline(always)]
1085    pub fn compareb(&mut self) -> COMPAREB_W {
1086        COMPAREB_W { w: self }
1087    }
1088    #[doc = "Bit 0 - COUNTER is greater than or equal to COMPARE register A."]
1089    #[inline(always)]
1090    pub fn comparea(&mut self) -> COMPAREA_W {
1091        COMPAREA_W { w: self }
1092    }
1093    #[doc = "Writes raw bits to the register."]
1094    #[inline(always)]
1095    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1096        self.0.bits(bits);
1097        self
1098    }
1099}
1100#[doc = "STIMER Interrupt registers: Status\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 [stmintstat](index.html) module"]
1101pub struct STMINTSTAT_SPEC;
1102impl crate::RegisterSpec for STMINTSTAT_SPEC {
1103    type Ux = u32;
1104}
1105#[doc = "`read()` method returns [stmintstat::R](R) reader structure"]
1106impl crate::Readable for STMINTSTAT_SPEC {
1107    type Reader = R;
1108}
1109#[doc = "`write(|w| ..)` method takes [stmintstat::W](W) writer structure"]
1110impl crate::Writable for STMINTSTAT_SPEC {
1111    type Writer = W;
1112}
1113#[doc = "`reset()` method sets STMINTSTAT to value 0"]
1114impl crate::Resettable for STMINTSTAT_SPEC {
1115    #[inline(always)]
1116    fn reset_value() -> Self::Ux {
1117        0
1118    }
1119}