efm32gg_pac/efm32gg995/burtc/
ctrl.rs

1#[doc = "Register `CTRL` reader"]
2pub struct R(crate::R<CTRL_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<CTRL_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<CTRL_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<CTRL_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `CTRL` writer"]
17pub struct W(crate::W<CTRL_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<CTRL_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<CTRL_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<CTRL_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `MODE` reader - BURTC Enable"]
38pub type MODE_R = crate::FieldReader<u8, MODE_A>;
39#[doc = "BURTC Enable\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum MODE_A {
43    #[doc = "0: The BURTC is disabled."]
44    DISABLE = 0,
45    #[doc = "1: The BURTC is in normal operating mode, operating in EM0-EM2. Oscillators must be enabled in CMU for use."]
46    EM2EN = 1,
47    #[doc = "2: The BURTC is enabled in EM0-EM3. Will prevent CMU from disabling used oscillators all the way down to EM3."]
48    EM3EN = 2,
49    #[doc = "3: The BURTC is enabled in EM0-EM4. Will prevent CMU from disabling used oscillators all the way down to EM4."]
50    EM4EN = 3,
51}
52impl From<MODE_A> for u8 {
53    #[inline(always)]
54    fn from(variant: MODE_A) -> Self {
55        variant as _
56    }
57}
58impl MODE_R {
59    #[doc = "Get enumerated values variant"]
60    #[inline(always)]
61    pub fn variant(&self) -> MODE_A {
62        match self.bits {
63            0 => MODE_A::DISABLE,
64            1 => MODE_A::EM2EN,
65            2 => MODE_A::EM3EN,
66            3 => MODE_A::EM4EN,
67            _ => unreachable!(),
68        }
69    }
70    #[doc = "Checks if the value of the field is `DISABLE`"]
71    #[inline(always)]
72    pub fn is_disable(&self) -> bool {
73        *self == MODE_A::DISABLE
74    }
75    #[doc = "Checks if the value of the field is `EM2EN`"]
76    #[inline(always)]
77    pub fn is_em2en(&self) -> bool {
78        *self == MODE_A::EM2EN
79    }
80    #[doc = "Checks if the value of the field is `EM3EN`"]
81    #[inline(always)]
82    pub fn is_em3en(&self) -> bool {
83        *self == MODE_A::EM3EN
84    }
85    #[doc = "Checks if the value of the field is `EM4EN`"]
86    #[inline(always)]
87    pub fn is_em4en(&self) -> bool {
88        *self == MODE_A::EM4EN
89    }
90}
91#[doc = "Field `MODE` writer - BURTC Enable"]
92pub type MODE_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CTRL_SPEC, u8, MODE_A, 2, O>;
93impl<'a, const O: u8> MODE_W<'a, O> {
94    #[doc = "The BURTC is disabled."]
95    #[inline(always)]
96    pub fn disable(self) -> &'a mut W {
97        self.variant(MODE_A::DISABLE)
98    }
99    #[doc = "The BURTC is in normal operating mode, operating in EM0-EM2. Oscillators must be enabled in CMU for use."]
100    #[inline(always)]
101    pub fn em2en(self) -> &'a mut W {
102        self.variant(MODE_A::EM2EN)
103    }
104    #[doc = "The BURTC is enabled in EM0-EM3. Will prevent CMU from disabling used oscillators all the way down to EM3."]
105    #[inline(always)]
106    pub fn em3en(self) -> &'a mut W {
107        self.variant(MODE_A::EM3EN)
108    }
109    #[doc = "The BURTC is enabled in EM0-EM4. Will prevent CMU from disabling used oscillators all the way down to EM4."]
110    #[inline(always)]
111    pub fn em4en(self) -> &'a mut W {
112        self.variant(MODE_A::EM4EN)
113    }
114}
115#[doc = "Field `DEBUGRUN` reader - Debug Mode Run Enable"]
116pub type DEBUGRUN_R = crate::BitReader<bool>;
117#[doc = "Field `DEBUGRUN` writer - Debug Mode Run Enable"]
118pub type DEBUGRUN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
119#[doc = "Field `RSTEN` reader - Enable BURTC reset"]
120pub type RSTEN_R = crate::BitReader<bool>;
121#[doc = "Field `RSTEN` writer - Enable BURTC reset"]
122pub type RSTEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
123#[doc = "Field `COMP0TOP` reader - Compare clear enable"]
124pub type COMP0TOP_R = crate::BitReader<bool>;
125#[doc = "Field `COMP0TOP` writer - Compare clear enable"]
126pub type COMP0TOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
127#[doc = "Field `LPCOMP` reader - Low power mode compare configuration"]
128pub type LPCOMP_R = crate::FieldReader<u8, LPCOMP_A>;
129#[doc = "Low power mode compare configuration\n\nValue on reset: 0"]
130#[derive(Clone, Copy, Debug, PartialEq, Eq)]
131#[repr(u8)]
132pub enum LPCOMP_A {
133    #[doc = "0: Do not ignore any bits for compare match evaluation."]
134    IGN0LSB = 0,
135    #[doc = "1: The LSB of the counter is ignored for compare match evaluation."]
136    IGN1LSB = 1,
137    #[doc = "2: The two LSBs of the counter are ignored for compare match evaluation."]
138    IGN2LSB = 2,
139    #[doc = "3: The three LSBs of the counter are ignored for compare match evaluation."]
140    IGN3LSB = 3,
141    #[doc = "4: The four LSBs of the counter are ignored for compare match evaluation."]
142    IGN4LSB = 4,
143    #[doc = "5: The five LSBs of the counter are ignored for compare match evaluation."]
144    IGN5LSB = 5,
145    #[doc = "6: The six LSBs of the counter are ignored for compare match evaluation."]
146    IGN6LSB = 6,
147    #[doc = "7: The seven LSBs of the counter are ignored for compare match evaluation."]
148    IGN7LSB = 7,
149}
150impl From<LPCOMP_A> for u8 {
151    #[inline(always)]
152    fn from(variant: LPCOMP_A) -> Self {
153        variant as _
154    }
155}
156impl LPCOMP_R {
157    #[doc = "Get enumerated values variant"]
158    #[inline(always)]
159    pub fn variant(&self) -> LPCOMP_A {
160        match self.bits {
161            0 => LPCOMP_A::IGN0LSB,
162            1 => LPCOMP_A::IGN1LSB,
163            2 => LPCOMP_A::IGN2LSB,
164            3 => LPCOMP_A::IGN3LSB,
165            4 => LPCOMP_A::IGN4LSB,
166            5 => LPCOMP_A::IGN5LSB,
167            6 => LPCOMP_A::IGN6LSB,
168            7 => LPCOMP_A::IGN7LSB,
169            _ => unreachable!(),
170        }
171    }
172    #[doc = "Checks if the value of the field is `IGN0LSB`"]
173    #[inline(always)]
174    pub fn is_ign0lsb(&self) -> bool {
175        *self == LPCOMP_A::IGN0LSB
176    }
177    #[doc = "Checks if the value of the field is `IGN1LSB`"]
178    #[inline(always)]
179    pub fn is_ign1lsb(&self) -> bool {
180        *self == LPCOMP_A::IGN1LSB
181    }
182    #[doc = "Checks if the value of the field is `IGN2LSB`"]
183    #[inline(always)]
184    pub fn is_ign2lsb(&self) -> bool {
185        *self == LPCOMP_A::IGN2LSB
186    }
187    #[doc = "Checks if the value of the field is `IGN3LSB`"]
188    #[inline(always)]
189    pub fn is_ign3lsb(&self) -> bool {
190        *self == LPCOMP_A::IGN3LSB
191    }
192    #[doc = "Checks if the value of the field is `IGN4LSB`"]
193    #[inline(always)]
194    pub fn is_ign4lsb(&self) -> bool {
195        *self == LPCOMP_A::IGN4LSB
196    }
197    #[doc = "Checks if the value of the field is `IGN5LSB`"]
198    #[inline(always)]
199    pub fn is_ign5lsb(&self) -> bool {
200        *self == LPCOMP_A::IGN5LSB
201    }
202    #[doc = "Checks if the value of the field is `IGN6LSB`"]
203    #[inline(always)]
204    pub fn is_ign6lsb(&self) -> bool {
205        *self == LPCOMP_A::IGN6LSB
206    }
207    #[doc = "Checks if the value of the field is `IGN7LSB`"]
208    #[inline(always)]
209    pub fn is_ign7lsb(&self) -> bool {
210        *self == LPCOMP_A::IGN7LSB
211    }
212}
213#[doc = "Field `LPCOMP` writer - Low power mode compare configuration"]
214pub type LPCOMP_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CTRL_SPEC, u8, LPCOMP_A, 3, O>;
215impl<'a, const O: u8> LPCOMP_W<'a, O> {
216    #[doc = "Do not ignore any bits for compare match evaluation."]
217    #[inline(always)]
218    pub fn ign0lsb(self) -> &'a mut W {
219        self.variant(LPCOMP_A::IGN0LSB)
220    }
221    #[doc = "The LSB of the counter is ignored for compare match evaluation."]
222    #[inline(always)]
223    pub fn ign1lsb(self) -> &'a mut W {
224        self.variant(LPCOMP_A::IGN1LSB)
225    }
226    #[doc = "The two LSBs of the counter are ignored for compare match evaluation."]
227    #[inline(always)]
228    pub fn ign2lsb(self) -> &'a mut W {
229        self.variant(LPCOMP_A::IGN2LSB)
230    }
231    #[doc = "The three LSBs of the counter are ignored for compare match evaluation."]
232    #[inline(always)]
233    pub fn ign3lsb(self) -> &'a mut W {
234        self.variant(LPCOMP_A::IGN3LSB)
235    }
236    #[doc = "The four LSBs of the counter are ignored for compare match evaluation."]
237    #[inline(always)]
238    pub fn ign4lsb(self) -> &'a mut W {
239        self.variant(LPCOMP_A::IGN4LSB)
240    }
241    #[doc = "The five LSBs of the counter are ignored for compare match evaluation."]
242    #[inline(always)]
243    pub fn ign5lsb(self) -> &'a mut W {
244        self.variant(LPCOMP_A::IGN5LSB)
245    }
246    #[doc = "The six LSBs of the counter are ignored for compare match evaluation."]
247    #[inline(always)]
248    pub fn ign6lsb(self) -> &'a mut W {
249        self.variant(LPCOMP_A::IGN6LSB)
250    }
251    #[doc = "The seven LSBs of the counter are ignored for compare match evaluation."]
252    #[inline(always)]
253    pub fn ign7lsb(self) -> &'a mut W {
254        self.variant(LPCOMP_A::IGN7LSB)
255    }
256}
257#[doc = "Field `PRESC` reader - Select BURTC prescaler factor"]
258pub type PRESC_R = crate::FieldReader<u8, PRESC_A>;
259#[doc = "Select BURTC prescaler factor\n\nValue on reset: 0"]
260#[derive(Clone, Copy, Debug, PartialEq, Eq)]
261#[repr(u8)]
262pub enum PRESC_A {
263    #[doc = "0: No prescaling."]
264    DIV1 = 0,
265    #[doc = "1: Prescaling factor of 2"]
266    DIV2 = 1,
267    #[doc = "2: Prescaling factor of 4"]
268    DIV4 = 2,
269    #[doc = "3: Prescaling factor of 8"]
270    DIV8 = 3,
271    #[doc = "4: Prescaling factor of 16"]
272    DIV16 = 4,
273    #[doc = "5: Prescaling factor of 32"]
274    DIV32 = 5,
275    #[doc = "6: Prescaling factor of 64"]
276    DIV64 = 6,
277    #[doc = "7: Prescaling factor of 128"]
278    DIV128 = 7,
279}
280impl From<PRESC_A> for u8 {
281    #[inline(always)]
282    fn from(variant: PRESC_A) -> Self {
283        variant as _
284    }
285}
286impl PRESC_R {
287    #[doc = "Get enumerated values variant"]
288    #[inline(always)]
289    pub fn variant(&self) -> PRESC_A {
290        match self.bits {
291            0 => PRESC_A::DIV1,
292            1 => PRESC_A::DIV2,
293            2 => PRESC_A::DIV4,
294            3 => PRESC_A::DIV8,
295            4 => PRESC_A::DIV16,
296            5 => PRESC_A::DIV32,
297            6 => PRESC_A::DIV64,
298            7 => PRESC_A::DIV128,
299            _ => unreachable!(),
300        }
301    }
302    #[doc = "Checks if the value of the field is `DIV1`"]
303    #[inline(always)]
304    pub fn is_div1(&self) -> bool {
305        *self == PRESC_A::DIV1
306    }
307    #[doc = "Checks if the value of the field is `DIV2`"]
308    #[inline(always)]
309    pub fn is_div2(&self) -> bool {
310        *self == PRESC_A::DIV2
311    }
312    #[doc = "Checks if the value of the field is `DIV4`"]
313    #[inline(always)]
314    pub fn is_div4(&self) -> bool {
315        *self == PRESC_A::DIV4
316    }
317    #[doc = "Checks if the value of the field is `DIV8`"]
318    #[inline(always)]
319    pub fn is_div8(&self) -> bool {
320        *self == PRESC_A::DIV8
321    }
322    #[doc = "Checks if the value of the field is `DIV16`"]
323    #[inline(always)]
324    pub fn is_div16(&self) -> bool {
325        *self == PRESC_A::DIV16
326    }
327    #[doc = "Checks if the value of the field is `DIV32`"]
328    #[inline(always)]
329    pub fn is_div32(&self) -> bool {
330        *self == PRESC_A::DIV32
331    }
332    #[doc = "Checks if the value of the field is `DIV64`"]
333    #[inline(always)]
334    pub fn is_div64(&self) -> bool {
335        *self == PRESC_A::DIV64
336    }
337    #[doc = "Checks if the value of the field is `DIV128`"]
338    #[inline(always)]
339    pub fn is_div128(&self) -> bool {
340        *self == PRESC_A::DIV128
341    }
342}
343#[doc = "Field `PRESC` writer - Select BURTC prescaler factor"]
344pub type PRESC_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CTRL_SPEC, u8, PRESC_A, 3, O>;
345impl<'a, const O: u8> PRESC_W<'a, O> {
346    #[doc = "No prescaling."]
347    #[inline(always)]
348    pub fn div1(self) -> &'a mut W {
349        self.variant(PRESC_A::DIV1)
350    }
351    #[doc = "Prescaling factor of 2"]
352    #[inline(always)]
353    pub fn div2(self) -> &'a mut W {
354        self.variant(PRESC_A::DIV2)
355    }
356    #[doc = "Prescaling factor of 4"]
357    #[inline(always)]
358    pub fn div4(self) -> &'a mut W {
359        self.variant(PRESC_A::DIV4)
360    }
361    #[doc = "Prescaling factor of 8"]
362    #[inline(always)]
363    pub fn div8(self) -> &'a mut W {
364        self.variant(PRESC_A::DIV8)
365    }
366    #[doc = "Prescaling factor of 16"]
367    #[inline(always)]
368    pub fn div16(self) -> &'a mut W {
369        self.variant(PRESC_A::DIV16)
370    }
371    #[doc = "Prescaling factor of 32"]
372    #[inline(always)]
373    pub fn div32(self) -> &'a mut W {
374        self.variant(PRESC_A::DIV32)
375    }
376    #[doc = "Prescaling factor of 64"]
377    #[inline(always)]
378    pub fn div64(self) -> &'a mut W {
379        self.variant(PRESC_A::DIV64)
380    }
381    #[doc = "Prescaling factor of 128"]
382    #[inline(always)]
383    pub fn div128(self) -> &'a mut W {
384        self.variant(PRESC_A::DIV128)
385    }
386}
387#[doc = "Field `CLKSEL` reader - Select BURTC clock source"]
388pub type CLKSEL_R = crate::FieldReader<u8, CLKSEL_A>;
389#[doc = "Select BURTC clock source\n\nValue on reset: 0"]
390#[derive(Clone, Copy, Debug, PartialEq, Eq)]
391#[repr(u8)]
392pub enum CLKSEL_A {
393    #[doc = "0: No clock source selected for BURTC."]
394    NONE = 0,
395    #[doc = "1: LFRCO selected as BURTC clock source."]
396    LFRCO = 1,
397    #[doc = "2: LFXO selected as BURTC clock source."]
398    LFXO = 2,
399    #[doc = "3: ULFRCO selected as BURTC clock source."]
400    ULFRCO = 3,
401}
402impl From<CLKSEL_A> for u8 {
403    #[inline(always)]
404    fn from(variant: CLKSEL_A) -> Self {
405        variant as _
406    }
407}
408impl CLKSEL_R {
409    #[doc = "Get enumerated values variant"]
410    #[inline(always)]
411    pub fn variant(&self) -> CLKSEL_A {
412        match self.bits {
413            0 => CLKSEL_A::NONE,
414            1 => CLKSEL_A::LFRCO,
415            2 => CLKSEL_A::LFXO,
416            3 => CLKSEL_A::ULFRCO,
417            _ => unreachable!(),
418        }
419    }
420    #[doc = "Checks if the value of the field is `NONE`"]
421    #[inline(always)]
422    pub fn is_none(&self) -> bool {
423        *self == CLKSEL_A::NONE
424    }
425    #[doc = "Checks if the value of the field is `LFRCO`"]
426    #[inline(always)]
427    pub fn is_lfrco(&self) -> bool {
428        *self == CLKSEL_A::LFRCO
429    }
430    #[doc = "Checks if the value of the field is `LFXO`"]
431    #[inline(always)]
432    pub fn is_lfxo(&self) -> bool {
433        *self == CLKSEL_A::LFXO
434    }
435    #[doc = "Checks if the value of the field is `ULFRCO`"]
436    #[inline(always)]
437    pub fn is_ulfrco(&self) -> bool {
438        *self == CLKSEL_A::ULFRCO
439    }
440}
441#[doc = "Field `CLKSEL` writer - Select BURTC clock source"]
442pub type CLKSEL_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CTRL_SPEC, u8, CLKSEL_A, 2, O>;
443impl<'a, const O: u8> CLKSEL_W<'a, O> {
444    #[doc = "No clock source selected for BURTC."]
445    #[inline(always)]
446    pub fn none(self) -> &'a mut W {
447        self.variant(CLKSEL_A::NONE)
448    }
449    #[doc = "LFRCO selected as BURTC clock source."]
450    #[inline(always)]
451    pub fn lfrco(self) -> &'a mut W {
452        self.variant(CLKSEL_A::LFRCO)
453    }
454    #[doc = "LFXO selected as BURTC clock source."]
455    #[inline(always)]
456    pub fn lfxo(self) -> &'a mut W {
457        self.variant(CLKSEL_A::LFXO)
458    }
459    #[doc = "ULFRCO selected as BURTC clock source."]
460    #[inline(always)]
461    pub fn ulfrco(self) -> &'a mut W {
462        self.variant(CLKSEL_A::ULFRCO)
463    }
464}
465#[doc = "Field `BUMODETSEN` reader - Backup mode timestamp enable"]
466pub type BUMODETSEN_R = crate::BitReader<bool>;
467#[doc = "Field `BUMODETSEN` writer - Backup mode timestamp enable"]
468pub type BUMODETSEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
469impl R {
470    #[doc = "Bits 0:1 - BURTC Enable"]
471    #[inline(always)]
472    pub fn mode(&self) -> MODE_R {
473        MODE_R::new((self.bits & 3) as u8)
474    }
475    #[doc = "Bit 2 - Debug Mode Run Enable"]
476    #[inline(always)]
477    pub fn debugrun(&self) -> DEBUGRUN_R {
478        DEBUGRUN_R::new(((self.bits >> 2) & 1) != 0)
479    }
480    #[doc = "Bit 3 - Enable BURTC reset"]
481    #[inline(always)]
482    pub fn rsten(&self) -> RSTEN_R {
483        RSTEN_R::new(((self.bits >> 3) & 1) != 0)
484    }
485    #[doc = "Bit 4 - Compare clear enable"]
486    #[inline(always)]
487    pub fn comp0top(&self) -> COMP0TOP_R {
488        COMP0TOP_R::new(((self.bits >> 4) & 1) != 0)
489    }
490    #[doc = "Bits 5:7 - Low power mode compare configuration"]
491    #[inline(always)]
492    pub fn lpcomp(&self) -> LPCOMP_R {
493        LPCOMP_R::new(((self.bits >> 5) & 7) as u8)
494    }
495    #[doc = "Bits 8:10 - Select BURTC prescaler factor"]
496    #[inline(always)]
497    pub fn presc(&self) -> PRESC_R {
498        PRESC_R::new(((self.bits >> 8) & 7) as u8)
499    }
500    #[doc = "Bits 12:13 - Select BURTC clock source"]
501    #[inline(always)]
502    pub fn clksel(&self) -> CLKSEL_R {
503        CLKSEL_R::new(((self.bits >> 12) & 3) as u8)
504    }
505    #[doc = "Bit 14 - Backup mode timestamp enable"]
506    #[inline(always)]
507    pub fn bumodetsen(&self) -> BUMODETSEN_R {
508        BUMODETSEN_R::new(((self.bits >> 14) & 1) != 0)
509    }
510}
511impl W {
512    #[doc = "Bits 0:1 - BURTC Enable"]
513    #[inline(always)]
514    #[must_use]
515    pub fn mode(&mut self) -> MODE_W<0> {
516        MODE_W::new(self)
517    }
518    #[doc = "Bit 2 - Debug Mode Run Enable"]
519    #[inline(always)]
520    #[must_use]
521    pub fn debugrun(&mut self) -> DEBUGRUN_W<2> {
522        DEBUGRUN_W::new(self)
523    }
524    #[doc = "Bit 3 - Enable BURTC reset"]
525    #[inline(always)]
526    #[must_use]
527    pub fn rsten(&mut self) -> RSTEN_W<3> {
528        RSTEN_W::new(self)
529    }
530    #[doc = "Bit 4 - Compare clear enable"]
531    #[inline(always)]
532    #[must_use]
533    pub fn comp0top(&mut self) -> COMP0TOP_W<4> {
534        COMP0TOP_W::new(self)
535    }
536    #[doc = "Bits 5:7 - Low power mode compare configuration"]
537    #[inline(always)]
538    #[must_use]
539    pub fn lpcomp(&mut self) -> LPCOMP_W<5> {
540        LPCOMP_W::new(self)
541    }
542    #[doc = "Bits 8:10 - Select BURTC prescaler factor"]
543    #[inline(always)]
544    #[must_use]
545    pub fn presc(&mut self) -> PRESC_W<8> {
546        PRESC_W::new(self)
547    }
548    #[doc = "Bits 12:13 - Select BURTC clock source"]
549    #[inline(always)]
550    #[must_use]
551    pub fn clksel(&mut self) -> CLKSEL_W<12> {
552        CLKSEL_W::new(self)
553    }
554    #[doc = "Bit 14 - Backup mode timestamp enable"]
555    #[inline(always)]
556    #[must_use]
557    pub fn bumodetsen(&mut self) -> BUMODETSEN_W<14> {
558        BUMODETSEN_W::new(self)
559    }
560    #[doc = "Writes raw bits to the register."]
561    #[inline(always)]
562    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
563        self.0.bits(bits);
564        self
565    }
566}
567#[doc = "Control 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 [ctrl](index.html) module"]
568pub struct CTRL_SPEC;
569impl crate::RegisterSpec for CTRL_SPEC {
570    type Ux = u32;
571}
572#[doc = "`read()` method returns [ctrl::R](R) reader structure"]
573impl crate::Readable for CTRL_SPEC {
574    type Reader = R;
575}
576#[doc = "`write(|w| ..)` method takes [ctrl::W](W) writer structure"]
577impl crate::Writable for CTRL_SPEC {
578    type Writer = W;
579    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
580    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
581}
582#[doc = "`reset()` method sets CTRL to value 0x08"]
583impl crate::Resettable for CTRL_SPEC {
584    const RESET_VALUE: Self::Ux = 0x08;
585}