ra2e1 0.2.0

Peripheral access API for ra2e1 microcontrollers (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
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
#[doc = "Register `WUPEN` reader"]
pub struct R(crate::R<WUPEN_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<WUPEN_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<WUPEN_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<WUPEN_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `WUPEN` writer"]
pub struct W(crate::W<WUPEN_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<WUPEN_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<WUPEN_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<WUPEN_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `IRQWUPEN` reader - IRQ Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type IRQWUPEN_R = crate::FieldReader<u8, IRQWUPEN_A>;
#[doc = "IRQ Interrupt Software Standby/Snooze Mode Returns Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum IRQWUPEN_A {
    #[doc = "0: Software Standby/Snooze Mode returns by IRQn interrupt disabled"]
    _0 = 0,
    #[doc = "1: Software Standby/Snooze Mode returns by IRQn interrupt enabled"]
    _1 = 1,
}
impl From<IRQWUPEN_A> for u8 {
    #[inline(always)]
    fn from(variant: IRQWUPEN_A) -> Self {
        variant as _
    }
}
impl IRQWUPEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> Option<IRQWUPEN_A> {
        match self.bits {
            0 => Some(IRQWUPEN_A::_0),
            1 => Some(IRQWUPEN_A::_1),
            _ => None,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == IRQWUPEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == IRQWUPEN_A::_1
    }
}
#[doc = "Field `IRQWUPEN` writer - IRQ Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type IRQWUPEN_W<'a, const O: u8> =
    crate::FieldWriter<'a, u32, WUPEN_SPEC, u8, IRQWUPEN_A, 8, O>;
impl<'a, const O: u8> IRQWUPEN_W<'a, O> {
    #[doc = "Software Standby/Snooze Mode returns by IRQn interrupt disabled"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(IRQWUPEN_A::_0)
    }
    #[doc = "Software Standby/Snooze Mode returns by IRQn interrupt enabled"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(IRQWUPEN_A::_1)
    }
}
#[doc = "Field `IWDTWUPEN` reader - IWDT Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type IWDTWUPEN_R = crate::BitReader<IWDTWUPEN_A>;
#[doc = "IWDT Interrupt Software Standby/Snooze Mode Returns Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum IWDTWUPEN_A {
    #[doc = "0: Software Standby/Snooze Mode returns by IWDT interrupt disabled"]
    _0 = 0,
    #[doc = "1: Software Standby/Snooze Mode returns by IWDT interrupt enabled"]
    _1 = 1,
}
impl From<IWDTWUPEN_A> for bool {
    #[inline(always)]
    fn from(variant: IWDTWUPEN_A) -> Self {
        variant as u8 != 0
    }
}
impl IWDTWUPEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> IWDTWUPEN_A {
        match self.bits {
            false => IWDTWUPEN_A::_0,
            true => IWDTWUPEN_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == IWDTWUPEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == IWDTWUPEN_A::_1
    }
}
#[doc = "Field `IWDTWUPEN` writer - IWDT Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type IWDTWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN_SPEC, IWDTWUPEN_A, O>;
impl<'a, const O: u8> IWDTWUPEN_W<'a, O> {
    #[doc = "Software Standby/Snooze Mode returns by IWDT interrupt disabled"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(IWDTWUPEN_A::_0)
    }
    #[doc = "Software Standby/Snooze Mode returns by IWDT interrupt enabled"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(IWDTWUPEN_A::_1)
    }
}
#[doc = "Field `KEYWUPEN` reader - Key Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type KEYWUPEN_R = crate::BitReader<KEYWUPEN_A>;
#[doc = "Key Interrupt Software Standby/Snooze Mode Returns Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum KEYWUPEN_A {
    #[doc = "0: Software Standby/Snooze Mode returns by KEY interrupt disabled"]
    _0 = 0,
    #[doc = "1: Software Standby/Snooze Mode returns by KEY interrupt enabled"]
    _1 = 1,
}
impl From<KEYWUPEN_A> for bool {
    #[inline(always)]
    fn from(variant: KEYWUPEN_A) -> Self {
        variant as u8 != 0
    }
}
impl KEYWUPEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> KEYWUPEN_A {
        match self.bits {
            false => KEYWUPEN_A::_0,
            true => KEYWUPEN_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == KEYWUPEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == KEYWUPEN_A::_1
    }
}
#[doc = "Field `KEYWUPEN` writer - Key Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type KEYWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN_SPEC, KEYWUPEN_A, O>;
impl<'a, const O: u8> KEYWUPEN_W<'a, O> {
    #[doc = "Software Standby/Snooze Mode returns by KEY interrupt disabled"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(KEYWUPEN_A::_0)
    }
    #[doc = "Software Standby/Snooze Mode returns by KEY interrupt enabled"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(KEYWUPEN_A::_1)
    }
}
#[doc = "Field `LVD1WUPEN` reader - LVD1 Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type LVD1WUPEN_R = crate::BitReader<LVD1WUPEN_A>;
#[doc = "LVD1 Interrupt Software Standby/Snooze Mode Returns Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LVD1WUPEN_A {
    #[doc = "0: Software Standby/Snooze Mode returns by LVD1 interrupt disabled"]
    _0 = 0,
    #[doc = "1: Software Standby/Snooze Mode returns by LVD1 interrupt enabled"]
    _1 = 1,
}
impl From<LVD1WUPEN_A> for bool {
    #[inline(always)]
    fn from(variant: LVD1WUPEN_A) -> Self {
        variant as u8 != 0
    }
}
impl LVD1WUPEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> LVD1WUPEN_A {
        match self.bits {
            false => LVD1WUPEN_A::_0,
            true => LVD1WUPEN_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == LVD1WUPEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == LVD1WUPEN_A::_1
    }
}
#[doc = "Field `LVD1WUPEN` writer - LVD1 Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type LVD1WUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN_SPEC, LVD1WUPEN_A, O>;
impl<'a, const O: u8> LVD1WUPEN_W<'a, O> {
    #[doc = "Software Standby/Snooze Mode returns by LVD1 interrupt disabled"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(LVD1WUPEN_A::_0)
    }
    #[doc = "Software Standby/Snooze Mode returns by LVD1 interrupt enabled"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(LVD1WUPEN_A::_1)
    }
}
#[doc = "Field `LVD2WUPEN` reader - LVD2 Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type LVD2WUPEN_R = crate::BitReader<LVD2WUPEN_A>;
#[doc = "LVD2 Interrupt Software Standby/Snooze Mode Returns Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LVD2WUPEN_A {
    #[doc = "0: Software Standby/Snooze Mode returns by LVD2 interrupt disabled"]
    _0 = 0,
    #[doc = "1: Software Standby/Snooze Mode returns by LVD2 interrupt enabled"]
    _1 = 1,
}
impl From<LVD2WUPEN_A> for bool {
    #[inline(always)]
    fn from(variant: LVD2WUPEN_A) -> Self {
        variant as u8 != 0
    }
}
impl LVD2WUPEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> LVD2WUPEN_A {
        match self.bits {
            false => LVD2WUPEN_A::_0,
            true => LVD2WUPEN_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == LVD2WUPEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == LVD2WUPEN_A::_1
    }
}
#[doc = "Field `LVD2WUPEN` writer - LVD2 Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type LVD2WUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN_SPEC, LVD2WUPEN_A, O>;
impl<'a, const O: u8> LVD2WUPEN_W<'a, O> {
    #[doc = "Software Standby/Snooze Mode returns by LVD2 interrupt disabled"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(LVD2WUPEN_A::_0)
    }
    #[doc = "Software Standby/Snooze Mode returns by LVD2 interrupt enabled"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(LVD2WUPEN_A::_1)
    }
}
#[doc = "Field `ACMPLP0WUPEN` reader - ACMPLP0 Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type ACMPLP0WUPEN_R = crate::BitReader<ACMPLP0WUPEN_A>;
#[doc = "ACMPLP0 Interrupt Software Standby/Snooze Mode Returns Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ACMPLP0WUPEN_A {
    #[doc = "0: Software Standby/Snooze Mode returns by ACMPLP0 interrupt disabled"]
    _0 = 0,
    #[doc = "1: Software Standby/Snooze Mode returns by ACMPLP0 interrupt enabled"]
    _1 = 1,
}
impl From<ACMPLP0WUPEN_A> for bool {
    #[inline(always)]
    fn from(variant: ACMPLP0WUPEN_A) -> Self {
        variant as u8 != 0
    }
}
impl ACMPLP0WUPEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> ACMPLP0WUPEN_A {
        match self.bits {
            false => ACMPLP0WUPEN_A::_0,
            true => ACMPLP0WUPEN_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == ACMPLP0WUPEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == ACMPLP0WUPEN_A::_1
    }
}
#[doc = "Field `ACMPLP0WUPEN` writer - ACMPLP0 Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type ACMPLP0WUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN_SPEC, ACMPLP0WUPEN_A, O>;
impl<'a, const O: u8> ACMPLP0WUPEN_W<'a, O> {
    #[doc = "Software Standby/Snooze Mode returns by ACMPLP0 interrupt disabled"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(ACMPLP0WUPEN_A::_0)
    }
    #[doc = "Software Standby/Snooze Mode returns by ACMPLP0 interrupt enabled"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(ACMPLP0WUPEN_A::_1)
    }
}
#[doc = "Field `RTCALMWUPEN` reader - RTC Alarm Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type RTCALMWUPEN_R = crate::BitReader<RTCALMWUPEN_A>;
#[doc = "RTC Alarm Interrupt Software Standby/Snooze Mode Returns Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RTCALMWUPEN_A {
    #[doc = "0: Software Standby/Snooze Mode returns by RTC alarm interrupt disabled"]
    _0 = 0,
    #[doc = "1: Software Standby/Snooze Mode returns by RTC alarm interrupt enabled."]
    _1 = 1,
}
impl From<RTCALMWUPEN_A> for bool {
    #[inline(always)]
    fn from(variant: RTCALMWUPEN_A) -> Self {
        variant as u8 != 0
    }
}
impl RTCALMWUPEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RTCALMWUPEN_A {
        match self.bits {
            false => RTCALMWUPEN_A::_0,
            true => RTCALMWUPEN_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == RTCALMWUPEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == RTCALMWUPEN_A::_1
    }
}
#[doc = "Field `RTCALMWUPEN` writer - RTC Alarm Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type RTCALMWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN_SPEC, RTCALMWUPEN_A, O>;
impl<'a, const O: u8> RTCALMWUPEN_W<'a, O> {
    #[doc = "Software Standby/Snooze Mode returns by RTC alarm interrupt disabled"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(RTCALMWUPEN_A::_0)
    }
    #[doc = "Software Standby/Snooze Mode returns by RTC alarm interrupt enabled."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(RTCALMWUPEN_A::_1)
    }
}
#[doc = "Field `RTCPRDWUPEN` reader - RTC Period Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type RTCPRDWUPEN_R = crate::BitReader<RTCPRDWUPEN_A>;
#[doc = "RTC Period Interrupt Software Standby/Snooze Mode Returns Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RTCPRDWUPEN_A {
    #[doc = "0: Software Standby/Snooze Mode returns by RTC period interrupt disabled"]
    _0 = 0,
    #[doc = "1: Software Standby/Snooze Mode returns by RTC period interrupt enabled"]
    _1 = 1,
}
impl From<RTCPRDWUPEN_A> for bool {
    #[inline(always)]
    fn from(variant: RTCPRDWUPEN_A) -> Self {
        variant as u8 != 0
    }
}
impl RTCPRDWUPEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RTCPRDWUPEN_A {
        match self.bits {
            false => RTCPRDWUPEN_A::_0,
            true => RTCPRDWUPEN_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == RTCPRDWUPEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == RTCPRDWUPEN_A::_1
    }
}
#[doc = "Field `RTCPRDWUPEN` writer - RTC Period Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type RTCPRDWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN_SPEC, RTCPRDWUPEN_A, O>;
impl<'a, const O: u8> RTCPRDWUPEN_W<'a, O> {
    #[doc = "Software Standby/Snooze Mode returns by RTC period interrupt disabled"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(RTCPRDWUPEN_A::_0)
    }
    #[doc = "Software Standby/Snooze Mode returns by RTC period interrupt enabled"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(RTCPRDWUPEN_A::_1)
    }
}
#[doc = "Field `AGT1UDWUPEN` reader - AGT1 Underflow Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type AGT1UDWUPEN_R = crate::BitReader<AGT1UDWUPEN_A>;
#[doc = "AGT1 Underflow Interrupt Software Standby/Snooze Mode Returns Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AGT1UDWUPEN_A {
    #[doc = "0: Software Standby/Snooze Mode returns by AGT1 underflow interrupt disabled"]
    _0 = 0,
    #[doc = "1: Software Standby/Snooze Mode returns by AGT1 underflow"]
    _1 = 1,
}
impl From<AGT1UDWUPEN_A> for bool {
    #[inline(always)]
    fn from(variant: AGT1UDWUPEN_A) -> Self {
        variant as u8 != 0
    }
}
impl AGT1UDWUPEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> AGT1UDWUPEN_A {
        match self.bits {
            false => AGT1UDWUPEN_A::_0,
            true => AGT1UDWUPEN_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == AGT1UDWUPEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == AGT1UDWUPEN_A::_1
    }
}
#[doc = "Field `AGT1UDWUPEN` writer - AGT1 Underflow Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type AGT1UDWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN_SPEC, AGT1UDWUPEN_A, O>;
impl<'a, const O: u8> AGT1UDWUPEN_W<'a, O> {
    #[doc = "Software Standby/Snooze Mode returns by AGT1 underflow interrupt disabled"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(AGT1UDWUPEN_A::_0)
    }
    #[doc = "Software Standby/Snooze Mode returns by AGT1 underflow"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(AGT1UDWUPEN_A::_1)
    }
}
#[doc = "Field `AGT1CAWUPEN` reader - AGT1 Compare Match A Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type AGT1CAWUPEN_R = crate::BitReader<AGT1CAWUPEN_A>;
#[doc = "AGT1 Compare Match A Interrupt Software Standby/Snooze Mode Returns Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AGT1CAWUPEN_A {
    #[doc = "0: Software Standby/Snooze Mode returns by AGT1 compare match A interrupt disabled."]
    _0 = 0,
    #[doc = "1: Software Standby/Snooze Mode returns by AGT1 compare match A interrupt enabled."]
    _1 = 1,
}
impl From<AGT1CAWUPEN_A> for bool {
    #[inline(always)]
    fn from(variant: AGT1CAWUPEN_A) -> Self {
        variant as u8 != 0
    }
}
impl AGT1CAWUPEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> AGT1CAWUPEN_A {
        match self.bits {
            false => AGT1CAWUPEN_A::_0,
            true => AGT1CAWUPEN_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == AGT1CAWUPEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == AGT1CAWUPEN_A::_1
    }
}
#[doc = "Field `AGT1CAWUPEN` writer - AGT1 Compare Match A Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type AGT1CAWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN_SPEC, AGT1CAWUPEN_A, O>;
impl<'a, const O: u8> AGT1CAWUPEN_W<'a, O> {
    #[doc = "Software Standby/Snooze Mode returns by AGT1 compare match A interrupt disabled."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(AGT1CAWUPEN_A::_0)
    }
    #[doc = "Software Standby/Snooze Mode returns by AGT1 compare match A interrupt enabled."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(AGT1CAWUPEN_A::_1)
    }
}
#[doc = "Field `AGT1CBWUPEN` reader - AGT1 Compare Match B Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type AGT1CBWUPEN_R = crate::BitReader<AGT1CBWUPEN_A>;
#[doc = "AGT1 Compare Match B Interrupt Software Standby/Snooze Mode Returns Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AGT1CBWUPEN_A {
    #[doc = "0: Software Standby/Snooze Mode returns by AGT1 compare match B interrupt disabled."]
    _0 = 0,
    #[doc = "1: Software Standby/Snooze Mode returns by AGT1 compare match B interrupt enabled."]
    _1 = 1,
}
impl From<AGT1CBWUPEN_A> for bool {
    #[inline(always)]
    fn from(variant: AGT1CBWUPEN_A) -> Self {
        variant as u8 != 0
    }
}
impl AGT1CBWUPEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> AGT1CBWUPEN_A {
        match self.bits {
            false => AGT1CBWUPEN_A::_0,
            true => AGT1CBWUPEN_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == AGT1CBWUPEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == AGT1CBWUPEN_A::_1
    }
}
#[doc = "Field `AGT1CBWUPEN` writer - AGT1 Compare Match B Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type AGT1CBWUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN_SPEC, AGT1CBWUPEN_A, O>;
impl<'a, const O: u8> AGT1CBWUPEN_W<'a, O> {
    #[doc = "Software Standby/Snooze Mode returns by AGT1 compare match B interrupt disabled."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(AGT1CBWUPEN_A::_0)
    }
    #[doc = "Software Standby/Snooze Mode returns by AGT1 compare match B interrupt enabled."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(AGT1CBWUPEN_A::_1)
    }
}
#[doc = "Field `IIC0WUPEN` reader - IIC0 Address Match Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type IIC0WUPEN_R = crate::BitReader<IIC0WUPEN_A>;
#[doc = "IIC0 Address Match Interrupt Software Standby/Snooze Mode Returns Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum IIC0WUPEN_A {
    #[doc = "0: Software Standby/Snooze Mode returns by IIC0 address match interrupt disabled"]
    _0 = 0,
    #[doc = "1: Software Standby/Snooze Mode returns by IIC0 address match interrupt enabled"]
    _1 = 1,
}
impl From<IIC0WUPEN_A> for bool {
    #[inline(always)]
    fn from(variant: IIC0WUPEN_A) -> Self {
        variant as u8 != 0
    }
}
impl IIC0WUPEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> IIC0WUPEN_A {
        match self.bits {
            false => IIC0WUPEN_A::_0,
            true => IIC0WUPEN_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == IIC0WUPEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == IIC0WUPEN_A::_1
    }
}
#[doc = "Field `IIC0WUPEN` writer - IIC0 Address Match Interrupt Software Standby/Snooze Mode Returns Enable"]
pub type IIC0WUPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, WUPEN_SPEC, IIC0WUPEN_A, O>;
impl<'a, const O: u8> IIC0WUPEN_W<'a, O> {
    #[doc = "Software Standby/Snooze Mode returns by IIC0 address match interrupt disabled"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(IIC0WUPEN_A::_0)
    }
    #[doc = "Software Standby/Snooze Mode returns by IIC0 address match interrupt enabled"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(IIC0WUPEN_A::_1)
    }
}
impl R {
    #[doc = "Bits 0:7 - IRQ Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    pub fn irqwupen(&self) -> IRQWUPEN_R {
        IRQWUPEN_R::new((self.bits & 0xff) as u8)
    }
    #[doc = "Bit 16 - IWDT Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    pub fn iwdtwupen(&self) -> IWDTWUPEN_R {
        IWDTWUPEN_R::new(((self.bits >> 16) & 1) != 0)
    }
    #[doc = "Bit 17 - Key Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    pub fn keywupen(&self) -> KEYWUPEN_R {
        KEYWUPEN_R::new(((self.bits >> 17) & 1) != 0)
    }
    #[doc = "Bit 18 - LVD1 Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    pub fn lvd1wupen(&self) -> LVD1WUPEN_R {
        LVD1WUPEN_R::new(((self.bits >> 18) & 1) != 0)
    }
    #[doc = "Bit 19 - LVD2 Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    pub fn lvd2wupen(&self) -> LVD2WUPEN_R {
        LVD2WUPEN_R::new(((self.bits >> 19) & 1) != 0)
    }
    #[doc = "Bit 23 - ACMPLP0 Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    pub fn acmplp0wupen(&self) -> ACMPLP0WUPEN_R {
        ACMPLP0WUPEN_R::new(((self.bits >> 23) & 1) != 0)
    }
    #[doc = "Bit 24 - RTC Alarm Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    pub fn rtcalmwupen(&self) -> RTCALMWUPEN_R {
        RTCALMWUPEN_R::new(((self.bits >> 24) & 1) != 0)
    }
    #[doc = "Bit 25 - RTC Period Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    pub fn rtcprdwupen(&self) -> RTCPRDWUPEN_R {
        RTCPRDWUPEN_R::new(((self.bits >> 25) & 1) != 0)
    }
    #[doc = "Bit 28 - AGT1 Underflow Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    pub fn agt1udwupen(&self) -> AGT1UDWUPEN_R {
        AGT1UDWUPEN_R::new(((self.bits >> 28) & 1) != 0)
    }
    #[doc = "Bit 29 - AGT1 Compare Match A Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    pub fn agt1cawupen(&self) -> AGT1CAWUPEN_R {
        AGT1CAWUPEN_R::new(((self.bits >> 29) & 1) != 0)
    }
    #[doc = "Bit 30 - AGT1 Compare Match B Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    pub fn agt1cbwupen(&self) -> AGT1CBWUPEN_R {
        AGT1CBWUPEN_R::new(((self.bits >> 30) & 1) != 0)
    }
    #[doc = "Bit 31 - IIC0 Address Match Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    pub fn iic0wupen(&self) -> IIC0WUPEN_R {
        IIC0WUPEN_R::new(((self.bits >> 31) & 1) != 0)
    }
}
impl W {
    #[doc = "Bits 0:7 - IRQ Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    #[must_use]
    pub fn irqwupen(&mut self) -> IRQWUPEN_W<0> {
        IRQWUPEN_W::new(self)
    }
    #[doc = "Bit 16 - IWDT Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    #[must_use]
    pub fn iwdtwupen(&mut self) -> IWDTWUPEN_W<16> {
        IWDTWUPEN_W::new(self)
    }
    #[doc = "Bit 17 - Key Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    #[must_use]
    pub fn keywupen(&mut self) -> KEYWUPEN_W<17> {
        KEYWUPEN_W::new(self)
    }
    #[doc = "Bit 18 - LVD1 Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    #[must_use]
    pub fn lvd1wupen(&mut self) -> LVD1WUPEN_W<18> {
        LVD1WUPEN_W::new(self)
    }
    #[doc = "Bit 19 - LVD2 Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    #[must_use]
    pub fn lvd2wupen(&mut self) -> LVD2WUPEN_W<19> {
        LVD2WUPEN_W::new(self)
    }
    #[doc = "Bit 23 - ACMPLP0 Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    #[must_use]
    pub fn acmplp0wupen(&mut self) -> ACMPLP0WUPEN_W<23> {
        ACMPLP0WUPEN_W::new(self)
    }
    #[doc = "Bit 24 - RTC Alarm Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    #[must_use]
    pub fn rtcalmwupen(&mut self) -> RTCALMWUPEN_W<24> {
        RTCALMWUPEN_W::new(self)
    }
    #[doc = "Bit 25 - RTC Period Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    #[must_use]
    pub fn rtcprdwupen(&mut self) -> RTCPRDWUPEN_W<25> {
        RTCPRDWUPEN_W::new(self)
    }
    #[doc = "Bit 28 - AGT1 Underflow Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    #[must_use]
    pub fn agt1udwupen(&mut self) -> AGT1UDWUPEN_W<28> {
        AGT1UDWUPEN_W::new(self)
    }
    #[doc = "Bit 29 - AGT1 Compare Match A Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    #[must_use]
    pub fn agt1cawupen(&mut self) -> AGT1CAWUPEN_W<29> {
        AGT1CAWUPEN_W::new(self)
    }
    #[doc = "Bit 30 - AGT1 Compare Match B Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    #[must_use]
    pub fn agt1cbwupen(&mut self) -> AGT1CBWUPEN_W<30> {
        AGT1CBWUPEN_W::new(self)
    }
    #[doc = "Bit 31 - IIC0 Address Match Interrupt Software Standby/Snooze Mode Returns Enable"]
    #[inline(always)]
    #[must_use]
    pub fn iic0wupen(&mut self) -> IIC0WUPEN_W<31> {
        IIC0WUPEN_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 = "Wake Up 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 [wupen](index.html) module"]
pub struct WUPEN_SPEC;
impl crate::RegisterSpec for WUPEN_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [wupen::R](R) reader structure"]
impl crate::Readable for WUPEN_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [wupen::W](W) writer structure"]
impl crate::Writable for WUPEN_SPEC {
    type Writer = W;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets WUPEN to value 0"]
impl crate::Resettable for WUPEN_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}