efm32pg12b500_pac/cmu/
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 `HFRCORDY` reader - HFRCO Ready Interrupt Flag"]
17pub type HFRCORDY_R = crate::BitReader<bool>;
18#[doc = "Field `HFXORDY` reader - HFXO Ready Interrupt Flag"]
19pub type HFXORDY_R = crate::BitReader<bool>;
20#[doc = "Field `LFRCORDY` reader - LFRCO Ready Interrupt Flag"]
21pub type LFRCORDY_R = crate::BitReader<bool>;
22#[doc = "Field `LFXORDY` reader - LFXO Ready Interrupt Flag"]
23pub type LFXORDY_R = crate::BitReader<bool>;
24#[doc = "Field `AUXHFRCORDY` reader - AUXHFRCO Ready Interrupt Flag"]
25pub type AUXHFRCORDY_R = crate::BitReader<bool>;
26#[doc = "Field `CALRDY` reader - Calibration Ready Interrupt Flag"]
27pub type CALRDY_R = crate::BitReader<bool>;
28#[doc = "Field `CALOF` reader - Calibration Overflow Interrupt Flag"]
29pub type CALOF_R = crate::BitReader<bool>;
30#[doc = "Field `HFXODISERR` reader - HFXO Disable Error Interrupt Flag"]
31pub type HFXODISERR_R = crate::BitReader<bool>;
32#[doc = "Field `HFXOAUTOSW` reader - HFXO Automatic Switch Interrupt Flag"]
33pub type HFXOAUTOSW_R = crate::BitReader<bool>;
34#[doc = "Field `HFXOPEAKDETERR` reader - HFXO Automatic Peak Detection Error Interrupt Flag"]
35pub type HFXOPEAKDETERR_R = crate::BitReader<bool>;
36#[doc = "Field `HFXOPEAKDETRDY` reader - HFXO Automatic Peak Detection Ready Interrupt Flag"]
37pub type HFXOPEAKDETRDY_R = crate::BitReader<bool>;
38#[doc = "Field `HFXOSHUNTOPTRDY` reader - HFXO Automatic Shunt Current Optimization Ready Interrupt Flag"]
39pub type HFXOSHUNTOPTRDY_R = crate::BitReader<bool>;
40#[doc = "Field `HFRCODIS` reader - HFRCO Disable Interrupt Flag"]
41pub type HFRCODIS_R = crate::BitReader<bool>;
42#[doc = "Field `LFTIMEOUTERR` reader - Low Frequency Timeout Error Interrupt Flag"]
43pub type LFTIMEOUTERR_R = crate::BitReader<bool>;
44#[doc = "Field `DPLLRDY` reader - DPLL Lock Interrupt Flag"]
45pub type DPLLRDY_R = crate::BitReader<bool>;
46#[doc = "Field `DPLLLOCKFAILLOW` reader - DPLL Lock Failure Low Interrupt Flag"]
47pub type DPLLLOCKFAILLOW_R = crate::BitReader<bool>;
48#[doc = "Field `DPLLLOCKFAILHIGH` reader - DPLL Lock Failure Low Interrupt Flag"]
49pub type DPLLLOCKFAILHIGH_R = crate::BitReader<bool>;
50#[doc = "Field `CMUERR` reader - CMU Error Interrupt Flag"]
51pub type CMUERR_R = crate::BitReader<bool>;
52impl R {
53    #[doc = "Bit 0 - HFRCO Ready Interrupt Flag"]
54    #[inline(always)]
55    pub fn hfrcordy(&self) -> HFRCORDY_R {
56        HFRCORDY_R::new((self.bits & 1) != 0)
57    }
58    #[doc = "Bit 1 - HFXO Ready Interrupt Flag"]
59    #[inline(always)]
60    pub fn hfxordy(&self) -> HFXORDY_R {
61        HFXORDY_R::new(((self.bits >> 1) & 1) != 0)
62    }
63    #[doc = "Bit 2 - LFRCO Ready Interrupt Flag"]
64    #[inline(always)]
65    pub fn lfrcordy(&self) -> LFRCORDY_R {
66        LFRCORDY_R::new(((self.bits >> 2) & 1) != 0)
67    }
68    #[doc = "Bit 3 - LFXO Ready Interrupt Flag"]
69    #[inline(always)]
70    pub fn lfxordy(&self) -> LFXORDY_R {
71        LFXORDY_R::new(((self.bits >> 3) & 1) != 0)
72    }
73    #[doc = "Bit 4 - AUXHFRCO Ready Interrupt Flag"]
74    #[inline(always)]
75    pub fn auxhfrcordy(&self) -> AUXHFRCORDY_R {
76        AUXHFRCORDY_R::new(((self.bits >> 4) & 1) != 0)
77    }
78    #[doc = "Bit 5 - Calibration Ready Interrupt Flag"]
79    #[inline(always)]
80    pub fn calrdy(&self) -> CALRDY_R {
81        CALRDY_R::new(((self.bits >> 5) & 1) != 0)
82    }
83    #[doc = "Bit 6 - Calibration Overflow Interrupt Flag"]
84    #[inline(always)]
85    pub fn calof(&self) -> CALOF_R {
86        CALOF_R::new(((self.bits >> 6) & 1) != 0)
87    }
88    #[doc = "Bit 8 - HFXO Disable Error Interrupt Flag"]
89    #[inline(always)]
90    pub fn hfxodiserr(&self) -> HFXODISERR_R {
91        HFXODISERR_R::new(((self.bits >> 8) & 1) != 0)
92    }
93    #[doc = "Bit 9 - HFXO Automatic Switch Interrupt Flag"]
94    #[inline(always)]
95    pub fn hfxoautosw(&self) -> HFXOAUTOSW_R {
96        HFXOAUTOSW_R::new(((self.bits >> 9) & 1) != 0)
97    }
98    #[doc = "Bit 10 - HFXO Automatic Peak Detection Error Interrupt Flag"]
99    #[inline(always)]
100    pub fn hfxopeakdeterr(&self) -> HFXOPEAKDETERR_R {
101        HFXOPEAKDETERR_R::new(((self.bits >> 10) & 1) != 0)
102    }
103    #[doc = "Bit 11 - HFXO Automatic Peak Detection Ready Interrupt Flag"]
104    #[inline(always)]
105    pub fn hfxopeakdetrdy(&self) -> HFXOPEAKDETRDY_R {
106        HFXOPEAKDETRDY_R::new(((self.bits >> 11) & 1) != 0)
107    }
108    #[doc = "Bit 12 - HFXO Automatic Shunt Current Optimization Ready Interrupt Flag"]
109    #[inline(always)]
110    pub fn hfxoshuntoptrdy(&self) -> HFXOSHUNTOPTRDY_R {
111        HFXOSHUNTOPTRDY_R::new(((self.bits >> 12) & 1) != 0)
112    }
113    #[doc = "Bit 13 - HFRCO Disable Interrupt Flag"]
114    #[inline(always)]
115    pub fn hfrcodis(&self) -> HFRCODIS_R {
116        HFRCODIS_R::new(((self.bits >> 13) & 1) != 0)
117    }
118    #[doc = "Bit 14 - Low Frequency Timeout Error Interrupt Flag"]
119    #[inline(always)]
120    pub fn lftimeouterr(&self) -> LFTIMEOUTERR_R {
121        LFTIMEOUTERR_R::new(((self.bits >> 14) & 1) != 0)
122    }
123    #[doc = "Bit 15 - DPLL Lock Interrupt Flag"]
124    #[inline(always)]
125    pub fn dpllrdy(&self) -> DPLLRDY_R {
126        DPLLRDY_R::new(((self.bits >> 15) & 1) != 0)
127    }
128    #[doc = "Bit 16 - DPLL Lock Failure Low Interrupt Flag"]
129    #[inline(always)]
130    pub fn dplllockfaillow(&self) -> DPLLLOCKFAILLOW_R {
131        DPLLLOCKFAILLOW_R::new(((self.bits >> 16) & 1) != 0)
132    }
133    #[doc = "Bit 17 - DPLL Lock Failure Low Interrupt Flag"]
134    #[inline(always)]
135    pub fn dplllockfailhigh(&self) -> DPLLLOCKFAILHIGH_R {
136        DPLLLOCKFAILHIGH_R::new(((self.bits >> 17) & 1) != 0)
137    }
138    #[doc = "Bit 31 - CMU Error Interrupt Flag"]
139    #[inline(always)]
140    pub fn cmuerr(&self) -> CMUERR_R {
141        CMUERR_R::new(((self.bits >> 31) & 1) != 0)
142    }
143}
144#[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"]
145pub struct IF_SPEC;
146impl crate::RegisterSpec for IF_SPEC {
147    type Ux = u32;
148}
149#[doc = "`read()` method returns [if_::R](R) reader structure"]
150impl crate::Readable for IF_SPEC {
151    type Reader = R;
152}
153#[doc = "`reset()` method sets IF to value 0x01"]
154impl crate::Resettable for IF_SPEC {
155    #[inline(always)]
156    fn reset_value() -> Self::Ux {
157        0x01
158    }
159}