efm32pg1b100_pac/rtcc/
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 `CC0` reader - Channel 0 Interrupt Flag"]
19pub type CC0_R = crate::BitReader<bool>;
20#[doc = "Field `CC1` reader - Channel 1 Interrupt Flag"]
21pub type CC1_R = crate::BitReader<bool>;
22#[doc = "Field `CC2` reader - Channel 2 Interrupt Flag"]
23pub type CC2_R = crate::BitReader<bool>;
24#[doc = "Field `OSCFAIL` reader - Oscillator Failure Interrupt Flag"]
25pub type OSCFAIL_R = crate::BitReader<bool>;
26#[doc = "Field `CNTTICK` reader - Main Counter Tick"]
27pub type CNTTICK_R = crate::BitReader<bool>;
28#[doc = "Field `MINTICK` reader - Minute Tick"]
29pub type MINTICK_R = crate::BitReader<bool>;
30#[doc = "Field `HOURTICK` reader - Hour Tick"]
31pub type HOURTICK_R = crate::BitReader<bool>;
32#[doc = "Field `DAYTICK` reader - Day Tick"]
33pub type DAYTICK_R = crate::BitReader<bool>;
34#[doc = "Field `DAYOWOF` reader - Day of Week Overflow"]
35pub type DAYOWOF_R = crate::BitReader<bool>;
36#[doc = "Field `MONTHTICK` reader - Month Tick"]
37pub type MONTHTICK_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 - Channel 0 Interrupt Flag"]
45    #[inline(always)]
46    pub fn cc0(&self) -> CC0_R {
47        CC0_R::new(((self.bits >> 1) & 1) != 0)
48    }
49    #[doc = "Bit 2 - Channel 1 Interrupt Flag"]
50    #[inline(always)]
51    pub fn cc1(&self) -> CC1_R {
52        CC1_R::new(((self.bits >> 2) & 1) != 0)
53    }
54    #[doc = "Bit 3 - Channel 2 Interrupt Flag"]
55    #[inline(always)]
56    pub fn cc2(&self) -> CC2_R {
57        CC2_R::new(((self.bits >> 3) & 1) != 0)
58    }
59    #[doc = "Bit 4 - Oscillator Failure Interrupt Flag"]
60    #[inline(always)]
61    pub fn oscfail(&self) -> OSCFAIL_R {
62        OSCFAIL_R::new(((self.bits >> 4) & 1) != 0)
63    }
64    #[doc = "Bit 5 - Main Counter Tick"]
65    #[inline(always)]
66    pub fn cnttick(&self) -> CNTTICK_R {
67        CNTTICK_R::new(((self.bits >> 5) & 1) != 0)
68    }
69    #[doc = "Bit 6 - Minute Tick"]
70    #[inline(always)]
71    pub fn mintick(&self) -> MINTICK_R {
72        MINTICK_R::new(((self.bits >> 6) & 1) != 0)
73    }
74    #[doc = "Bit 7 - Hour Tick"]
75    #[inline(always)]
76    pub fn hourtick(&self) -> HOURTICK_R {
77        HOURTICK_R::new(((self.bits >> 7) & 1) != 0)
78    }
79    #[doc = "Bit 8 - Day Tick"]
80    #[inline(always)]
81    pub fn daytick(&self) -> DAYTICK_R {
82        DAYTICK_R::new(((self.bits >> 8) & 1) != 0)
83    }
84    #[doc = "Bit 9 - Day of Week Overflow"]
85    #[inline(always)]
86    pub fn dayowof(&self) -> DAYOWOF_R {
87        DAYOWOF_R::new(((self.bits >> 9) & 1) != 0)
88    }
89    #[doc = "Bit 10 - Month Tick"]
90    #[inline(always)]
91    pub fn monthtick(&self) -> MONTHTICK_R {
92        MONTHTICK_R::new(((self.bits >> 10) & 1) != 0)
93    }
94}
95#[doc = "RTCC Interrupt Flags\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}