efm32gg332-pac 0.1.0

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