efm32wg230_pac/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 = "BURTC Enable\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum MODE_A {
41    #[doc = "0: The BURTC is disabled."]
42    DISABLE = 0,
43    #[doc = "1: The BURTC is in normal operating mode, operating in EM0-EM2. Oscillators must be enabled in CMU for use."]
44    EM2EN = 1,
45    #[doc = "2: The BURTC is enabled in EM0-EM3. Will prevent CMU from disabling used oscillators all the way down to EM3."]
46    EM3EN = 2,
47    #[doc = "3: The BURTC is enabled in EM0-EM4. Will prevent CMU from disabling used oscillators all the way down to EM4."]
48    EM4EN = 3,
49}
50impl From<MODE_A> for u8 {
51    #[inline(always)]
52    fn from(variant: MODE_A) -> Self {
53        variant as _
54    }
55}
56#[doc = "Field `MODE` reader - BURTC Enable"]
57pub type MODE_R = crate::FieldReader<u8, MODE_A>;
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> = crate::FieldWriterSafe<'a, u32, CTRL_SPEC, u8, MODE_A, 2, 0>;
93impl<'a> MODE_W<'a> {
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> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 2>;
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> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 3>;
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> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 4>;
127#[doc = "Low power mode compare configuration\n\nValue on reset: 0"]
128#[derive(Clone, Copy, Debug, PartialEq)]
129#[repr(u8)]
130pub enum LPCOMP_A {
131    #[doc = "0: Do not ignore any bits for compare match evaluation."]
132    IGN0LSB = 0,
133    #[doc = "1: The LSB of the counter is ignored for compare match evaluation."]
134    IGN1LSB = 1,
135    #[doc = "2: The two LSBs of the counter are ignored for compare match evaluation."]
136    IGN2LSB = 2,
137    #[doc = "3: The three LSBs of the counter are ignored for compare match evaluation."]
138    IGN3LSB = 3,
139    #[doc = "4: The four LSBs of the counter are ignored for compare match evaluation."]
140    IGN4LSB = 4,
141    #[doc = "5: The five LSBs of the counter are ignored for compare match evaluation."]
142    IGN5LSB = 5,
143    #[doc = "6: The six LSBs of the counter are ignored for compare match evaluation."]
144    IGN6LSB = 6,
145    #[doc = "7: The seven LSBs of the counter are ignored for compare match evaluation."]
146    IGN7LSB = 7,
147}
148impl From<LPCOMP_A> for u8 {
149    #[inline(always)]
150    fn from(variant: LPCOMP_A) -> Self {
151        variant as _
152    }
153}
154#[doc = "Field `LPCOMP` reader - Low power mode compare configuration"]
155pub type LPCOMP_R = crate::FieldReader<u8, LPCOMP_A>;
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> = crate::FieldWriterSafe<'a, u32, CTRL_SPEC, u8, LPCOMP_A, 3, 5>;
215impl<'a> LPCOMP_W<'a> {
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 = "Select BURTC prescaler factor\n\nValue on reset: 0"]
258#[derive(Clone, Copy, Debug, PartialEq)]
259#[repr(u8)]
260pub enum PRESC_A {
261    #[doc = "0: No prescaling."]
262    DIV1 = 0,
263    #[doc = "1: Prescaling factor of 2"]
264    DIV2 = 1,
265    #[doc = "2: Prescaling factor of 4"]
266    DIV4 = 2,
267    #[doc = "3: Prescaling factor of 8"]
268    DIV8 = 3,
269    #[doc = "4: Prescaling factor of 16"]
270    DIV16 = 4,
271    #[doc = "5: Prescaling factor of 32"]
272    DIV32 = 5,
273    #[doc = "6: Prescaling factor of 64"]
274    DIV64 = 6,
275    #[doc = "7: Prescaling factor of 128"]
276    DIV128 = 7,
277}
278impl From<PRESC_A> for u8 {
279    #[inline(always)]
280    fn from(variant: PRESC_A) -> Self {
281        variant as _
282    }
283}
284#[doc = "Field `PRESC` reader - Select BURTC prescaler factor"]
285pub type PRESC_R = crate::FieldReader<u8, PRESC_A>;
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> = crate::FieldWriterSafe<'a, u32, CTRL_SPEC, u8, PRESC_A, 3, 8>;
345impl<'a> PRESC_W<'a> {
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 = "Select BURTC clock source\n\nValue on reset: 0"]
388#[derive(Clone, Copy, Debug, PartialEq)]
389#[repr(u8)]
390pub enum CLKSEL_A {
391    #[doc = "0: No clock source selected for BURTC."]
392    NONE = 0,
393    #[doc = "1: LFRCO selected as BURTC clock source."]
394    LFRCO = 1,
395    #[doc = "2: LFXO selected as BURTC clock source."]
396    LFXO = 2,
397    #[doc = "3: ULFRCO selected as BURTC clock source."]
398    ULFRCO = 3,
399}
400impl From<CLKSEL_A> for u8 {
401    #[inline(always)]
402    fn from(variant: CLKSEL_A) -> Self {
403        variant as _
404    }
405}
406#[doc = "Field `CLKSEL` reader - Select BURTC clock source"]
407pub type CLKSEL_R = crate::FieldReader<u8, CLKSEL_A>;
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> = crate::FieldWriterSafe<'a, u32, CTRL_SPEC, u8, CLKSEL_A, 2, 12>;
443impl<'a> CLKSEL_W<'a> {
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> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, 14>;
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    pub fn mode(&mut self) -> MODE_W {
515        MODE_W::new(self)
516    }
517    #[doc = "Bit 2 - Debug Mode Run Enable"]
518    #[inline(always)]
519    pub fn debugrun(&mut self) -> DEBUGRUN_W {
520        DEBUGRUN_W::new(self)
521    }
522    #[doc = "Bit 3 - Enable BURTC reset"]
523    #[inline(always)]
524    pub fn rsten(&mut self) -> RSTEN_W {
525        RSTEN_W::new(self)
526    }
527    #[doc = "Bit 4 - Compare clear enable"]
528    #[inline(always)]
529    pub fn comp0top(&mut self) -> COMP0TOP_W {
530        COMP0TOP_W::new(self)
531    }
532    #[doc = "Bits 5:7 - Low power mode compare configuration"]
533    #[inline(always)]
534    pub fn lpcomp(&mut self) -> LPCOMP_W {
535        LPCOMP_W::new(self)
536    }
537    #[doc = "Bits 8:10 - Select BURTC prescaler factor"]
538    #[inline(always)]
539    pub fn presc(&mut self) -> PRESC_W {
540        PRESC_W::new(self)
541    }
542    #[doc = "Bits 12:13 - Select BURTC clock source"]
543    #[inline(always)]
544    pub fn clksel(&mut self) -> CLKSEL_W {
545        CLKSEL_W::new(self)
546    }
547    #[doc = "Bit 14 - Backup mode timestamp enable"]
548    #[inline(always)]
549    pub fn bumodetsen(&mut self) -> BUMODETSEN_W {
550        BUMODETSEN_W::new(self)
551    }
552    #[doc = "Writes raw bits to the register."]
553    #[inline(always)]
554    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
555        self.0.bits(bits);
556        self
557    }
558}
559#[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"]
560pub struct CTRL_SPEC;
561impl crate::RegisterSpec for CTRL_SPEC {
562    type Ux = u32;
563}
564#[doc = "`read()` method returns [ctrl::R](R) reader structure"]
565impl crate::Readable for CTRL_SPEC {
566    type Reader = R;
567}
568#[doc = "`write(|w| ..)` method takes [ctrl::W](W) writer structure"]
569impl crate::Writable for CTRL_SPEC {
570    type Writer = W;
571}
572#[doc = "`reset()` method sets CTRL to value 0x08"]
573impl crate::Resettable for CTRL_SPEC {
574    #[inline(always)]
575    fn reset_value() -> Self::Ux {
576        0x08
577    }
578}