mcxa-pac 0.3.0

Peripheral Access Crate for MCXA256 devices
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
#[doc = "Register `EMR` reader"]
pub type R = crate::R<EmrSpec>;
#[doc = "Register `EMR` writer"]
pub type W = crate::W<EmrSpec>;
#[doc = "External Match 0\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Em0 {
    #[doc = "0: Low"]
    Clear = 0,
    #[doc = "1: High"]
    Set = 1,
}
impl From<Em0> for bool {
    #[inline(always)]
    fn from(variant: Em0) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `EM0` reader - External Match 0"]
pub type Em0R = crate::BitReader<Em0>;
impl Em0R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Em0 {
        match self.bits {
            false => Em0::Clear,
            true => Em0::Set,
        }
    }
    #[doc = "Low"]
    #[inline(always)]
    pub fn is_clear(&self) -> bool {
        *self == Em0::Clear
    }
    #[doc = "High"]
    #[inline(always)]
    pub fn is_set(&self) -> bool {
        *self == Em0::Set
    }
}
#[doc = "Field `EM0` writer - External Match 0"]
pub type Em0W<'a, REG> = crate::BitWriter<'a, REG, Em0>;
impl<'a, REG> Em0W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Low"]
    #[inline(always)]
    pub fn clear(self) -> &'a mut crate::W<REG> {
        self.variant(Em0::Clear)
    }
    #[doc = "High"]
    #[inline(always)]
    pub fn set_(self) -> &'a mut crate::W<REG> {
        self.variant(Em0::Set)
    }
}
#[doc = "External Match 1\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Em1 {
    #[doc = "0: Low"]
    Clear = 0,
    #[doc = "1: High"]
    Set = 1,
}
impl From<Em1> for bool {
    #[inline(always)]
    fn from(variant: Em1) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `EM1` reader - External Match 1"]
pub type Em1R = crate::BitReader<Em1>;
impl Em1R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Em1 {
        match self.bits {
            false => Em1::Clear,
            true => Em1::Set,
        }
    }
    #[doc = "Low"]
    #[inline(always)]
    pub fn is_clear(&self) -> bool {
        *self == Em1::Clear
    }
    #[doc = "High"]
    #[inline(always)]
    pub fn is_set(&self) -> bool {
        *self == Em1::Set
    }
}
#[doc = "Field `EM1` writer - External Match 1"]
pub type Em1W<'a, REG> = crate::BitWriter<'a, REG, Em1>;
impl<'a, REG> Em1W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Low"]
    #[inline(always)]
    pub fn clear(self) -> &'a mut crate::W<REG> {
        self.variant(Em1::Clear)
    }
    #[doc = "High"]
    #[inline(always)]
    pub fn set_(self) -> &'a mut crate::W<REG> {
        self.variant(Em1::Set)
    }
}
#[doc = "External Match 2\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Em2 {
    #[doc = "0: Low"]
    Clear = 0,
    #[doc = "1: High"]
    Set = 1,
}
impl From<Em2> for bool {
    #[inline(always)]
    fn from(variant: Em2) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `EM2` reader - External Match 2"]
pub type Em2R = crate::BitReader<Em2>;
impl Em2R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Em2 {
        match self.bits {
            false => Em2::Clear,
            true => Em2::Set,
        }
    }
    #[doc = "Low"]
    #[inline(always)]
    pub fn is_clear(&self) -> bool {
        *self == Em2::Clear
    }
    #[doc = "High"]
    #[inline(always)]
    pub fn is_set(&self) -> bool {
        *self == Em2::Set
    }
}
#[doc = "Field `EM2` writer - External Match 2"]
pub type Em2W<'a, REG> = crate::BitWriter<'a, REG, Em2>;
impl<'a, REG> Em2W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Low"]
    #[inline(always)]
    pub fn clear(self) -> &'a mut crate::W<REG> {
        self.variant(Em2::Clear)
    }
    #[doc = "High"]
    #[inline(always)]
    pub fn set_(self) -> &'a mut crate::W<REG> {
        self.variant(Em2::Set)
    }
}
#[doc = "External Match 3\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Em3 {
    #[doc = "0: Low"]
    Clear = 0,
    #[doc = "1: High"]
    Set = 1,
}
impl From<Em3> for bool {
    #[inline(always)]
    fn from(variant: Em3) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `EM3` reader - External Match 3"]
pub type Em3R = crate::BitReader<Em3>;
impl Em3R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Em3 {
        match self.bits {
            false => Em3::Clear,
            true => Em3::Set,
        }
    }
    #[doc = "Low"]
    #[inline(always)]
    pub fn is_clear(&self) -> bool {
        *self == Em3::Clear
    }
    #[doc = "High"]
    #[inline(always)]
    pub fn is_set(&self) -> bool {
        *self == Em3::Set
    }
}
#[doc = "Field `EM3` writer - External Match 3"]
pub type Em3W<'a, REG> = crate::BitWriter<'a, REG, Em3>;
impl<'a, REG> Em3W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Low"]
    #[inline(always)]
    pub fn clear(self) -> &'a mut crate::W<REG> {
        self.variant(Em3::Clear)
    }
    #[doc = "High"]
    #[inline(always)]
    pub fn set_(self) -> &'a mut crate::W<REG> {
        self.variant(Em3::Set)
    }
}
#[doc = "External Match Control 0\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Emc0 {
    #[doc = "0: Does nothing"]
    DoNothing = 0,
    #[doc = "1: Goes low"]
    Clear = 1,
    #[doc = "2: Goes high"]
    Set = 2,
    #[doc = "3: Toggles"]
    Toggle = 3,
}
impl From<Emc0> for u8 {
    #[inline(always)]
    fn from(variant: Emc0) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Emc0 {
    type Ux = u8;
}
impl crate::IsEnum for Emc0 {}
#[doc = "Field `EMC0` reader - External Match Control 0"]
pub type Emc0R = crate::FieldReader<Emc0>;
impl Emc0R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Emc0 {
        match self.bits {
            0 => Emc0::DoNothing,
            1 => Emc0::Clear,
            2 => Emc0::Set,
            3 => Emc0::Toggle,
            _ => unreachable!(),
        }
    }
    #[doc = "Does nothing"]
    #[inline(always)]
    pub fn is_do_nothing(&self) -> bool {
        *self == Emc0::DoNothing
    }
    #[doc = "Goes low"]
    #[inline(always)]
    pub fn is_clear(&self) -> bool {
        *self == Emc0::Clear
    }
    #[doc = "Goes high"]
    #[inline(always)]
    pub fn is_set(&self) -> bool {
        *self == Emc0::Set
    }
    #[doc = "Toggles"]
    #[inline(always)]
    pub fn is_toggle(&self) -> bool {
        *self == Emc0::Toggle
    }
}
#[doc = "Field `EMC0` writer - External Match Control 0"]
pub type Emc0W<'a, REG> = crate::FieldWriter<'a, REG, 2, Emc0, crate::Safe>;
impl<'a, REG> Emc0W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Does nothing"]
    #[inline(always)]
    pub fn do_nothing(self) -> &'a mut crate::W<REG> {
        self.variant(Emc0::DoNothing)
    }
    #[doc = "Goes low"]
    #[inline(always)]
    pub fn clear(self) -> &'a mut crate::W<REG> {
        self.variant(Emc0::Clear)
    }
    #[doc = "Goes high"]
    #[inline(always)]
    pub fn set_(self) -> &'a mut crate::W<REG> {
        self.variant(Emc0::Set)
    }
    #[doc = "Toggles"]
    #[inline(always)]
    pub fn toggle(self) -> &'a mut crate::W<REG> {
        self.variant(Emc0::Toggle)
    }
}
#[doc = "External Match Control 1\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Emc1 {
    #[doc = "0: Does nothing"]
    DoNothing = 0,
    #[doc = "1: Goes low"]
    Clear = 1,
    #[doc = "2: Goes high"]
    Set = 2,
    #[doc = "3: Toggles"]
    Toggle = 3,
}
impl From<Emc1> for u8 {
    #[inline(always)]
    fn from(variant: Emc1) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Emc1 {
    type Ux = u8;
}
impl crate::IsEnum for Emc1 {}
#[doc = "Field `EMC1` reader - External Match Control 1"]
pub type Emc1R = crate::FieldReader<Emc1>;
impl Emc1R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Emc1 {
        match self.bits {
            0 => Emc1::DoNothing,
            1 => Emc1::Clear,
            2 => Emc1::Set,
            3 => Emc1::Toggle,
            _ => unreachable!(),
        }
    }
    #[doc = "Does nothing"]
    #[inline(always)]
    pub fn is_do_nothing(&self) -> bool {
        *self == Emc1::DoNothing
    }
    #[doc = "Goes low"]
    #[inline(always)]
    pub fn is_clear(&self) -> bool {
        *self == Emc1::Clear
    }
    #[doc = "Goes high"]
    #[inline(always)]
    pub fn is_set(&self) -> bool {
        *self == Emc1::Set
    }
    #[doc = "Toggles"]
    #[inline(always)]
    pub fn is_toggle(&self) -> bool {
        *self == Emc1::Toggle
    }
}
#[doc = "Field `EMC1` writer - External Match Control 1"]
pub type Emc1W<'a, REG> = crate::FieldWriter<'a, REG, 2, Emc1, crate::Safe>;
impl<'a, REG> Emc1W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Does nothing"]
    #[inline(always)]
    pub fn do_nothing(self) -> &'a mut crate::W<REG> {
        self.variant(Emc1::DoNothing)
    }
    #[doc = "Goes low"]
    #[inline(always)]
    pub fn clear(self) -> &'a mut crate::W<REG> {
        self.variant(Emc1::Clear)
    }
    #[doc = "Goes high"]
    #[inline(always)]
    pub fn set_(self) -> &'a mut crate::W<REG> {
        self.variant(Emc1::Set)
    }
    #[doc = "Toggles"]
    #[inline(always)]
    pub fn toggle(self) -> &'a mut crate::W<REG> {
        self.variant(Emc1::Toggle)
    }
}
#[doc = "External Match Control 2\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Emc2 {
    #[doc = "0: Does nothing"]
    DoNothing = 0,
    #[doc = "1: Goes low"]
    Clear = 1,
    #[doc = "2: Goes high"]
    Set = 2,
    #[doc = "3: Toggles"]
    Toggle = 3,
}
impl From<Emc2> for u8 {
    #[inline(always)]
    fn from(variant: Emc2) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Emc2 {
    type Ux = u8;
}
impl crate::IsEnum for Emc2 {}
#[doc = "Field `EMC2` reader - External Match Control 2"]
pub type Emc2R = crate::FieldReader<Emc2>;
impl Emc2R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Emc2 {
        match self.bits {
            0 => Emc2::DoNothing,
            1 => Emc2::Clear,
            2 => Emc2::Set,
            3 => Emc2::Toggle,
            _ => unreachable!(),
        }
    }
    #[doc = "Does nothing"]
    #[inline(always)]
    pub fn is_do_nothing(&self) -> bool {
        *self == Emc2::DoNothing
    }
    #[doc = "Goes low"]
    #[inline(always)]
    pub fn is_clear(&self) -> bool {
        *self == Emc2::Clear
    }
    #[doc = "Goes high"]
    #[inline(always)]
    pub fn is_set(&self) -> bool {
        *self == Emc2::Set
    }
    #[doc = "Toggles"]
    #[inline(always)]
    pub fn is_toggle(&self) -> bool {
        *self == Emc2::Toggle
    }
}
#[doc = "Field `EMC2` writer - External Match Control 2"]
pub type Emc2W<'a, REG> = crate::FieldWriter<'a, REG, 2, Emc2, crate::Safe>;
impl<'a, REG> Emc2W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Does nothing"]
    #[inline(always)]
    pub fn do_nothing(self) -> &'a mut crate::W<REG> {
        self.variant(Emc2::DoNothing)
    }
    #[doc = "Goes low"]
    #[inline(always)]
    pub fn clear(self) -> &'a mut crate::W<REG> {
        self.variant(Emc2::Clear)
    }
    #[doc = "Goes high"]
    #[inline(always)]
    pub fn set_(self) -> &'a mut crate::W<REG> {
        self.variant(Emc2::Set)
    }
    #[doc = "Toggles"]
    #[inline(always)]
    pub fn toggle(self) -> &'a mut crate::W<REG> {
        self.variant(Emc2::Toggle)
    }
}
#[doc = "External Match Control 3\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Emc3 {
    #[doc = "0: Does nothing"]
    DoNothing = 0,
    #[doc = "1: Goes low"]
    Clear = 1,
    #[doc = "2: Goes high"]
    Set = 2,
    #[doc = "3: Toggles"]
    Toggle = 3,
}
impl From<Emc3> for u8 {
    #[inline(always)]
    fn from(variant: Emc3) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Emc3 {
    type Ux = u8;
}
impl crate::IsEnum for Emc3 {}
#[doc = "Field `EMC3` reader - External Match Control 3"]
pub type Emc3R = crate::FieldReader<Emc3>;
impl Emc3R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Emc3 {
        match self.bits {
            0 => Emc3::DoNothing,
            1 => Emc3::Clear,
            2 => Emc3::Set,
            3 => Emc3::Toggle,
            _ => unreachable!(),
        }
    }
    #[doc = "Does nothing"]
    #[inline(always)]
    pub fn is_do_nothing(&self) -> bool {
        *self == Emc3::DoNothing
    }
    #[doc = "Goes low"]
    #[inline(always)]
    pub fn is_clear(&self) -> bool {
        *self == Emc3::Clear
    }
    #[doc = "Goes high"]
    #[inline(always)]
    pub fn is_set(&self) -> bool {
        *self == Emc3::Set
    }
    #[doc = "Toggles"]
    #[inline(always)]
    pub fn is_toggle(&self) -> bool {
        *self == Emc3::Toggle
    }
}
#[doc = "Field `EMC3` writer - External Match Control 3"]
pub type Emc3W<'a, REG> = crate::FieldWriter<'a, REG, 2, Emc3, crate::Safe>;
impl<'a, REG> Emc3W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Does nothing"]
    #[inline(always)]
    pub fn do_nothing(self) -> &'a mut crate::W<REG> {
        self.variant(Emc3::DoNothing)
    }
    #[doc = "Goes low"]
    #[inline(always)]
    pub fn clear(self) -> &'a mut crate::W<REG> {
        self.variant(Emc3::Clear)
    }
    #[doc = "Goes high"]
    #[inline(always)]
    pub fn set_(self) -> &'a mut crate::W<REG> {
        self.variant(Emc3::Set)
    }
    #[doc = "Toggles"]
    #[inline(always)]
    pub fn toggle(self) -> &'a mut crate::W<REG> {
        self.variant(Emc3::Toggle)
    }
}
impl R {
    #[doc = "Bit 0 - External Match 0"]
    #[inline(always)]
    pub fn em0(&self) -> Em0R {
        Em0R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - External Match 1"]
    #[inline(always)]
    pub fn em1(&self) -> Em1R {
        Em1R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - External Match 2"]
    #[inline(always)]
    pub fn em2(&self) -> Em2R {
        Em2R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - External Match 3"]
    #[inline(always)]
    pub fn em3(&self) -> Em3R {
        Em3R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bits 4:5 - External Match Control 0"]
    #[inline(always)]
    pub fn emc0(&self) -> Emc0R {
        Emc0R::new(((self.bits >> 4) & 3) as u8)
    }
    #[doc = "Bits 6:7 - External Match Control 1"]
    #[inline(always)]
    pub fn emc1(&self) -> Emc1R {
        Emc1R::new(((self.bits >> 6) & 3) as u8)
    }
    #[doc = "Bits 8:9 - External Match Control 2"]
    #[inline(always)]
    pub fn emc2(&self) -> Emc2R {
        Emc2R::new(((self.bits >> 8) & 3) as u8)
    }
    #[doc = "Bits 10:11 - External Match Control 3"]
    #[inline(always)]
    pub fn emc3(&self) -> Emc3R {
        Emc3R::new(((self.bits >> 10) & 3) as u8)
    }
}
#[cfg(feature = "debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("EMR")
            .field("em0", &self.em0())
            .field("em1", &self.em1())
            .field("em2", &self.em2())
            .field("em3", &self.em3())
            .field("emc0", &self.emc0())
            .field("emc1", &self.emc1())
            .field("emc2", &self.emc2())
            .field("emc3", &self.emc3())
            .finish()
    }
}
impl W {
    #[doc = "Bit 0 - External Match 0"]
    #[inline(always)]
    pub fn em0(&mut self) -> Em0W<'_, EmrSpec> {
        Em0W::new(self, 0)
    }
    #[doc = "Bit 1 - External Match 1"]
    #[inline(always)]
    pub fn em1(&mut self) -> Em1W<'_, EmrSpec> {
        Em1W::new(self, 1)
    }
    #[doc = "Bit 2 - External Match 2"]
    #[inline(always)]
    pub fn em2(&mut self) -> Em2W<'_, EmrSpec> {
        Em2W::new(self, 2)
    }
    #[doc = "Bit 3 - External Match 3"]
    #[inline(always)]
    pub fn em3(&mut self) -> Em3W<'_, EmrSpec> {
        Em3W::new(self, 3)
    }
    #[doc = "Bits 4:5 - External Match Control 0"]
    #[inline(always)]
    pub fn emc0(&mut self) -> Emc0W<'_, EmrSpec> {
        Emc0W::new(self, 4)
    }
    #[doc = "Bits 6:7 - External Match Control 1"]
    #[inline(always)]
    pub fn emc1(&mut self) -> Emc1W<'_, EmrSpec> {
        Emc1W::new(self, 6)
    }
    #[doc = "Bits 8:9 - External Match Control 2"]
    #[inline(always)]
    pub fn emc2(&mut self) -> Emc2W<'_, EmrSpec> {
        Emc2W::new(self, 8)
    }
    #[doc = "Bits 10:11 - External Match Control 3"]
    #[inline(always)]
    pub fn emc3(&mut self) -> Emc3W<'_, EmrSpec> {
        Emc3W::new(self, 10)
    }
}
#[doc = "External Match\n\nYou can [`read`](crate::Reg::read) this register and get [`emr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`emr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct EmrSpec;
impl crate::RegisterSpec for EmrSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`emr::R`](R) reader structure"]
impl crate::Readable for EmrSpec {}
#[doc = "`write(|w| ..)` method takes [`emr::W`](W) writer structure"]
impl crate::Writable for EmrSpec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets EMR to value 0"]
impl crate::Resettable for EmrSpec {}