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
#[doc = "Register `EXISEL` reader"]
pub type R = crate::R<ExiselSpec>;
#[doc = "Register `EXISEL` writer"]
pub type W = crate::W<ExiselSpec>;
#[doc = "Event Source Select for A0 (ERS0)\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Exs0a {
    #[doc = "0: Input ERU_0A0 is selected"]
    Value1 = 0,
    #[doc = "1: Input ERU_0A1 is selected"]
    Value2 = 1,
    #[doc = "2: Input ERU_0A2 is selected"]
    Value3 = 2,
    #[doc = "3: Input ERU_0A3 is selected"]
    Value4 = 3,
}
impl From<Exs0a> for u8 {
    #[inline(always)]
    fn from(variant: Exs0a) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Exs0a {
    type Ux = u8;
}
#[doc = "Field `EXS0A` reader - Event Source Select for A0 (ERS0)"]
pub type Exs0aR = crate::FieldReader<Exs0a>;
impl Exs0aR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Exs0a {
        match self.bits {
            0 => Exs0a::Value1,
            1 => Exs0a::Value2,
            2 => Exs0a::Value3,
            3 => Exs0a::Value4,
            _ => unreachable!(),
        }
    }
    #[doc = "Input ERU_0A0 is selected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Exs0a::Value1
    }
    #[doc = "Input ERU_0A1 is selected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Exs0a::Value2
    }
    #[doc = "Input ERU_0A2 is selected"]
    #[inline(always)]
    pub fn is_value3(&self) -> bool {
        *self == Exs0a::Value3
    }
    #[doc = "Input ERU_0A3 is selected"]
    #[inline(always)]
    pub fn is_value4(&self) -> bool {
        *self == Exs0a::Value4
    }
}
#[doc = "Field `EXS0A` writer - Event Source Select for A0 (ERS0)"]
pub type Exs0aW<'a, REG> = crate::FieldWriterSafe<'a, REG, 2, Exs0a>;
impl<'a, REG> Exs0aW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Input ERU_0A0 is selected"]
    #[inline(always)]
    pub fn value1(self) -> &'a mut crate::W<REG> {
        self.variant(Exs0a::Value1)
    }
    #[doc = "Input ERU_0A1 is selected"]
    #[inline(always)]
    pub fn value2(self) -> &'a mut crate::W<REG> {
        self.variant(Exs0a::Value2)
    }
    #[doc = "Input ERU_0A2 is selected"]
    #[inline(always)]
    pub fn value3(self) -> &'a mut crate::W<REG> {
        self.variant(Exs0a::Value3)
    }
    #[doc = "Input ERU_0A3 is selected"]
    #[inline(always)]
    pub fn value4(self) -> &'a mut crate::W<REG> {
        self.variant(Exs0a::Value4)
    }
}
#[doc = "Event Source Select for B0 (ERS0)\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Exs0b {
    #[doc = "0: Input ERU_0B0 is selected"]
    Value1 = 0,
    #[doc = "1: Input ERU_0B1 is selected"]
    Value2 = 1,
    #[doc = "2: Input ERU_0B2 is selected"]
    Value3 = 2,
    #[doc = "3: Input ERU_0B3 is selected"]
    Value4 = 3,
}
impl From<Exs0b> for u8 {
    #[inline(always)]
    fn from(variant: Exs0b) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Exs0b {
    type Ux = u8;
}
#[doc = "Field `EXS0B` reader - Event Source Select for B0 (ERS0)"]
pub type Exs0bR = crate::FieldReader<Exs0b>;
impl Exs0bR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Exs0b {
        match self.bits {
            0 => Exs0b::Value1,
            1 => Exs0b::Value2,
            2 => Exs0b::Value3,
            3 => Exs0b::Value4,
            _ => unreachable!(),
        }
    }
    #[doc = "Input ERU_0B0 is selected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Exs0b::Value1
    }
    #[doc = "Input ERU_0B1 is selected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Exs0b::Value2
    }
    #[doc = "Input ERU_0B2 is selected"]
    #[inline(always)]
    pub fn is_value3(&self) -> bool {
        *self == Exs0b::Value3
    }
    #[doc = "Input ERU_0B3 is selected"]
    #[inline(always)]
    pub fn is_value4(&self) -> bool {
        *self == Exs0b::Value4
    }
}
#[doc = "Field `EXS0B` writer - Event Source Select for B0 (ERS0)"]
pub type Exs0bW<'a, REG> = crate::FieldWriterSafe<'a, REG, 2, Exs0b>;
impl<'a, REG> Exs0bW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Input ERU_0B0 is selected"]
    #[inline(always)]
    pub fn value1(self) -> &'a mut crate::W<REG> {
        self.variant(Exs0b::Value1)
    }
    #[doc = "Input ERU_0B1 is selected"]
    #[inline(always)]
    pub fn value2(self) -> &'a mut crate::W<REG> {
        self.variant(Exs0b::Value2)
    }
    #[doc = "Input ERU_0B2 is selected"]
    #[inline(always)]
    pub fn value3(self) -> &'a mut crate::W<REG> {
        self.variant(Exs0b::Value3)
    }
    #[doc = "Input ERU_0B3 is selected"]
    #[inline(always)]
    pub fn value4(self) -> &'a mut crate::W<REG> {
        self.variant(Exs0b::Value4)
    }
}
#[doc = "Event Source Select for A1 (ERS1)\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Exs1a {
    #[doc = "0: Input ERU_1A0 is selected"]
    Value1 = 0,
    #[doc = "1: Input ERU_1A1 is selected"]
    Value2 = 1,
    #[doc = "2: Input ERU_1A2 is selected"]
    Value3 = 2,
    #[doc = "3: Input ERU_1A3 is selected"]
    Value4 = 3,
}
impl From<Exs1a> for u8 {
    #[inline(always)]
    fn from(variant: Exs1a) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Exs1a {
    type Ux = u8;
}
#[doc = "Field `EXS1A` reader - Event Source Select for A1 (ERS1)"]
pub type Exs1aR = crate::FieldReader<Exs1a>;
impl Exs1aR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Exs1a {
        match self.bits {
            0 => Exs1a::Value1,
            1 => Exs1a::Value2,
            2 => Exs1a::Value3,
            3 => Exs1a::Value4,
            _ => unreachable!(),
        }
    }
    #[doc = "Input ERU_1A0 is selected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Exs1a::Value1
    }
    #[doc = "Input ERU_1A1 is selected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Exs1a::Value2
    }
    #[doc = "Input ERU_1A2 is selected"]
    #[inline(always)]
    pub fn is_value3(&self) -> bool {
        *self == Exs1a::Value3
    }
    #[doc = "Input ERU_1A3 is selected"]
    #[inline(always)]
    pub fn is_value4(&self) -> bool {
        *self == Exs1a::Value4
    }
}
#[doc = "Field `EXS1A` writer - Event Source Select for A1 (ERS1)"]
pub type Exs1aW<'a, REG> = crate::FieldWriterSafe<'a, REG, 2, Exs1a>;
impl<'a, REG> Exs1aW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Input ERU_1A0 is selected"]
    #[inline(always)]
    pub fn value1(self) -> &'a mut crate::W<REG> {
        self.variant(Exs1a::Value1)
    }
    #[doc = "Input ERU_1A1 is selected"]
    #[inline(always)]
    pub fn value2(self) -> &'a mut crate::W<REG> {
        self.variant(Exs1a::Value2)
    }
    #[doc = "Input ERU_1A2 is selected"]
    #[inline(always)]
    pub fn value3(self) -> &'a mut crate::W<REG> {
        self.variant(Exs1a::Value3)
    }
    #[doc = "Input ERU_1A3 is selected"]
    #[inline(always)]
    pub fn value4(self) -> &'a mut crate::W<REG> {
        self.variant(Exs1a::Value4)
    }
}
#[doc = "Event Source Select for B1 (ERS1)\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Exs1b {
    #[doc = "0: Input ERU_1B0 is selected"]
    Value1 = 0,
    #[doc = "1: Input ERU_1B1 is selected"]
    Value2 = 1,
    #[doc = "2: Input ERU_1B2 is selected"]
    Value3 = 2,
    #[doc = "3: Input ERU_1B3 is selected"]
    Value4 = 3,
}
impl From<Exs1b> for u8 {
    #[inline(always)]
    fn from(variant: Exs1b) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Exs1b {
    type Ux = u8;
}
#[doc = "Field `EXS1B` reader - Event Source Select for B1 (ERS1)"]
pub type Exs1bR = crate::FieldReader<Exs1b>;
impl Exs1bR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Exs1b {
        match self.bits {
            0 => Exs1b::Value1,
            1 => Exs1b::Value2,
            2 => Exs1b::Value3,
            3 => Exs1b::Value4,
            _ => unreachable!(),
        }
    }
    #[doc = "Input ERU_1B0 is selected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Exs1b::Value1
    }
    #[doc = "Input ERU_1B1 is selected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Exs1b::Value2
    }
    #[doc = "Input ERU_1B2 is selected"]
    #[inline(always)]
    pub fn is_value3(&self) -> bool {
        *self == Exs1b::Value3
    }
    #[doc = "Input ERU_1B3 is selected"]
    #[inline(always)]
    pub fn is_value4(&self) -> bool {
        *self == Exs1b::Value4
    }
}
#[doc = "Field `EXS1B` writer - Event Source Select for B1 (ERS1)"]
pub type Exs1bW<'a, REG> = crate::FieldWriterSafe<'a, REG, 2, Exs1b>;
impl<'a, REG> Exs1bW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Input ERU_1B0 is selected"]
    #[inline(always)]
    pub fn value1(self) -> &'a mut crate::W<REG> {
        self.variant(Exs1b::Value1)
    }
    #[doc = "Input ERU_1B1 is selected"]
    #[inline(always)]
    pub fn value2(self) -> &'a mut crate::W<REG> {
        self.variant(Exs1b::Value2)
    }
    #[doc = "Input ERU_1B2 is selected"]
    #[inline(always)]
    pub fn value3(self) -> &'a mut crate::W<REG> {
        self.variant(Exs1b::Value3)
    }
    #[doc = "Input ERU_1B3 is selected"]
    #[inline(always)]
    pub fn value4(self) -> &'a mut crate::W<REG> {
        self.variant(Exs1b::Value4)
    }
}
#[doc = "Event Source Select for A2 (ERS2)\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Exs2a {
    #[doc = "0: Input ERU_2A0 is selected"]
    Value1 = 0,
    #[doc = "1: Input ERU_2A1 is selected"]
    Value2 = 1,
    #[doc = "2: Input ERU_2A2 is selected"]
    Value3 = 2,
    #[doc = "3: Input ERU_2A3 is selected"]
    Value4 = 3,
}
impl From<Exs2a> for u8 {
    #[inline(always)]
    fn from(variant: Exs2a) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Exs2a {
    type Ux = u8;
}
#[doc = "Field `EXS2A` reader - Event Source Select for A2 (ERS2)"]
pub type Exs2aR = crate::FieldReader<Exs2a>;
impl Exs2aR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Exs2a {
        match self.bits {
            0 => Exs2a::Value1,
            1 => Exs2a::Value2,
            2 => Exs2a::Value3,
            3 => Exs2a::Value4,
            _ => unreachable!(),
        }
    }
    #[doc = "Input ERU_2A0 is selected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Exs2a::Value1
    }
    #[doc = "Input ERU_2A1 is selected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Exs2a::Value2
    }
    #[doc = "Input ERU_2A2 is selected"]
    #[inline(always)]
    pub fn is_value3(&self) -> bool {
        *self == Exs2a::Value3
    }
    #[doc = "Input ERU_2A3 is selected"]
    #[inline(always)]
    pub fn is_value4(&self) -> bool {
        *self == Exs2a::Value4
    }
}
#[doc = "Field `EXS2A` writer - Event Source Select for A2 (ERS2)"]
pub type Exs2aW<'a, REG> = crate::FieldWriterSafe<'a, REG, 2, Exs2a>;
impl<'a, REG> Exs2aW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Input ERU_2A0 is selected"]
    #[inline(always)]
    pub fn value1(self) -> &'a mut crate::W<REG> {
        self.variant(Exs2a::Value1)
    }
    #[doc = "Input ERU_2A1 is selected"]
    #[inline(always)]
    pub fn value2(self) -> &'a mut crate::W<REG> {
        self.variant(Exs2a::Value2)
    }
    #[doc = "Input ERU_2A2 is selected"]
    #[inline(always)]
    pub fn value3(self) -> &'a mut crate::W<REG> {
        self.variant(Exs2a::Value3)
    }
    #[doc = "Input ERU_2A3 is selected"]
    #[inline(always)]
    pub fn value4(self) -> &'a mut crate::W<REG> {
        self.variant(Exs2a::Value4)
    }
}
#[doc = "Event Source Select for B2 (ERS2)\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Exs2b {
    #[doc = "0: Input ERU_2B0 is selected"]
    Value1 = 0,
    #[doc = "1: Input ERU_2B1 is selected"]
    Value2 = 1,
    #[doc = "2: Input ERU_2B2 is selected"]
    Value3 = 2,
    #[doc = "3: Input ERU_2B3 is selected"]
    Value4 = 3,
}
impl From<Exs2b> for u8 {
    #[inline(always)]
    fn from(variant: Exs2b) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Exs2b {
    type Ux = u8;
}
#[doc = "Field `EXS2B` reader - Event Source Select for B2 (ERS2)"]
pub type Exs2bR = crate::FieldReader<Exs2b>;
impl Exs2bR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Exs2b {
        match self.bits {
            0 => Exs2b::Value1,
            1 => Exs2b::Value2,
            2 => Exs2b::Value3,
            3 => Exs2b::Value4,
            _ => unreachable!(),
        }
    }
    #[doc = "Input ERU_2B0 is selected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Exs2b::Value1
    }
    #[doc = "Input ERU_2B1 is selected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Exs2b::Value2
    }
    #[doc = "Input ERU_2B2 is selected"]
    #[inline(always)]
    pub fn is_value3(&self) -> bool {
        *self == Exs2b::Value3
    }
    #[doc = "Input ERU_2B3 is selected"]
    #[inline(always)]
    pub fn is_value4(&self) -> bool {
        *self == Exs2b::Value4
    }
}
#[doc = "Field `EXS2B` writer - Event Source Select for B2 (ERS2)"]
pub type Exs2bW<'a, REG> = crate::FieldWriterSafe<'a, REG, 2, Exs2b>;
impl<'a, REG> Exs2bW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Input ERU_2B0 is selected"]
    #[inline(always)]
    pub fn value1(self) -> &'a mut crate::W<REG> {
        self.variant(Exs2b::Value1)
    }
    #[doc = "Input ERU_2B1 is selected"]
    #[inline(always)]
    pub fn value2(self) -> &'a mut crate::W<REG> {
        self.variant(Exs2b::Value2)
    }
    #[doc = "Input ERU_2B2 is selected"]
    #[inline(always)]
    pub fn value3(self) -> &'a mut crate::W<REG> {
        self.variant(Exs2b::Value3)
    }
    #[doc = "Input ERU_2B3 is selected"]
    #[inline(always)]
    pub fn value4(self) -> &'a mut crate::W<REG> {
        self.variant(Exs2b::Value4)
    }
}
#[doc = "Event Source Select for A3 (ERS3)\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Exs3a {
    #[doc = "0: Input ERU_3A0 is selected"]
    Value1 = 0,
    #[doc = "1: Input ERU_3A1 is selected"]
    Value2 = 1,
    #[doc = "2: Input ERU_3A2 is selected"]
    Value3 = 2,
    #[doc = "3: Input ERU_3A3 is selected"]
    Value4 = 3,
}
impl From<Exs3a> for u8 {
    #[inline(always)]
    fn from(variant: Exs3a) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Exs3a {
    type Ux = u8;
}
#[doc = "Field `EXS3A` reader - Event Source Select for A3 (ERS3)"]
pub type Exs3aR = crate::FieldReader<Exs3a>;
impl Exs3aR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Exs3a {
        match self.bits {
            0 => Exs3a::Value1,
            1 => Exs3a::Value2,
            2 => Exs3a::Value3,
            3 => Exs3a::Value4,
            _ => unreachable!(),
        }
    }
    #[doc = "Input ERU_3A0 is selected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Exs3a::Value1
    }
    #[doc = "Input ERU_3A1 is selected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Exs3a::Value2
    }
    #[doc = "Input ERU_3A2 is selected"]
    #[inline(always)]
    pub fn is_value3(&self) -> bool {
        *self == Exs3a::Value3
    }
    #[doc = "Input ERU_3A3 is selected"]
    #[inline(always)]
    pub fn is_value4(&self) -> bool {
        *self == Exs3a::Value4
    }
}
#[doc = "Field `EXS3A` writer - Event Source Select for A3 (ERS3)"]
pub type Exs3aW<'a, REG> = crate::FieldWriterSafe<'a, REG, 2, Exs3a>;
impl<'a, REG> Exs3aW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Input ERU_3A0 is selected"]
    #[inline(always)]
    pub fn value1(self) -> &'a mut crate::W<REG> {
        self.variant(Exs3a::Value1)
    }
    #[doc = "Input ERU_3A1 is selected"]
    #[inline(always)]
    pub fn value2(self) -> &'a mut crate::W<REG> {
        self.variant(Exs3a::Value2)
    }
    #[doc = "Input ERU_3A2 is selected"]
    #[inline(always)]
    pub fn value3(self) -> &'a mut crate::W<REG> {
        self.variant(Exs3a::Value3)
    }
    #[doc = "Input ERU_3A3 is selected"]
    #[inline(always)]
    pub fn value4(self) -> &'a mut crate::W<REG> {
        self.variant(Exs3a::Value4)
    }
}
#[doc = "Event Source Select for B3 (ERS3)\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Exs3b {
    #[doc = "0: Input ERU_3B0 is selected"]
    Value1 = 0,
    #[doc = "1: Input ERU_3B1 is selected"]
    Value2 = 1,
    #[doc = "2: Input ERU_3B2 is selected"]
    Value3 = 2,
    #[doc = "3: Input ERU_3B3 is selected"]
    Value4 = 3,
}
impl From<Exs3b> for u8 {
    #[inline(always)]
    fn from(variant: Exs3b) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Exs3b {
    type Ux = u8;
}
#[doc = "Field `EXS3B` reader - Event Source Select for B3 (ERS3)"]
pub type Exs3bR = crate::FieldReader<Exs3b>;
impl Exs3bR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Exs3b {
        match self.bits {
            0 => Exs3b::Value1,
            1 => Exs3b::Value2,
            2 => Exs3b::Value3,
            3 => Exs3b::Value4,
            _ => unreachable!(),
        }
    }
    #[doc = "Input ERU_3B0 is selected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Exs3b::Value1
    }
    #[doc = "Input ERU_3B1 is selected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Exs3b::Value2
    }
    #[doc = "Input ERU_3B2 is selected"]
    #[inline(always)]
    pub fn is_value3(&self) -> bool {
        *self == Exs3b::Value3
    }
    #[doc = "Input ERU_3B3 is selected"]
    #[inline(always)]
    pub fn is_value4(&self) -> bool {
        *self == Exs3b::Value4
    }
}
#[doc = "Field `EXS3B` writer - Event Source Select for B3 (ERS3)"]
pub type Exs3bW<'a, REG> = crate::FieldWriterSafe<'a, REG, 2, Exs3b>;
impl<'a, REG> Exs3bW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Input ERU_3B0 is selected"]
    #[inline(always)]
    pub fn value1(self) -> &'a mut crate::W<REG> {
        self.variant(Exs3b::Value1)
    }
    #[doc = "Input ERU_3B1 is selected"]
    #[inline(always)]
    pub fn value2(self) -> &'a mut crate::W<REG> {
        self.variant(Exs3b::Value2)
    }
    #[doc = "Input ERU_3B2 is selected"]
    #[inline(always)]
    pub fn value3(self) -> &'a mut crate::W<REG> {
        self.variant(Exs3b::Value3)
    }
    #[doc = "Input ERU_3B3 is selected"]
    #[inline(always)]
    pub fn value4(self) -> &'a mut crate::W<REG> {
        self.variant(Exs3b::Value4)
    }
}
impl R {
    #[doc = "Bits 0:1 - Event Source Select for A0 (ERS0)"]
    #[inline(always)]
    pub fn exs0a(&self) -> Exs0aR {
        Exs0aR::new((self.bits & 3) as u8)
    }
    #[doc = "Bits 2:3 - Event Source Select for B0 (ERS0)"]
    #[inline(always)]
    pub fn exs0b(&self) -> Exs0bR {
        Exs0bR::new(((self.bits >> 2) & 3) as u8)
    }
    #[doc = "Bits 4:5 - Event Source Select for A1 (ERS1)"]
    #[inline(always)]
    pub fn exs1a(&self) -> Exs1aR {
        Exs1aR::new(((self.bits >> 4) & 3) as u8)
    }
    #[doc = "Bits 6:7 - Event Source Select for B1 (ERS1)"]
    #[inline(always)]
    pub fn exs1b(&self) -> Exs1bR {
        Exs1bR::new(((self.bits >> 6) & 3) as u8)
    }
    #[doc = "Bits 8:9 - Event Source Select for A2 (ERS2)"]
    #[inline(always)]
    pub fn exs2a(&self) -> Exs2aR {
        Exs2aR::new(((self.bits >> 8) & 3) as u8)
    }
    #[doc = "Bits 10:11 - Event Source Select for B2 (ERS2)"]
    #[inline(always)]
    pub fn exs2b(&self) -> Exs2bR {
        Exs2bR::new(((self.bits >> 10) & 3) as u8)
    }
    #[doc = "Bits 12:13 - Event Source Select for A3 (ERS3)"]
    #[inline(always)]
    pub fn exs3a(&self) -> Exs3aR {
        Exs3aR::new(((self.bits >> 12) & 3) as u8)
    }
    #[doc = "Bits 14:15 - Event Source Select for B3 (ERS3)"]
    #[inline(always)]
    pub fn exs3b(&self) -> Exs3bR {
        Exs3bR::new(((self.bits >> 14) & 3) as u8)
    }
}
impl W {
    #[doc = "Bits 0:1 - Event Source Select for A0 (ERS0)"]
    #[inline(always)]
    #[must_use]
    pub fn exs0a(&mut self) -> Exs0aW<ExiselSpec> {
        Exs0aW::new(self, 0)
    }
    #[doc = "Bits 2:3 - Event Source Select for B0 (ERS0)"]
    #[inline(always)]
    #[must_use]
    pub fn exs0b(&mut self) -> Exs0bW<ExiselSpec> {
        Exs0bW::new(self, 2)
    }
    #[doc = "Bits 4:5 - Event Source Select for A1 (ERS1)"]
    #[inline(always)]
    #[must_use]
    pub fn exs1a(&mut self) -> Exs1aW<ExiselSpec> {
        Exs1aW::new(self, 4)
    }
    #[doc = "Bits 6:7 - Event Source Select for B1 (ERS1)"]
    #[inline(always)]
    #[must_use]
    pub fn exs1b(&mut self) -> Exs1bW<ExiselSpec> {
        Exs1bW::new(self, 6)
    }
    #[doc = "Bits 8:9 - Event Source Select for A2 (ERS2)"]
    #[inline(always)]
    #[must_use]
    pub fn exs2a(&mut self) -> Exs2aW<ExiselSpec> {
        Exs2aW::new(self, 8)
    }
    #[doc = "Bits 10:11 - Event Source Select for B2 (ERS2)"]
    #[inline(always)]
    #[must_use]
    pub fn exs2b(&mut self) -> Exs2bW<ExiselSpec> {
        Exs2bW::new(self, 10)
    }
    #[doc = "Bits 12:13 - Event Source Select for A3 (ERS3)"]
    #[inline(always)]
    #[must_use]
    pub fn exs3a(&mut self) -> Exs3aW<ExiselSpec> {
        Exs3aW::new(self, 12)
    }
    #[doc = "Bits 14:15 - Event Source Select for B3 (ERS3)"]
    #[inline(always)]
    #[must_use]
    pub fn exs3b(&mut self) -> Exs3bW<ExiselSpec> {
        Exs3bW::new(self, 14)
    }
}
#[doc = "Event Input Select\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`exisel::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`exisel::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct ExiselSpec;
impl crate::RegisterSpec for ExiselSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`exisel::R`](R) reader structure"]
impl crate::Readable for ExiselSpec {}
#[doc = "`write(|w| ..)` method takes [`exisel::W`](W) writer structure"]
impl crate::Writable for ExiselSpec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets EXISEL to value 0"]
impl crate::Resettable for ExiselSpec {
    const RESET_VALUE: u32 = 0;
}