efm32pg1b-pac 0.4.3

Peripheral access API for Silicon Labs EFM32PG1B microcontrollers
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
928
929
930
931
932
933
///Register `EXTIPSELH` reader
pub type R = crate::R<EXTIPSELHrs>;
///Register `EXTIPSELH` writer
pub type W = crate::W<EXTIPSELHrs>;
///External Interrupt 8 Port Select
///
///Value on reset: 0
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum EXTIPSEL8 {
    ///0: Port A group selected for external interrupt 8
    Porta = 0,
    ///1: Port B group selected for external interrupt 8
    Portb = 1,
    ///2: Port C group selected for external interrupt 8
    Portc = 2,
    ///3: Port D group selected for external interrupt 8
    Portd = 3,
    ///5: Port F group selected for external interrupt 8
    Portf = 5,
}
impl From<EXTIPSEL8> for u8 {
    #[inline(always)]
    fn from(variant: EXTIPSEL8) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for EXTIPSEL8 {
    type Ux = u8;
}
impl crate::IsEnum for EXTIPSEL8 {}
///Field `EXTIPSEL8` reader - External Interrupt 8 Port Select
pub type Extipsel8R = crate::FieldReader<EXTIPSEL8>;
impl Extipsel8R {
    ///Get enumerated values variant
    #[inline(always)]
    pub const fn variant(&self) -> Option<EXTIPSEL8> {
        match self.bits {
            0 => Some(EXTIPSEL8::Porta),
            1 => Some(EXTIPSEL8::Portb),
            2 => Some(EXTIPSEL8::Portc),
            3 => Some(EXTIPSEL8::Portd),
            5 => Some(EXTIPSEL8::Portf),
            _ => None,
        }
    }
    ///Port A group selected for external interrupt 8
    #[inline(always)]
    pub fn is_porta(&self) -> bool {
        *self == EXTIPSEL8::Porta
    }
    ///Port B group selected for external interrupt 8
    #[inline(always)]
    pub fn is_portb(&self) -> bool {
        *self == EXTIPSEL8::Portb
    }
    ///Port C group selected for external interrupt 8
    #[inline(always)]
    pub fn is_portc(&self) -> bool {
        *self == EXTIPSEL8::Portc
    }
    ///Port D group selected for external interrupt 8
    #[inline(always)]
    pub fn is_portd(&self) -> bool {
        *self == EXTIPSEL8::Portd
    }
    ///Port F group selected for external interrupt 8
    #[inline(always)]
    pub fn is_portf(&self) -> bool {
        *self == EXTIPSEL8::Portf
    }
}
///Field `EXTIPSEL8` writer - External Interrupt 8 Port Select
pub type Extipsel8W<'a, REG> = crate::FieldWriter<'a, REG, 4, EXTIPSEL8>;
impl<'a, REG> Extipsel8W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    ///Port A group selected for external interrupt 8
    #[inline(always)]
    pub fn porta(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL8::Porta)
    }
    ///Port B group selected for external interrupt 8
    #[inline(always)]
    pub fn portb(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL8::Portb)
    }
    ///Port C group selected for external interrupt 8
    #[inline(always)]
    pub fn portc(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL8::Portc)
    }
    ///Port D group selected for external interrupt 8
    #[inline(always)]
    pub fn portd(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL8::Portd)
    }
    ///Port F group selected for external interrupt 8
    #[inline(always)]
    pub fn portf(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL8::Portf)
    }
}
///External Interrupt 9 Port Select
///
///Value on reset: 0
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum EXTIPSEL9 {
    ///0: Port A group selected for external interrupt 9
    Porta = 0,
    ///1: Port B group selected for external interrupt 9
    Portb = 1,
    ///2: Port C group selected for external interrupt 9
    Portc = 2,
    ///3: Port D group selected for external interrupt 9
    Portd = 3,
    ///5: Port F group selected for external interrupt 9
    Portf = 5,
}
impl From<EXTIPSEL9> for u8 {
    #[inline(always)]
    fn from(variant: EXTIPSEL9) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for EXTIPSEL9 {
    type Ux = u8;
}
impl crate::IsEnum for EXTIPSEL9 {}
///Field `EXTIPSEL9` reader - External Interrupt 9 Port Select
pub type Extipsel9R = crate::FieldReader<EXTIPSEL9>;
impl Extipsel9R {
    ///Get enumerated values variant
    #[inline(always)]
    pub const fn variant(&self) -> Option<EXTIPSEL9> {
        match self.bits {
            0 => Some(EXTIPSEL9::Porta),
            1 => Some(EXTIPSEL9::Portb),
            2 => Some(EXTIPSEL9::Portc),
            3 => Some(EXTIPSEL9::Portd),
            5 => Some(EXTIPSEL9::Portf),
            _ => None,
        }
    }
    ///Port A group selected for external interrupt 9
    #[inline(always)]
    pub fn is_porta(&self) -> bool {
        *self == EXTIPSEL9::Porta
    }
    ///Port B group selected for external interrupt 9
    #[inline(always)]
    pub fn is_portb(&self) -> bool {
        *self == EXTIPSEL9::Portb
    }
    ///Port C group selected for external interrupt 9
    #[inline(always)]
    pub fn is_portc(&self) -> bool {
        *self == EXTIPSEL9::Portc
    }
    ///Port D group selected for external interrupt 9
    #[inline(always)]
    pub fn is_portd(&self) -> bool {
        *self == EXTIPSEL9::Portd
    }
    ///Port F group selected for external interrupt 9
    #[inline(always)]
    pub fn is_portf(&self) -> bool {
        *self == EXTIPSEL9::Portf
    }
}
///Field `EXTIPSEL9` writer - External Interrupt 9 Port Select
pub type Extipsel9W<'a, REG> = crate::FieldWriter<'a, REG, 4, EXTIPSEL9>;
impl<'a, REG> Extipsel9W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    ///Port A group selected for external interrupt 9
    #[inline(always)]
    pub fn porta(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL9::Porta)
    }
    ///Port B group selected for external interrupt 9
    #[inline(always)]
    pub fn portb(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL9::Portb)
    }
    ///Port C group selected for external interrupt 9
    #[inline(always)]
    pub fn portc(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL9::Portc)
    }
    ///Port D group selected for external interrupt 9
    #[inline(always)]
    pub fn portd(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL9::Portd)
    }
    ///Port F group selected for external interrupt 9
    #[inline(always)]
    pub fn portf(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL9::Portf)
    }
}
///External Interrupt 10 Port Select
///
///Value on reset: 0
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum EXTIPSEL10 {
    ///0: Port A group selected for external interrupt 10
    Porta = 0,
    ///1: Port B group selected for external interrupt 10
    Portb = 1,
    ///2: Port C group selected for external interrupt 10
    Portc = 2,
    ///3: Port D group selected for external interrupt 10
    Portd = 3,
    ///5: Port F group selected for external interrupt 10
    Portf = 5,
}
impl From<EXTIPSEL10> for u8 {
    #[inline(always)]
    fn from(variant: EXTIPSEL10) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for EXTIPSEL10 {
    type Ux = u8;
}
impl crate::IsEnum for EXTIPSEL10 {}
///Field `EXTIPSEL10` reader - External Interrupt 10 Port Select
pub type Extipsel10R = crate::FieldReader<EXTIPSEL10>;
impl Extipsel10R {
    ///Get enumerated values variant
    #[inline(always)]
    pub const fn variant(&self) -> Option<EXTIPSEL10> {
        match self.bits {
            0 => Some(EXTIPSEL10::Porta),
            1 => Some(EXTIPSEL10::Portb),
            2 => Some(EXTIPSEL10::Portc),
            3 => Some(EXTIPSEL10::Portd),
            5 => Some(EXTIPSEL10::Portf),
            _ => None,
        }
    }
    ///Port A group selected for external interrupt 10
    #[inline(always)]
    pub fn is_porta(&self) -> bool {
        *self == EXTIPSEL10::Porta
    }
    ///Port B group selected for external interrupt 10
    #[inline(always)]
    pub fn is_portb(&self) -> bool {
        *self == EXTIPSEL10::Portb
    }
    ///Port C group selected for external interrupt 10
    #[inline(always)]
    pub fn is_portc(&self) -> bool {
        *self == EXTIPSEL10::Portc
    }
    ///Port D group selected for external interrupt 10
    #[inline(always)]
    pub fn is_portd(&self) -> bool {
        *self == EXTIPSEL10::Portd
    }
    ///Port F group selected for external interrupt 10
    #[inline(always)]
    pub fn is_portf(&self) -> bool {
        *self == EXTIPSEL10::Portf
    }
}
///Field `EXTIPSEL10` writer - External Interrupt 10 Port Select
pub type Extipsel10W<'a, REG> = crate::FieldWriter<'a, REG, 4, EXTIPSEL10>;
impl<'a, REG> Extipsel10W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    ///Port A group selected for external interrupt 10
    #[inline(always)]
    pub fn porta(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL10::Porta)
    }
    ///Port B group selected for external interrupt 10
    #[inline(always)]
    pub fn portb(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL10::Portb)
    }
    ///Port C group selected for external interrupt 10
    #[inline(always)]
    pub fn portc(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL10::Portc)
    }
    ///Port D group selected for external interrupt 10
    #[inline(always)]
    pub fn portd(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL10::Portd)
    }
    ///Port F group selected for external interrupt 10
    #[inline(always)]
    pub fn portf(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL10::Portf)
    }
}
///External Interrupt 11 Port Select
///
///Value on reset: 0
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum EXTIPSEL11 {
    ///0: Port A group selected for external interrupt 11
    Porta = 0,
    ///1: Port B group selected for external interrupt 11
    Portb = 1,
    ///2: Port C group selected for external interrupt 11
    Portc = 2,
    ///3: Port D group selected for external interrupt 11
    Portd = 3,
    ///5: Port F group selected for external interrupt 11
    Portf = 5,
}
impl From<EXTIPSEL11> for u8 {
    #[inline(always)]
    fn from(variant: EXTIPSEL11) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for EXTIPSEL11 {
    type Ux = u8;
}
impl crate::IsEnum for EXTIPSEL11 {}
///Field `EXTIPSEL11` reader - External Interrupt 11 Port Select
pub type Extipsel11R = crate::FieldReader<EXTIPSEL11>;
impl Extipsel11R {
    ///Get enumerated values variant
    #[inline(always)]
    pub const fn variant(&self) -> Option<EXTIPSEL11> {
        match self.bits {
            0 => Some(EXTIPSEL11::Porta),
            1 => Some(EXTIPSEL11::Portb),
            2 => Some(EXTIPSEL11::Portc),
            3 => Some(EXTIPSEL11::Portd),
            5 => Some(EXTIPSEL11::Portf),
            _ => None,
        }
    }
    ///Port A group selected for external interrupt 11
    #[inline(always)]
    pub fn is_porta(&self) -> bool {
        *self == EXTIPSEL11::Porta
    }
    ///Port B group selected for external interrupt 11
    #[inline(always)]
    pub fn is_portb(&self) -> bool {
        *self == EXTIPSEL11::Portb
    }
    ///Port C group selected for external interrupt 11
    #[inline(always)]
    pub fn is_portc(&self) -> bool {
        *self == EXTIPSEL11::Portc
    }
    ///Port D group selected for external interrupt 11
    #[inline(always)]
    pub fn is_portd(&self) -> bool {
        *self == EXTIPSEL11::Portd
    }
    ///Port F group selected for external interrupt 11
    #[inline(always)]
    pub fn is_portf(&self) -> bool {
        *self == EXTIPSEL11::Portf
    }
}
///Field `EXTIPSEL11` writer - External Interrupt 11 Port Select
pub type Extipsel11W<'a, REG> = crate::FieldWriter<'a, REG, 4, EXTIPSEL11>;
impl<'a, REG> Extipsel11W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    ///Port A group selected for external interrupt 11
    #[inline(always)]
    pub fn porta(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL11::Porta)
    }
    ///Port B group selected for external interrupt 11
    #[inline(always)]
    pub fn portb(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL11::Portb)
    }
    ///Port C group selected for external interrupt 11
    #[inline(always)]
    pub fn portc(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL11::Portc)
    }
    ///Port D group selected for external interrupt 11
    #[inline(always)]
    pub fn portd(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL11::Portd)
    }
    ///Port F group selected for external interrupt 11
    #[inline(always)]
    pub fn portf(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL11::Portf)
    }
}
///External Interrupt 12 Port Select
///
///Value on reset: 0
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum EXTIPSEL12 {
    ///0: Port A group selected for external interrupt 12
    Porta = 0,
    ///1: Port B group selected for external interrupt 12
    Portb = 1,
    ///2: Port C group selected for external interrupt 12
    Portc = 2,
    ///3: Port D group selected for external interrupt 12
    Portd = 3,
    ///5: Port F group selected for external interrupt 12
    Portf = 5,
}
impl From<EXTIPSEL12> for u8 {
    #[inline(always)]
    fn from(variant: EXTIPSEL12) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for EXTIPSEL12 {
    type Ux = u8;
}
impl crate::IsEnum for EXTIPSEL12 {}
///Field `EXTIPSEL12` reader - External Interrupt 12 Port Select
pub type Extipsel12R = crate::FieldReader<EXTIPSEL12>;
impl Extipsel12R {
    ///Get enumerated values variant
    #[inline(always)]
    pub const fn variant(&self) -> Option<EXTIPSEL12> {
        match self.bits {
            0 => Some(EXTIPSEL12::Porta),
            1 => Some(EXTIPSEL12::Portb),
            2 => Some(EXTIPSEL12::Portc),
            3 => Some(EXTIPSEL12::Portd),
            5 => Some(EXTIPSEL12::Portf),
            _ => None,
        }
    }
    ///Port A group selected for external interrupt 12
    #[inline(always)]
    pub fn is_porta(&self) -> bool {
        *self == EXTIPSEL12::Porta
    }
    ///Port B group selected for external interrupt 12
    #[inline(always)]
    pub fn is_portb(&self) -> bool {
        *self == EXTIPSEL12::Portb
    }
    ///Port C group selected for external interrupt 12
    #[inline(always)]
    pub fn is_portc(&self) -> bool {
        *self == EXTIPSEL12::Portc
    }
    ///Port D group selected for external interrupt 12
    #[inline(always)]
    pub fn is_portd(&self) -> bool {
        *self == EXTIPSEL12::Portd
    }
    ///Port F group selected for external interrupt 12
    #[inline(always)]
    pub fn is_portf(&self) -> bool {
        *self == EXTIPSEL12::Portf
    }
}
///Field `EXTIPSEL12` writer - External Interrupt 12 Port Select
pub type Extipsel12W<'a, REG> = crate::FieldWriter<'a, REG, 4, EXTIPSEL12>;
impl<'a, REG> Extipsel12W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    ///Port A group selected for external interrupt 12
    #[inline(always)]
    pub fn porta(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL12::Porta)
    }
    ///Port B group selected for external interrupt 12
    #[inline(always)]
    pub fn portb(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL12::Portb)
    }
    ///Port C group selected for external interrupt 12
    #[inline(always)]
    pub fn portc(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL12::Portc)
    }
    ///Port D group selected for external interrupt 12
    #[inline(always)]
    pub fn portd(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL12::Portd)
    }
    ///Port F group selected for external interrupt 12
    #[inline(always)]
    pub fn portf(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL12::Portf)
    }
}
///External Interrupt 13 Port Select
///
///Value on reset: 0
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum EXTIPSEL13 {
    ///0: Port A group selected for external interrupt 13
    Porta = 0,
    ///1: Port B group selected for external interrupt 13
    Portb = 1,
    ///2: Port C group selected for external interrupt 13
    Portc = 2,
    ///3: Port D group selected for external interrupt 13
    Portd = 3,
    ///5: Port F group selected for external interrupt 13
    Portf = 5,
}
impl From<EXTIPSEL13> for u8 {
    #[inline(always)]
    fn from(variant: EXTIPSEL13) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for EXTIPSEL13 {
    type Ux = u8;
}
impl crate::IsEnum for EXTIPSEL13 {}
///Field `EXTIPSEL13` reader - External Interrupt 13 Port Select
pub type Extipsel13R = crate::FieldReader<EXTIPSEL13>;
impl Extipsel13R {
    ///Get enumerated values variant
    #[inline(always)]
    pub const fn variant(&self) -> Option<EXTIPSEL13> {
        match self.bits {
            0 => Some(EXTIPSEL13::Porta),
            1 => Some(EXTIPSEL13::Portb),
            2 => Some(EXTIPSEL13::Portc),
            3 => Some(EXTIPSEL13::Portd),
            5 => Some(EXTIPSEL13::Portf),
            _ => None,
        }
    }
    ///Port A group selected for external interrupt 13
    #[inline(always)]
    pub fn is_porta(&self) -> bool {
        *self == EXTIPSEL13::Porta
    }
    ///Port B group selected for external interrupt 13
    #[inline(always)]
    pub fn is_portb(&self) -> bool {
        *self == EXTIPSEL13::Portb
    }
    ///Port C group selected for external interrupt 13
    #[inline(always)]
    pub fn is_portc(&self) -> bool {
        *self == EXTIPSEL13::Portc
    }
    ///Port D group selected for external interrupt 13
    #[inline(always)]
    pub fn is_portd(&self) -> bool {
        *self == EXTIPSEL13::Portd
    }
    ///Port F group selected for external interrupt 13
    #[inline(always)]
    pub fn is_portf(&self) -> bool {
        *self == EXTIPSEL13::Portf
    }
}
///Field `EXTIPSEL13` writer - External Interrupt 13 Port Select
pub type Extipsel13W<'a, REG> = crate::FieldWriter<'a, REG, 4, EXTIPSEL13>;
impl<'a, REG> Extipsel13W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    ///Port A group selected for external interrupt 13
    #[inline(always)]
    pub fn porta(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL13::Porta)
    }
    ///Port B group selected for external interrupt 13
    #[inline(always)]
    pub fn portb(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL13::Portb)
    }
    ///Port C group selected for external interrupt 13
    #[inline(always)]
    pub fn portc(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL13::Portc)
    }
    ///Port D group selected for external interrupt 13
    #[inline(always)]
    pub fn portd(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL13::Portd)
    }
    ///Port F group selected for external interrupt 13
    #[inline(always)]
    pub fn portf(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL13::Portf)
    }
}
///External Interrupt 14 Port Select
///
///Value on reset: 0
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum EXTIPSEL14 {
    ///0: Port A group selected for external interrupt 14
    Porta = 0,
    ///1: Port B group selected for external interrupt 14
    Portb = 1,
    ///2: Port C group selected for external interrupt 14
    Portc = 2,
    ///3: Port D group selected for external interrupt 14
    Portd = 3,
    ///5: Port F group selected for external interrupt 14
    Portf = 5,
}
impl From<EXTIPSEL14> for u8 {
    #[inline(always)]
    fn from(variant: EXTIPSEL14) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for EXTIPSEL14 {
    type Ux = u8;
}
impl crate::IsEnum for EXTIPSEL14 {}
///Field `EXTIPSEL14` reader - External Interrupt 14 Port Select
pub type Extipsel14R = crate::FieldReader<EXTIPSEL14>;
impl Extipsel14R {
    ///Get enumerated values variant
    #[inline(always)]
    pub const fn variant(&self) -> Option<EXTIPSEL14> {
        match self.bits {
            0 => Some(EXTIPSEL14::Porta),
            1 => Some(EXTIPSEL14::Portb),
            2 => Some(EXTIPSEL14::Portc),
            3 => Some(EXTIPSEL14::Portd),
            5 => Some(EXTIPSEL14::Portf),
            _ => None,
        }
    }
    ///Port A group selected for external interrupt 14
    #[inline(always)]
    pub fn is_porta(&self) -> bool {
        *self == EXTIPSEL14::Porta
    }
    ///Port B group selected for external interrupt 14
    #[inline(always)]
    pub fn is_portb(&self) -> bool {
        *self == EXTIPSEL14::Portb
    }
    ///Port C group selected for external interrupt 14
    #[inline(always)]
    pub fn is_portc(&self) -> bool {
        *self == EXTIPSEL14::Portc
    }
    ///Port D group selected for external interrupt 14
    #[inline(always)]
    pub fn is_portd(&self) -> bool {
        *self == EXTIPSEL14::Portd
    }
    ///Port F group selected for external interrupt 14
    #[inline(always)]
    pub fn is_portf(&self) -> bool {
        *self == EXTIPSEL14::Portf
    }
}
///Field `EXTIPSEL14` writer - External Interrupt 14 Port Select
pub type Extipsel14W<'a, REG> = crate::FieldWriter<'a, REG, 4, EXTIPSEL14>;
impl<'a, REG> Extipsel14W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    ///Port A group selected for external interrupt 14
    #[inline(always)]
    pub fn porta(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL14::Porta)
    }
    ///Port B group selected for external interrupt 14
    #[inline(always)]
    pub fn portb(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL14::Portb)
    }
    ///Port C group selected for external interrupt 14
    #[inline(always)]
    pub fn portc(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL14::Portc)
    }
    ///Port D group selected for external interrupt 14
    #[inline(always)]
    pub fn portd(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL14::Portd)
    }
    ///Port F group selected for external interrupt 14
    #[inline(always)]
    pub fn portf(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL14::Portf)
    }
}
///External Interrupt 15 Port Select
///
///Value on reset: 0
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum EXTIPSEL15 {
    ///0: Port A group selected for external interrupt 15
    Porta = 0,
    ///1: Port B group selected for external interrupt 15
    Portb = 1,
    ///2: Port C group selected for external interrupt 15
    Portc = 2,
    ///3: Port D group selected for external interrupt 15
    Portd = 3,
    ///5: Port F group selected for external interrupt 15
    Portf = 5,
}
impl From<EXTIPSEL15> for u8 {
    #[inline(always)]
    fn from(variant: EXTIPSEL15) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for EXTIPSEL15 {
    type Ux = u8;
}
impl crate::IsEnum for EXTIPSEL15 {}
///Field `EXTIPSEL15` reader - External Interrupt 15 Port Select
pub type Extipsel15R = crate::FieldReader<EXTIPSEL15>;
impl Extipsel15R {
    ///Get enumerated values variant
    #[inline(always)]
    pub const fn variant(&self) -> Option<EXTIPSEL15> {
        match self.bits {
            0 => Some(EXTIPSEL15::Porta),
            1 => Some(EXTIPSEL15::Portb),
            2 => Some(EXTIPSEL15::Portc),
            3 => Some(EXTIPSEL15::Portd),
            5 => Some(EXTIPSEL15::Portf),
            _ => None,
        }
    }
    ///Port A group selected for external interrupt 15
    #[inline(always)]
    pub fn is_porta(&self) -> bool {
        *self == EXTIPSEL15::Porta
    }
    ///Port B group selected for external interrupt 15
    #[inline(always)]
    pub fn is_portb(&self) -> bool {
        *self == EXTIPSEL15::Portb
    }
    ///Port C group selected for external interrupt 15
    #[inline(always)]
    pub fn is_portc(&self) -> bool {
        *self == EXTIPSEL15::Portc
    }
    ///Port D group selected for external interrupt 15
    #[inline(always)]
    pub fn is_portd(&self) -> bool {
        *self == EXTIPSEL15::Portd
    }
    ///Port F group selected for external interrupt 15
    #[inline(always)]
    pub fn is_portf(&self) -> bool {
        *self == EXTIPSEL15::Portf
    }
}
///Field `EXTIPSEL15` writer - External Interrupt 15 Port Select
pub type Extipsel15W<'a, REG> = crate::FieldWriter<'a, REG, 4, EXTIPSEL15>;
impl<'a, REG> Extipsel15W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    ///Port A group selected for external interrupt 15
    #[inline(always)]
    pub fn porta(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL15::Porta)
    }
    ///Port B group selected for external interrupt 15
    #[inline(always)]
    pub fn portb(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL15::Portb)
    }
    ///Port C group selected for external interrupt 15
    #[inline(always)]
    pub fn portc(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL15::Portc)
    }
    ///Port D group selected for external interrupt 15
    #[inline(always)]
    pub fn portd(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL15::Portd)
    }
    ///Port F group selected for external interrupt 15
    #[inline(always)]
    pub fn portf(self) -> &'a mut crate::W<REG> {
        self.variant(EXTIPSEL15::Portf)
    }
}
impl R {
    ///Bits 0:3 - External Interrupt 8 Port Select
    #[inline(always)]
    pub fn extipsel8(&self) -> Extipsel8R {
        Extipsel8R::new((self.bits & 0x0f) as u8)
    }
    ///Bits 4:7 - External Interrupt 9 Port Select
    #[inline(always)]
    pub fn extipsel9(&self) -> Extipsel9R {
        Extipsel9R::new(((self.bits >> 4) & 0x0f) as u8)
    }
    ///Bits 8:11 - External Interrupt 10 Port Select
    #[inline(always)]
    pub fn extipsel10(&self) -> Extipsel10R {
        Extipsel10R::new(((self.bits >> 8) & 0x0f) as u8)
    }
    ///Bits 12:15 - External Interrupt 11 Port Select
    #[inline(always)]
    pub fn extipsel11(&self) -> Extipsel11R {
        Extipsel11R::new(((self.bits >> 12) & 0x0f) as u8)
    }
    ///Bits 16:19 - External Interrupt 12 Port Select
    #[inline(always)]
    pub fn extipsel12(&self) -> Extipsel12R {
        Extipsel12R::new(((self.bits >> 16) & 0x0f) as u8)
    }
    ///Bits 20:23 - External Interrupt 13 Port Select
    #[inline(always)]
    pub fn extipsel13(&self) -> Extipsel13R {
        Extipsel13R::new(((self.bits >> 20) & 0x0f) as u8)
    }
    ///Bits 24:27 - External Interrupt 14 Port Select
    #[inline(always)]
    pub fn extipsel14(&self) -> Extipsel14R {
        Extipsel14R::new(((self.bits >> 24) & 0x0f) as u8)
    }
    ///Bits 28:31 - External Interrupt 15 Port Select
    #[inline(always)]
    pub fn extipsel15(&self) -> Extipsel15R {
        Extipsel15R::new(((self.bits >> 28) & 0x0f) as u8)
    }
}
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("EXTIPSELH")
            .field("extipsel8", &self.extipsel8())
            .field("extipsel9", &self.extipsel9())
            .field("extipsel10", &self.extipsel10())
            .field("extipsel11", &self.extipsel11())
            .field("extipsel12", &self.extipsel12())
            .field("extipsel13", &self.extipsel13())
            .field("extipsel14", &self.extipsel14())
            .field("extipsel15", &self.extipsel15())
            .finish()
    }
}
impl W {
    ///Bits 0:3 - External Interrupt 8 Port Select
    #[inline(always)]
    pub fn extipsel8(&mut self) -> Extipsel8W<'_, EXTIPSELHrs> {
        Extipsel8W::new(self, 0)
    }
    ///Bits 4:7 - External Interrupt 9 Port Select
    #[inline(always)]
    pub fn extipsel9(&mut self) -> Extipsel9W<'_, EXTIPSELHrs> {
        Extipsel9W::new(self, 4)
    }
    ///Bits 8:11 - External Interrupt 10 Port Select
    #[inline(always)]
    pub fn extipsel10(&mut self) -> Extipsel10W<'_, EXTIPSELHrs> {
        Extipsel10W::new(self, 8)
    }
    ///Bits 12:15 - External Interrupt 11 Port Select
    #[inline(always)]
    pub fn extipsel11(&mut self) -> Extipsel11W<'_, EXTIPSELHrs> {
        Extipsel11W::new(self, 12)
    }
    ///Bits 16:19 - External Interrupt 12 Port Select
    #[inline(always)]
    pub fn extipsel12(&mut self) -> Extipsel12W<'_, EXTIPSELHrs> {
        Extipsel12W::new(self, 16)
    }
    ///Bits 20:23 - External Interrupt 13 Port Select
    #[inline(always)]
    pub fn extipsel13(&mut self) -> Extipsel13W<'_, EXTIPSELHrs> {
        Extipsel13W::new(self, 20)
    }
    ///Bits 24:27 - External Interrupt 14 Port Select
    #[inline(always)]
    pub fn extipsel14(&mut self) -> Extipsel14W<'_, EXTIPSELHrs> {
        Extipsel14W::new(self, 24)
    }
    ///Bits 28:31 - External Interrupt 15 Port Select
    #[inline(always)]
    pub fn extipsel15(&mut self) -> Extipsel15W<'_, EXTIPSELHrs> {
        Extipsel15W::new(self, 28)
    }
}
///External Interrupt Port Select High Register
///
///You can [`read`](crate::Reg::read) this register and get [`extipselh::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`extipselh::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
pub struct EXTIPSELHrs;
impl crate::RegisterSpec for EXTIPSELHrs {
    type Ux = u32;
}
///`read()` method returns [`extipselh::R`](R) reader structure
impl crate::Readable for EXTIPSELHrs {}
///`write(|w| ..)` method takes [`extipselh::W`](W) writer structure
impl crate::Writable for EXTIPSELHrs {
    type Safety = crate::Unsafe;
}
///`reset()` method sets EXTIPSELH to value 0
impl crate::Resettable for EXTIPSELHrs {}