efm32gg12b830_pac/wtimer0/
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 `OF` reader - Overflow Interrupt Flag"]
17pub type OF_R = crate::BitReader<bool>;
18#[doc = "Field `UF` reader - Underflow Interrupt Flag"]
19pub type UF_R = crate::BitReader<bool>;
20#[doc = "Field `DIRCHG` reader - Direction Change Detect Interrupt Flag"]
21pub type DIRCHG_R = crate::BitReader<bool>;
22#[doc = "Field `CC0` reader - CC Channel 0 Interrupt Flag"]
23pub type CC0_R = crate::BitReader<bool>;
24#[doc = "Field `CC1` reader - CC Channel 1 Interrupt Flag"]
25pub type CC1_R = crate::BitReader<bool>;
26#[doc = "Field `CC2` reader - CC Channel 2 Interrupt Flag"]
27pub type CC2_R = crate::BitReader<bool>;
28#[doc = "Field `CC3` reader - CC Channel 3 Interrupt Flag"]
29pub type CC3_R = crate::BitReader<bool>;
30#[doc = "Field `ICBOF0` reader - CC Channel 0 Input Capture Buffer Overflow Interrupt Flag"]
31pub type ICBOF0_R = crate::BitReader<bool>;
32#[doc = "Field `ICBOF1` reader - CC Channel 1 Input Capture Buffer Overflow Interrupt Flag"]
33pub type ICBOF1_R = crate::BitReader<bool>;
34#[doc = "Field `ICBOF2` reader - CC Channel 2 Input Capture Buffer Overflow Interrupt Flag"]
35pub type ICBOF2_R = crate::BitReader<bool>;
36#[doc = "Field `ICBOF3` reader - CC Channel 3 Input Capture Buffer Overflow Interrupt Flag"]
37pub type ICBOF3_R = crate::BitReader<bool>;
38impl R {
39    #[doc = "Bit 0 - Overflow Interrupt Flag"]
40    #[inline(always)]
41    pub fn of(&self) -> OF_R {
42        OF_R::new((self.bits & 1) != 0)
43    }
44    #[doc = "Bit 1 - Underflow Interrupt Flag"]
45    #[inline(always)]
46    pub fn uf(&self) -> UF_R {
47        UF_R::new(((self.bits >> 1) & 1) != 0)
48    }
49    #[doc = "Bit 2 - Direction Change Detect Interrupt Flag"]
50    #[inline(always)]
51    pub fn dirchg(&self) -> DIRCHG_R {
52        DIRCHG_R::new(((self.bits >> 2) & 1) != 0)
53    }
54    #[doc = "Bit 4 - CC Channel 0 Interrupt Flag"]
55    #[inline(always)]
56    pub fn cc0(&self) -> CC0_R {
57        CC0_R::new(((self.bits >> 4) & 1) != 0)
58    }
59    #[doc = "Bit 5 - CC Channel 1 Interrupt Flag"]
60    #[inline(always)]
61    pub fn cc1(&self) -> CC1_R {
62        CC1_R::new(((self.bits >> 5) & 1) != 0)
63    }
64    #[doc = "Bit 6 - CC Channel 2 Interrupt Flag"]
65    #[inline(always)]
66    pub fn cc2(&self) -> CC2_R {
67        CC2_R::new(((self.bits >> 6) & 1) != 0)
68    }
69    #[doc = "Bit 7 - CC Channel 3 Interrupt Flag"]
70    #[inline(always)]
71    pub fn cc3(&self) -> CC3_R {
72        CC3_R::new(((self.bits >> 7) & 1) != 0)
73    }
74    #[doc = "Bit 8 - CC Channel 0 Input Capture Buffer Overflow Interrupt Flag"]
75    #[inline(always)]
76    pub fn icbof0(&self) -> ICBOF0_R {
77        ICBOF0_R::new(((self.bits >> 8) & 1) != 0)
78    }
79    #[doc = "Bit 9 - CC Channel 1 Input Capture Buffer Overflow Interrupt Flag"]
80    #[inline(always)]
81    pub fn icbof1(&self) -> ICBOF1_R {
82        ICBOF1_R::new(((self.bits >> 9) & 1) != 0)
83    }
84    #[doc = "Bit 10 - CC Channel 2 Input Capture Buffer Overflow Interrupt Flag"]
85    #[inline(always)]
86    pub fn icbof2(&self) -> ICBOF2_R {
87        ICBOF2_R::new(((self.bits >> 10) & 1) != 0)
88    }
89    #[doc = "Bit 11 - CC Channel 3 Input Capture Buffer Overflow Interrupt Flag"]
90    #[inline(always)]
91    pub fn icbof3(&self) -> ICBOF3_R {
92        ICBOF3_R::new(((self.bits >> 11) & 1) != 0)
93    }
94}
95#[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"]
96pub struct IF_SPEC;
97impl crate::RegisterSpec for IF_SPEC {
98    type Ux = u32;
99}
100#[doc = "`read()` method returns [if_::R](R) reader structure"]
101impl crate::Readable for IF_SPEC {
102    type Reader = R;
103}
104#[doc = "`reset()` method sets IF to value 0"]
105impl crate::Resettable for IF_SPEC {
106    #[inline(always)]
107    fn reset_value() -> Self::Ux {
108        0
109    }
110}