efm32jg12b_pac/efm32jg12b500/cmu/
ien.rs

1#[doc = "Register `IEN` reader"]
2pub struct R(crate::R<IEN_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<IEN_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<IEN_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<IEN_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `IEN` writer"]
17pub struct W(crate::W<IEN_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<IEN_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<IEN_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<IEN_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `HFRCORDY` reader - HFRCORDY Interrupt Enable"]
38pub type HFRCORDY_R = crate::BitReader<bool>;
39#[doc = "Field `HFRCORDY` writer - HFRCORDY Interrupt Enable"]
40pub type HFRCORDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
41#[doc = "Field `HFXORDY` reader - HFXORDY Interrupt Enable"]
42pub type HFXORDY_R = crate::BitReader<bool>;
43#[doc = "Field `HFXORDY` writer - HFXORDY Interrupt Enable"]
44pub type HFXORDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
45#[doc = "Field `LFRCORDY` reader - LFRCORDY Interrupt Enable"]
46pub type LFRCORDY_R = crate::BitReader<bool>;
47#[doc = "Field `LFRCORDY` writer - LFRCORDY Interrupt Enable"]
48pub type LFRCORDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
49#[doc = "Field `LFXORDY` reader - LFXORDY Interrupt Enable"]
50pub type LFXORDY_R = crate::BitReader<bool>;
51#[doc = "Field `LFXORDY` writer - LFXORDY Interrupt Enable"]
52pub type LFXORDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
53#[doc = "Field `AUXHFRCORDY` reader - AUXHFRCORDY Interrupt Enable"]
54pub type AUXHFRCORDY_R = crate::BitReader<bool>;
55#[doc = "Field `AUXHFRCORDY` writer - AUXHFRCORDY Interrupt Enable"]
56pub type AUXHFRCORDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
57#[doc = "Field `CALRDY` reader - CALRDY Interrupt Enable"]
58pub type CALRDY_R = crate::BitReader<bool>;
59#[doc = "Field `CALRDY` writer - CALRDY Interrupt Enable"]
60pub type CALRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
61#[doc = "Field `CALOF` reader - CALOF Interrupt Enable"]
62pub type CALOF_R = crate::BitReader<bool>;
63#[doc = "Field `CALOF` writer - CALOF Interrupt Enable"]
64pub type CALOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
65#[doc = "Field `HFXODISERR` reader - HFXODISERR Interrupt Enable"]
66pub type HFXODISERR_R = crate::BitReader<bool>;
67#[doc = "Field `HFXODISERR` writer - HFXODISERR Interrupt Enable"]
68pub type HFXODISERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
69#[doc = "Field `HFXOAUTOSW` reader - HFXOAUTOSW Interrupt Enable"]
70pub type HFXOAUTOSW_R = crate::BitReader<bool>;
71#[doc = "Field `HFXOAUTOSW` writer - HFXOAUTOSW Interrupt Enable"]
72pub type HFXOAUTOSW_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
73#[doc = "Field `HFXOPEAKDETERR` reader - HFXOPEAKDETERR Interrupt Enable"]
74pub type HFXOPEAKDETERR_R = crate::BitReader<bool>;
75#[doc = "Field `HFXOPEAKDETERR` writer - HFXOPEAKDETERR Interrupt Enable"]
76pub type HFXOPEAKDETERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
77#[doc = "Field `HFXOPEAKDETRDY` reader - HFXOPEAKDETRDY Interrupt Enable"]
78pub type HFXOPEAKDETRDY_R = crate::BitReader<bool>;
79#[doc = "Field `HFXOPEAKDETRDY` writer - HFXOPEAKDETRDY Interrupt Enable"]
80pub type HFXOPEAKDETRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
81#[doc = "Field `HFXOSHUNTOPTRDY` reader - HFXOSHUNTOPTRDY Interrupt Enable"]
82pub type HFXOSHUNTOPTRDY_R = crate::BitReader<bool>;
83#[doc = "Field `HFXOSHUNTOPTRDY` writer - HFXOSHUNTOPTRDY Interrupt Enable"]
84pub type HFXOSHUNTOPTRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
85#[doc = "Field `HFRCODIS` reader - HFRCODIS Interrupt Enable"]
86pub type HFRCODIS_R = crate::BitReader<bool>;
87#[doc = "Field `HFRCODIS` writer - HFRCODIS Interrupt Enable"]
88pub type HFRCODIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
89#[doc = "Field `LFTIMEOUTERR` reader - LFTIMEOUTERR Interrupt Enable"]
90pub type LFTIMEOUTERR_R = crate::BitReader<bool>;
91#[doc = "Field `LFTIMEOUTERR` writer - LFTIMEOUTERR Interrupt Enable"]
92pub type LFTIMEOUTERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
93#[doc = "Field `DPLLRDY` reader - DPLLRDY Interrupt Enable"]
94pub type DPLLRDY_R = crate::BitReader<bool>;
95#[doc = "Field `DPLLRDY` writer - DPLLRDY Interrupt Enable"]
96pub type DPLLRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
97#[doc = "Field `DPLLLOCKFAILLOW` reader - DPLLLOCKFAILLOW Interrupt Enable"]
98pub type DPLLLOCKFAILLOW_R = crate::BitReader<bool>;
99#[doc = "Field `DPLLLOCKFAILLOW` writer - DPLLLOCKFAILLOW Interrupt Enable"]
100pub type DPLLLOCKFAILLOW_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
101#[doc = "Field `DPLLLOCKFAILHIGH` reader - DPLLLOCKFAILHIGH Interrupt Enable"]
102pub type DPLLLOCKFAILHIGH_R = crate::BitReader<bool>;
103#[doc = "Field `DPLLLOCKFAILHIGH` writer - DPLLLOCKFAILHIGH Interrupt Enable"]
104pub type DPLLLOCKFAILHIGH_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
105#[doc = "Field `CMUERR` reader - CMUERR Interrupt Enable"]
106pub type CMUERR_R = crate::BitReader<bool>;
107#[doc = "Field `CMUERR` writer - CMUERR Interrupt Enable"]
108pub type CMUERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
109impl R {
110    #[doc = "Bit 0 - HFRCORDY Interrupt Enable"]
111    #[inline(always)]
112    pub fn hfrcordy(&self) -> HFRCORDY_R {
113        HFRCORDY_R::new((self.bits & 1) != 0)
114    }
115    #[doc = "Bit 1 - HFXORDY Interrupt Enable"]
116    #[inline(always)]
117    pub fn hfxordy(&self) -> HFXORDY_R {
118        HFXORDY_R::new(((self.bits >> 1) & 1) != 0)
119    }
120    #[doc = "Bit 2 - LFRCORDY Interrupt Enable"]
121    #[inline(always)]
122    pub fn lfrcordy(&self) -> LFRCORDY_R {
123        LFRCORDY_R::new(((self.bits >> 2) & 1) != 0)
124    }
125    #[doc = "Bit 3 - LFXORDY Interrupt Enable"]
126    #[inline(always)]
127    pub fn lfxordy(&self) -> LFXORDY_R {
128        LFXORDY_R::new(((self.bits >> 3) & 1) != 0)
129    }
130    #[doc = "Bit 4 - AUXHFRCORDY Interrupt Enable"]
131    #[inline(always)]
132    pub fn auxhfrcordy(&self) -> AUXHFRCORDY_R {
133        AUXHFRCORDY_R::new(((self.bits >> 4) & 1) != 0)
134    }
135    #[doc = "Bit 5 - CALRDY Interrupt Enable"]
136    #[inline(always)]
137    pub fn calrdy(&self) -> CALRDY_R {
138        CALRDY_R::new(((self.bits >> 5) & 1) != 0)
139    }
140    #[doc = "Bit 6 - CALOF Interrupt Enable"]
141    #[inline(always)]
142    pub fn calof(&self) -> CALOF_R {
143        CALOF_R::new(((self.bits >> 6) & 1) != 0)
144    }
145    #[doc = "Bit 8 - HFXODISERR Interrupt Enable"]
146    #[inline(always)]
147    pub fn hfxodiserr(&self) -> HFXODISERR_R {
148        HFXODISERR_R::new(((self.bits >> 8) & 1) != 0)
149    }
150    #[doc = "Bit 9 - HFXOAUTOSW Interrupt Enable"]
151    #[inline(always)]
152    pub fn hfxoautosw(&self) -> HFXOAUTOSW_R {
153        HFXOAUTOSW_R::new(((self.bits >> 9) & 1) != 0)
154    }
155    #[doc = "Bit 10 - HFXOPEAKDETERR Interrupt Enable"]
156    #[inline(always)]
157    pub fn hfxopeakdeterr(&self) -> HFXOPEAKDETERR_R {
158        HFXOPEAKDETERR_R::new(((self.bits >> 10) & 1) != 0)
159    }
160    #[doc = "Bit 11 - HFXOPEAKDETRDY Interrupt Enable"]
161    #[inline(always)]
162    pub fn hfxopeakdetrdy(&self) -> HFXOPEAKDETRDY_R {
163        HFXOPEAKDETRDY_R::new(((self.bits >> 11) & 1) != 0)
164    }
165    #[doc = "Bit 12 - HFXOSHUNTOPTRDY Interrupt Enable"]
166    #[inline(always)]
167    pub fn hfxoshuntoptrdy(&self) -> HFXOSHUNTOPTRDY_R {
168        HFXOSHUNTOPTRDY_R::new(((self.bits >> 12) & 1) != 0)
169    }
170    #[doc = "Bit 13 - HFRCODIS Interrupt Enable"]
171    #[inline(always)]
172    pub fn hfrcodis(&self) -> HFRCODIS_R {
173        HFRCODIS_R::new(((self.bits >> 13) & 1) != 0)
174    }
175    #[doc = "Bit 14 - LFTIMEOUTERR Interrupt Enable"]
176    #[inline(always)]
177    pub fn lftimeouterr(&self) -> LFTIMEOUTERR_R {
178        LFTIMEOUTERR_R::new(((self.bits >> 14) & 1) != 0)
179    }
180    #[doc = "Bit 15 - DPLLRDY Interrupt Enable"]
181    #[inline(always)]
182    pub fn dpllrdy(&self) -> DPLLRDY_R {
183        DPLLRDY_R::new(((self.bits >> 15) & 1) != 0)
184    }
185    #[doc = "Bit 16 - DPLLLOCKFAILLOW Interrupt Enable"]
186    #[inline(always)]
187    pub fn dplllockfaillow(&self) -> DPLLLOCKFAILLOW_R {
188        DPLLLOCKFAILLOW_R::new(((self.bits >> 16) & 1) != 0)
189    }
190    #[doc = "Bit 17 - DPLLLOCKFAILHIGH Interrupt Enable"]
191    #[inline(always)]
192    pub fn dplllockfailhigh(&self) -> DPLLLOCKFAILHIGH_R {
193        DPLLLOCKFAILHIGH_R::new(((self.bits >> 17) & 1) != 0)
194    }
195    #[doc = "Bit 31 - CMUERR Interrupt Enable"]
196    #[inline(always)]
197    pub fn cmuerr(&self) -> CMUERR_R {
198        CMUERR_R::new(((self.bits >> 31) & 1) != 0)
199    }
200}
201impl W {
202    #[doc = "Bit 0 - HFRCORDY Interrupt Enable"]
203    #[inline(always)]
204    #[must_use]
205    pub fn hfrcordy(&mut self) -> HFRCORDY_W<0> {
206        HFRCORDY_W::new(self)
207    }
208    #[doc = "Bit 1 - HFXORDY Interrupt Enable"]
209    #[inline(always)]
210    #[must_use]
211    pub fn hfxordy(&mut self) -> HFXORDY_W<1> {
212        HFXORDY_W::new(self)
213    }
214    #[doc = "Bit 2 - LFRCORDY Interrupt Enable"]
215    #[inline(always)]
216    #[must_use]
217    pub fn lfrcordy(&mut self) -> LFRCORDY_W<2> {
218        LFRCORDY_W::new(self)
219    }
220    #[doc = "Bit 3 - LFXORDY Interrupt Enable"]
221    #[inline(always)]
222    #[must_use]
223    pub fn lfxordy(&mut self) -> LFXORDY_W<3> {
224        LFXORDY_W::new(self)
225    }
226    #[doc = "Bit 4 - AUXHFRCORDY Interrupt Enable"]
227    #[inline(always)]
228    #[must_use]
229    pub fn auxhfrcordy(&mut self) -> AUXHFRCORDY_W<4> {
230        AUXHFRCORDY_W::new(self)
231    }
232    #[doc = "Bit 5 - CALRDY Interrupt Enable"]
233    #[inline(always)]
234    #[must_use]
235    pub fn calrdy(&mut self) -> CALRDY_W<5> {
236        CALRDY_W::new(self)
237    }
238    #[doc = "Bit 6 - CALOF Interrupt Enable"]
239    #[inline(always)]
240    #[must_use]
241    pub fn calof(&mut self) -> CALOF_W<6> {
242        CALOF_W::new(self)
243    }
244    #[doc = "Bit 8 - HFXODISERR Interrupt Enable"]
245    #[inline(always)]
246    #[must_use]
247    pub fn hfxodiserr(&mut self) -> HFXODISERR_W<8> {
248        HFXODISERR_W::new(self)
249    }
250    #[doc = "Bit 9 - HFXOAUTOSW Interrupt Enable"]
251    #[inline(always)]
252    #[must_use]
253    pub fn hfxoautosw(&mut self) -> HFXOAUTOSW_W<9> {
254        HFXOAUTOSW_W::new(self)
255    }
256    #[doc = "Bit 10 - HFXOPEAKDETERR Interrupt Enable"]
257    #[inline(always)]
258    #[must_use]
259    pub fn hfxopeakdeterr(&mut self) -> HFXOPEAKDETERR_W<10> {
260        HFXOPEAKDETERR_W::new(self)
261    }
262    #[doc = "Bit 11 - HFXOPEAKDETRDY Interrupt Enable"]
263    #[inline(always)]
264    #[must_use]
265    pub fn hfxopeakdetrdy(&mut self) -> HFXOPEAKDETRDY_W<11> {
266        HFXOPEAKDETRDY_W::new(self)
267    }
268    #[doc = "Bit 12 - HFXOSHUNTOPTRDY Interrupt Enable"]
269    #[inline(always)]
270    #[must_use]
271    pub fn hfxoshuntoptrdy(&mut self) -> HFXOSHUNTOPTRDY_W<12> {
272        HFXOSHUNTOPTRDY_W::new(self)
273    }
274    #[doc = "Bit 13 - HFRCODIS Interrupt Enable"]
275    #[inline(always)]
276    #[must_use]
277    pub fn hfrcodis(&mut self) -> HFRCODIS_W<13> {
278        HFRCODIS_W::new(self)
279    }
280    #[doc = "Bit 14 - LFTIMEOUTERR Interrupt Enable"]
281    #[inline(always)]
282    #[must_use]
283    pub fn lftimeouterr(&mut self) -> LFTIMEOUTERR_W<14> {
284        LFTIMEOUTERR_W::new(self)
285    }
286    #[doc = "Bit 15 - DPLLRDY Interrupt Enable"]
287    #[inline(always)]
288    #[must_use]
289    pub fn dpllrdy(&mut self) -> DPLLRDY_W<15> {
290        DPLLRDY_W::new(self)
291    }
292    #[doc = "Bit 16 - DPLLLOCKFAILLOW Interrupt Enable"]
293    #[inline(always)]
294    #[must_use]
295    pub fn dplllockfaillow(&mut self) -> DPLLLOCKFAILLOW_W<16> {
296        DPLLLOCKFAILLOW_W::new(self)
297    }
298    #[doc = "Bit 17 - DPLLLOCKFAILHIGH Interrupt Enable"]
299    #[inline(always)]
300    #[must_use]
301    pub fn dplllockfailhigh(&mut self) -> DPLLLOCKFAILHIGH_W<17> {
302        DPLLLOCKFAILHIGH_W::new(self)
303    }
304    #[doc = "Bit 31 - CMUERR Interrupt Enable"]
305    #[inline(always)]
306    #[must_use]
307    pub fn cmuerr(&mut self) -> CMUERR_W<31> {
308        CMUERR_W::new(self)
309    }
310    #[doc = "Writes raw bits to the register."]
311    #[inline(always)]
312    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
313        self.0.bits(bits);
314        self
315    }
316}
317#[doc = "Interrupt Enable Register\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 [ien](index.html) module"]
318pub struct IEN_SPEC;
319impl crate::RegisterSpec for IEN_SPEC {
320    type Ux = u32;
321}
322#[doc = "`read()` method returns [ien::R](R) reader structure"]
323impl crate::Readable for IEN_SPEC {
324    type Reader = R;
325}
326#[doc = "`write(|w| ..)` method takes [ien::W](W) writer structure"]
327impl crate::Writable for IEN_SPEC {
328    type Writer = W;
329    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
330    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
331}
332#[doc = "`reset()` method sets IEN to value 0"]
333impl crate::Resettable for IEN_SPEC {
334    const RESET_VALUE: Self::Ux = 0;
335}