ra2a1 0.2.0

Peripheral access API for ra2a1 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
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
#[doc = "Register `POEGG%s` reader"]
pub struct R(crate::R<POEGG_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<POEGG_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<POEGG_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<POEGG_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `POEGG%s` writer"]
pub struct W(crate::W<POEGG_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<POEGG_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<POEGG_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<POEGG_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `PIDF` reader - Port Input Detection Flag\n\nThe field is **modified** in some way after a read operation."]
pub type PIDF_R = crate::BitReader<PIDF_A>;
#[doc = "Port Input Detection Flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PIDF_A {
    #[doc = "0: A output-disable request from the GTETRG pin has not been generated."]
    _0 = 0,
    #[doc = "1: A output-disable request from the GTETRG pin has been generated."]
    _1 = 1,
}
impl From<PIDF_A> for bool {
    #[inline(always)]
    fn from(variant: PIDF_A) -> Self {
        variant as u8 != 0
    }
}
impl PIDF_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> PIDF_A {
        match self.bits {
            false => PIDF_A::_0,
            true => PIDF_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == PIDF_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == PIDF_A::_1
    }
}
#[doc = "Field `PIDF` writer - Port Input Detection Flag"]
pub type PIDF_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, POEGG_SPEC, PIDF_A, O>;
impl<'a, const O: u8> PIDF_W<'a, O> {
    #[doc = "A output-disable request from the GTETRG pin has not been generated."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(PIDF_A::_0)
    }
    #[doc = "A output-disable request from the GTETRG pin has been generated."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(PIDF_A::_1)
    }
}
#[doc = "Field `IOCF` reader - Real Time Overcurrent Detection Flag\n\nThe field is **modified** in some way after a read operation."]
pub type IOCF_R = crate::BitReader<IOCF_A>;
#[doc = "Real Time Overcurrent Detection Flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum IOCF_A {
    #[doc = "0: No output-disable request from the GPT, the ACMPHS or the ACMPLP occurred."]
    _0 = 0,
    #[doc = "1: Output-disable request from the GPT, the ACMPHS or the ACMPLP occurred."]
    _1 = 1,
}
impl From<IOCF_A> for bool {
    #[inline(always)]
    fn from(variant: IOCF_A) -> Self {
        variant as u8 != 0
    }
}
impl IOCF_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> IOCF_A {
        match self.bits {
            false => IOCF_A::_0,
            true => IOCF_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == IOCF_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == IOCF_A::_1
    }
}
#[doc = "Field `IOCF` writer - Real Time Overcurrent Detection Flag"]
pub type IOCF_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, POEGG_SPEC, IOCF_A, O>;
impl<'a, const O: u8> IOCF_W<'a, O> {
    #[doc = "No output-disable request from the GPT, the ACMPHS or the ACMPLP occurred."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(IOCF_A::_0)
    }
    #[doc = "Output-disable request from the GPT, the ACMPHS or the ACMPLP occurred."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(IOCF_A::_1)
    }
}
#[doc = "Field `OSTPF` reader - Oscillation Stop Detection Flag\n\nThe field is **modified** in some way after a read operation."]
pub type OSTPF_R = crate::BitReader<OSTPF_A>;
#[doc = "Oscillation Stop Detection Flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OSTPF_A {
    #[doc = "0: A output-disable request from the oscillation stop detection has not been generated."]
    _0 = 0,
    #[doc = "1: A output-disable request from the oscillation stop detection has been generated."]
    _1 = 1,
}
impl From<OSTPF_A> for bool {
    #[inline(always)]
    fn from(variant: OSTPF_A) -> Self {
        variant as u8 != 0
    }
}
impl OSTPF_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OSTPF_A {
        match self.bits {
            false => OSTPF_A::_0,
            true => OSTPF_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == OSTPF_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == OSTPF_A::_1
    }
}
#[doc = "Field `OSTPF` writer - Oscillation Stop Detection Flag"]
pub type OSTPF_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, POEGG_SPEC, OSTPF_A, O>;
impl<'a, const O: u8> OSTPF_W<'a, O> {
    #[doc = "A output-disable request from the oscillation stop detection has not been generated."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(OSTPF_A::_0)
    }
    #[doc = "A output-disable request from the oscillation stop detection has been generated."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(OSTPF_A::_1)
    }
}
#[doc = "Field `SSF` reader - Software Stop Flag"]
pub type SSF_R = crate::BitReader<SSF_A>;
#[doc = "Software Stop Flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SSF_A {
    #[doc = "0: A output-disable request from software has not been generated."]
    _0 = 0,
    #[doc = "1: A output-disable request from software has been generated."]
    _1 = 1,
}
impl From<SSF_A> for bool {
    #[inline(always)]
    fn from(variant: SSF_A) -> Self {
        variant as u8 != 0
    }
}
impl SSF_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SSF_A {
        match self.bits {
            false => SSF_A::_0,
            true => SSF_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == SSF_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == SSF_A::_1
    }
}
#[doc = "Field `SSF` writer - Software Stop Flag"]
pub type SSF_W<'a, const O: u8> = crate::BitWriter<'a, u32, POEGG_SPEC, SSF_A, O>;
impl<'a, const O: u8> SSF_W<'a, O> {
    #[doc = "A output-disable request from software has not been generated."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(SSF_A::_0)
    }
    #[doc = "A output-disable request from software has been generated."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(SSF_A::_1)
    }
}
#[doc = "Field `PIDE` reader - Port Input Detection EnableNote: Can be modified only once after a reset."]
pub type PIDE_R = crate::BitReader<PIDE_A>;
#[doc = "Port Input Detection EnableNote: Can be modified only once after a reset.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PIDE_A {
    #[doc = "0: A output-disable request from the GTETRG pins disabled."]
    _0 = 0,
    #[doc = "1: A output-disable request from the GTETRG pins enabled."]
    _1 = 1,
}
impl From<PIDE_A> for bool {
    #[inline(always)]
    fn from(variant: PIDE_A) -> Self {
        variant as u8 != 0
    }
}
impl PIDE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> PIDE_A {
        match self.bits {
            false => PIDE_A::_0,
            true => PIDE_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == PIDE_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == PIDE_A::_1
    }
}
#[doc = "Field `PIDE` writer - Port Input Detection EnableNote: Can be modified only once after a reset."]
pub type PIDE_W<'a, const O: u8> = crate::BitWriter<'a, u32, POEGG_SPEC, PIDE_A, O>;
impl<'a, const O: u8> PIDE_W<'a, O> {
    #[doc = "A output-disable request from the GTETRG pins disabled."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(PIDE_A::_0)
    }
    #[doc = "A output-disable request from the GTETRG pins enabled."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(PIDE_A::_1)
    }
}
#[doc = "Field `IOCE` reader - Real Time Overcurrent EnableNote: Can be modified only once after a reset."]
pub type IOCE_R = crate::BitReader<IOCE_A>;
#[doc = "Real Time Overcurrent EnableNote: Can be modified only once after a reset.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum IOCE_A {
    #[doc = "0: A output-disable request from GPT disable request or comparator interrupt disabled."]
    _0 = 0,
    #[doc = "1: A output-disable request from GPT disable request or comparator interrupt enabled."]
    _1 = 1,
}
impl From<IOCE_A> for bool {
    #[inline(always)]
    fn from(variant: IOCE_A) -> Self {
        variant as u8 != 0
    }
}
impl IOCE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> IOCE_A {
        match self.bits {
            false => IOCE_A::_0,
            true => IOCE_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == IOCE_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == IOCE_A::_1
    }
}
#[doc = "Field `IOCE` writer - Real Time Overcurrent EnableNote: Can be modified only once after a reset."]
pub type IOCE_W<'a, const O: u8> = crate::BitWriter<'a, u32, POEGG_SPEC, IOCE_A, O>;
impl<'a, const O: u8> IOCE_W<'a, O> {
    #[doc = "A output-disable request from GPT disable request or comparator interrupt disabled."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(IOCE_A::_0)
    }
    #[doc = "A output-disable request from GPT disable request or comparator interrupt enabled."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(IOCE_A::_1)
    }
}
#[doc = "Field `OSTPE` reader - Oscillation Stop Detection EnableNote: Can be modified only once after a reset."]
pub type OSTPE_R = crate::BitReader<OSTPE_A>;
#[doc = "Oscillation Stop Detection EnableNote: Can be modified only once after a reset.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OSTPE_A {
    #[doc = "0: A output-disable request from the oscillation stop detection disabled."]
    _0 = 0,
    #[doc = "1: A output-disable request from the oscillation stop detection enabled."]
    _1 = 1,
}
impl From<OSTPE_A> for bool {
    #[inline(always)]
    fn from(variant: OSTPE_A) -> Self {
        variant as u8 != 0
    }
}
impl OSTPE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OSTPE_A {
        match self.bits {
            false => OSTPE_A::_0,
            true => OSTPE_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == OSTPE_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == OSTPE_A::_1
    }
}
#[doc = "Field `OSTPE` writer - Oscillation Stop Detection EnableNote: Can be modified only once after a reset."]
pub type OSTPE_W<'a, const O: u8> = crate::BitWriter<'a, u32, POEGG_SPEC, OSTPE_A, O>;
impl<'a, const O: u8> OSTPE_W<'a, O> {
    #[doc = "A output-disable request from the oscillation stop detection disabled."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(OSTPE_A::_0)
    }
    #[doc = "A output-disable request from the oscillation stop detection enabled."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(OSTPE_A::_1)
    }
}
#[doc = "Field `CDRE0` reader - ACMP_HS0 EnableNote: Can be modified only once after a reset."]
pub type CDRE0_R = crate::BitReader<CDRE0_A>;
#[doc = "ACMP_HS0 EnableNote: Can be modified only once after a reset.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CDRE0_A {
    #[doc = "0: Disable output-disable request from ACMPHS0."]
    _0 = 0,
    #[doc = "1: Enable output-disable request from ACMPHS0."]
    _1 = 1,
}
impl From<CDRE0_A> for bool {
    #[inline(always)]
    fn from(variant: CDRE0_A) -> Self {
        variant as u8 != 0
    }
}
impl CDRE0_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> CDRE0_A {
        match self.bits {
            false => CDRE0_A::_0,
            true => CDRE0_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == CDRE0_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == CDRE0_A::_1
    }
}
#[doc = "Field `CDRE0` writer - ACMP_HS0 EnableNote: Can be modified only once after a reset."]
pub type CDRE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, POEGG_SPEC, CDRE0_A, O>;
impl<'a, const O: u8> CDRE0_W<'a, O> {
    #[doc = "Disable output-disable request from ACMPHS0."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CDRE0_A::_0)
    }
    #[doc = "Enable output-disable request from ACMPHS0."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CDRE0_A::_1)
    }
}
#[doc = "Field `CDRE4` reader - ACMP_LP0 EnableNote: Can be modified only once after a reset."]
pub type CDRE4_R = crate::BitReader<CDRE4_A>;
#[doc = "ACMP_LP0 EnableNote: Can be modified only once after a reset.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CDRE4_A {
    #[doc = "0: Disable output-disable request from ACMPLP0."]
    _0 = 0,
    #[doc = "1: Enable output-disable request from ACMPLP0."]
    _1 = 1,
}
impl From<CDRE4_A> for bool {
    #[inline(always)]
    fn from(variant: CDRE4_A) -> Self {
        variant as u8 != 0
    }
}
impl CDRE4_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> CDRE4_A {
        match self.bits {
            false => CDRE4_A::_0,
            true => CDRE4_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == CDRE4_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == CDRE4_A::_1
    }
}
#[doc = "Field `CDRE4` writer - ACMP_LP0 EnableNote: Can be modified only once after a reset."]
pub type CDRE4_W<'a, const O: u8> = crate::BitWriter<'a, u32, POEGG_SPEC, CDRE4_A, O>;
impl<'a, const O: u8> CDRE4_W<'a, O> {
    #[doc = "Disable output-disable request from ACMPLP0."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CDRE4_A::_0)
    }
    #[doc = "Enable output-disable request from ACMPLP0."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CDRE4_A::_1)
    }
}
#[doc = "Field `CDRE5` reader - ACMP_LP1 EnableNote: Can be modified only once after a reset."]
pub type CDRE5_R = crate::BitReader<CDRE5_A>;
#[doc = "ACMP_LP1 EnableNote: Can be modified only once after a reset.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CDRE5_A {
    #[doc = "0: Disable output-disable request from ACMPLP1."]
    _0 = 0,
    #[doc = "1: Enable output-disable request from ACMPLP1."]
    _1 = 1,
}
impl From<CDRE5_A> for bool {
    #[inline(always)]
    fn from(variant: CDRE5_A) -> Self {
        variant as u8 != 0
    }
}
impl CDRE5_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> CDRE5_A {
        match self.bits {
            false => CDRE5_A::_0,
            true => CDRE5_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == CDRE5_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == CDRE5_A::_1
    }
}
#[doc = "Field `CDRE5` writer - ACMP_LP1 EnableNote: Can be modified only once after a reset."]
pub type CDRE5_W<'a, const O: u8> = crate::BitWriter<'a, u32, POEGG_SPEC, CDRE5_A, O>;
impl<'a, const O: u8> CDRE5_W<'a, O> {
    #[doc = "Disable output-disable request from ACMPLP1."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(CDRE5_A::_0)
    }
    #[doc = "Enable output-disable request from ACMPLP1."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(CDRE5_A::_1)
    }
}
#[doc = "Field `ST` reader - GTETRG Input Status Flag"]
pub type ST_R = crate::BitReader<ST_A>;
#[doc = "GTETRG Input Status Flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ST_A {
    #[doc = "0: GTETRG input after filtering is 0."]
    _0 = 0,
    #[doc = "1: GTETRG input after filtering is 1."]
    _1 = 1,
}
impl From<ST_A> for bool {
    #[inline(always)]
    fn from(variant: ST_A) -> Self {
        variant as u8 != 0
    }
}
impl ST_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> ST_A {
        match self.bits {
            false => ST_A::_0,
            true => ST_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == ST_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == ST_A::_1
    }
}
#[doc = "Field `INV` reader - GTETRG Input Reverse"]
pub type INV_R = crate::BitReader<INV_A>;
#[doc = "GTETRG Input Reverse\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum INV_A {
    #[doc = "0: GTETRG Input"]
    _0 = 0,
    #[doc = "1: GTETRG Input Reversed."]
    _1 = 1,
}
impl From<INV_A> for bool {
    #[inline(always)]
    fn from(variant: INV_A) -> Self {
        variant as u8 != 0
    }
}
impl INV_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> INV_A {
        match self.bits {
            false => INV_A::_0,
            true => INV_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == INV_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == INV_A::_1
    }
}
#[doc = "Field `INV` writer - GTETRG Input Reverse"]
pub type INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, POEGG_SPEC, INV_A, O>;
impl<'a, const O: u8> INV_W<'a, O> {
    #[doc = "GTETRG Input"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(INV_A::_0)
    }
    #[doc = "GTETRG Input Reversed."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(INV_A::_1)
    }
}
#[doc = "Field `NFEN` reader - Noise Filter Enable"]
pub type NFEN_R = crate::BitReader<NFEN_A>;
#[doc = "Noise Filter Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum NFEN_A {
    #[doc = "0: Filtering noise disabled"]
    _0 = 0,
    #[doc = "1: Filtering noise enabled"]
    _1 = 1,
}
impl From<NFEN_A> for bool {
    #[inline(always)]
    fn from(variant: NFEN_A) -> Self {
        variant as u8 != 0
    }
}
impl NFEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> NFEN_A {
        match self.bits {
            false => NFEN_A::_0,
            true => NFEN_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == NFEN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == NFEN_A::_1
    }
}
#[doc = "Field `NFEN` writer - Noise Filter Enable"]
pub type NFEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, POEGG_SPEC, NFEN_A, O>;
impl<'a, const O: u8> NFEN_W<'a, O> {
    #[doc = "Filtering noise disabled"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(NFEN_A::_0)
    }
    #[doc = "Filtering noise enabled"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(NFEN_A::_1)
    }
}
#[doc = "Field `NFCS` reader - Noise Filter Clock Select"]
pub type NFCS_R = crate::FieldReader<u8, NFCS_A>;
#[doc = "Noise Filter Clock Select\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum NFCS_A {
    #[doc = "0: Sampling GTETRG pin input level for three times in every PCLKB."]
    _00 = 0,
    #[doc = "1: Sampling GTETRG pin input level for three times in every PCLKB /8."]
    _01 = 1,
    #[doc = "2: Sampling GTETRG pin input level for three times in every PCLKB /32."]
    _10 = 2,
    #[doc = "3: Sampling GTETRG pin input level for three times in every PCLKB /128."]
    _11 = 3,
}
impl From<NFCS_A> for u8 {
    #[inline(always)]
    fn from(variant: NFCS_A) -> Self {
        variant as _
    }
}
impl NFCS_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> NFCS_A {
        match self.bits {
            0 => NFCS_A::_00,
            1 => NFCS_A::_01,
            2 => NFCS_A::_10,
            3 => NFCS_A::_11,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `_00`"]
    #[inline(always)]
    pub fn is_00(&self) -> bool {
        *self == NFCS_A::_00
    }
    #[doc = "Checks if the value of the field is `_01`"]
    #[inline(always)]
    pub fn is_01(&self) -> bool {
        *self == NFCS_A::_01
    }
    #[doc = "Checks if the value of the field is `_10`"]
    #[inline(always)]
    pub fn is_10(&self) -> bool {
        *self == NFCS_A::_10
    }
    #[doc = "Checks if the value of the field is `_11`"]
    #[inline(always)]
    pub fn is_11(&self) -> bool {
        *self == NFCS_A::_11
    }
}
#[doc = "Field `NFCS` writer - Noise Filter Clock Select"]
pub type NFCS_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, POEGG_SPEC, u8, NFCS_A, 2, O>;
impl<'a, const O: u8> NFCS_W<'a, O> {
    #[doc = "Sampling GTETRG pin input level for three times in every PCLKB."]
    #[inline(always)]
    pub fn _00(self) -> &'a mut W {
        self.variant(NFCS_A::_00)
    }
    #[doc = "Sampling GTETRG pin input level for three times in every PCLKB /8."]
    #[inline(always)]
    pub fn _01(self) -> &'a mut W {
        self.variant(NFCS_A::_01)
    }
    #[doc = "Sampling GTETRG pin input level for three times in every PCLKB /32."]
    #[inline(always)]
    pub fn _10(self) -> &'a mut W {
        self.variant(NFCS_A::_10)
    }
    #[doc = "Sampling GTETRG pin input level for three times in every PCLKB /128."]
    #[inline(always)]
    pub fn _11(self) -> &'a mut W {
        self.variant(NFCS_A::_11)
    }
}
impl R {
    #[doc = "Bit 0 - Port Input Detection Flag"]
    #[inline(always)]
    pub fn pidf(&self) -> PIDF_R {
        PIDF_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Real Time Overcurrent Detection Flag"]
    #[inline(always)]
    pub fn iocf(&self) -> IOCF_R {
        IOCF_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Oscillation Stop Detection Flag"]
    #[inline(always)]
    pub fn ostpf(&self) -> OSTPF_R {
        OSTPF_R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - Software Stop Flag"]
    #[inline(always)]
    pub fn ssf(&self) -> SSF_R {
        SSF_R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - Port Input Detection EnableNote: Can be modified only once after a reset."]
    #[inline(always)]
    pub fn pide(&self) -> PIDE_R {
        PIDE_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - Real Time Overcurrent EnableNote: Can be modified only once after a reset."]
    #[inline(always)]
    pub fn ioce(&self) -> IOCE_R {
        IOCE_R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - Oscillation Stop Detection EnableNote: Can be modified only once after a reset."]
    #[inline(always)]
    pub fn ostpe(&self) -> OSTPE_R {
        OSTPE_R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 8 - ACMP_HS0 EnableNote: Can be modified only once after a reset."]
    #[inline(always)]
    pub fn cdre0(&self) -> CDRE0_R {
        CDRE0_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 12 - ACMP_LP0 EnableNote: Can be modified only once after a reset."]
    #[inline(always)]
    pub fn cdre4(&self) -> CDRE4_R {
        CDRE4_R::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 13 - ACMP_LP1 EnableNote: Can be modified only once after a reset."]
    #[inline(always)]
    pub fn cdre5(&self) -> CDRE5_R {
        CDRE5_R::new(((self.bits >> 13) & 1) != 0)
    }
    #[doc = "Bit 16 - GTETRG Input Status Flag"]
    #[inline(always)]
    pub fn st(&self) -> ST_R {
        ST_R::new(((self.bits >> 16) & 1) != 0)
    }
    #[doc = "Bit 28 - GTETRG Input Reverse"]
    #[inline(always)]
    pub fn inv(&self) -> INV_R {
        INV_R::new(((self.bits >> 28) & 1) != 0)
    }
    #[doc = "Bit 29 - Noise Filter Enable"]
    #[inline(always)]
    pub fn nfen(&self) -> NFEN_R {
        NFEN_R::new(((self.bits >> 29) & 1) != 0)
    }
    #[doc = "Bits 30:31 - Noise Filter Clock Select"]
    #[inline(always)]
    pub fn nfcs(&self) -> NFCS_R {
        NFCS_R::new(((self.bits >> 30) & 3) as u8)
    }
}
impl W {
    #[doc = "Bit 0 - Port Input Detection Flag"]
    #[inline(always)]
    #[must_use]
    pub fn pidf(&mut self) -> PIDF_W<0> {
        PIDF_W::new(self)
    }
    #[doc = "Bit 1 - Real Time Overcurrent Detection Flag"]
    #[inline(always)]
    #[must_use]
    pub fn iocf(&mut self) -> IOCF_W<1> {
        IOCF_W::new(self)
    }
    #[doc = "Bit 2 - Oscillation Stop Detection Flag"]
    #[inline(always)]
    #[must_use]
    pub fn ostpf(&mut self) -> OSTPF_W<2> {
        OSTPF_W::new(self)
    }
    #[doc = "Bit 3 - Software Stop Flag"]
    #[inline(always)]
    #[must_use]
    pub fn ssf(&mut self) -> SSF_W<3> {
        SSF_W::new(self)
    }
    #[doc = "Bit 4 - Port Input Detection EnableNote: Can be modified only once after a reset."]
    #[inline(always)]
    #[must_use]
    pub fn pide(&mut self) -> PIDE_W<4> {
        PIDE_W::new(self)
    }
    #[doc = "Bit 5 - Real Time Overcurrent EnableNote: Can be modified only once after a reset."]
    #[inline(always)]
    #[must_use]
    pub fn ioce(&mut self) -> IOCE_W<5> {
        IOCE_W::new(self)
    }
    #[doc = "Bit 6 - Oscillation Stop Detection EnableNote: Can be modified only once after a reset."]
    #[inline(always)]
    #[must_use]
    pub fn ostpe(&mut self) -> OSTPE_W<6> {
        OSTPE_W::new(self)
    }
    #[doc = "Bit 8 - ACMP_HS0 EnableNote: Can be modified only once after a reset."]
    #[inline(always)]
    #[must_use]
    pub fn cdre0(&mut self) -> CDRE0_W<8> {
        CDRE0_W::new(self)
    }
    #[doc = "Bit 12 - ACMP_LP0 EnableNote: Can be modified only once after a reset."]
    #[inline(always)]
    #[must_use]
    pub fn cdre4(&mut self) -> CDRE4_W<12> {
        CDRE4_W::new(self)
    }
    #[doc = "Bit 13 - ACMP_LP1 EnableNote: Can be modified only once after a reset."]
    #[inline(always)]
    #[must_use]
    pub fn cdre5(&mut self) -> CDRE5_W<13> {
        CDRE5_W::new(self)
    }
    #[doc = "Bit 28 - GTETRG Input Reverse"]
    #[inline(always)]
    #[must_use]
    pub fn inv(&mut self) -> INV_W<28> {
        INV_W::new(self)
    }
    #[doc = "Bit 29 - Noise Filter Enable"]
    #[inline(always)]
    #[must_use]
    pub fn nfen(&mut self) -> NFEN_W<29> {
        NFEN_W::new(self)
    }
    #[doc = "Bits 30:31 - Noise Filter Clock Select"]
    #[inline(always)]
    #[must_use]
    pub fn nfcs(&mut self) -> NFCS_W<30> {
        NFCS_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 = "POEG Group %s Setting 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 [poegg](index.html) module"]
pub struct POEGG_SPEC;
impl crate::RegisterSpec for POEGG_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [poegg::R](R) reader structure"]
impl crate::Readable for POEGG_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [poegg::W](W) writer structure"]
impl crate::Writable for POEGG_SPEC {
    type Writer = W;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x07;
    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets POEGG%s to value 0"]
impl crate::Resettable for POEGG_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}