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
681
682
683
684
685
686
687
688
689
690
691
692
693
694
#[doc = "Register `PGFR[%s]` reader"]
pub type R = crate::R<PgfrSpec>;
#[doc = "Register `PGFR[%s]` writer"]
pub type W = crate::W<PgfrSpec>;
#[doc = "Field `GFW` reader - Glitch Filter Width"]
pub type GfwR = crate::FieldReader;
#[doc = "Field `GFW` writer - Glitch Filter Width"]
pub type GfwW<'a, REG> = crate::FieldWriter<'a, REG, 6>;
#[doc = "Glitch Filter Prescaler\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Gfp {
    #[doc = "0: 512 Hz prescaler clock"]
    Freq512Hz = 0,
    #[doc = "1: 32.768 kHz clock"]
    Freq32Khz = 1,
}
impl From<Gfp> for bool {
    #[inline(always)]
    fn from(variant: Gfp) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `GFP` reader - Glitch Filter Prescaler"]
pub type GfpR = crate::BitReader<Gfp>;
impl GfpR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Gfp {
        match self.bits {
            false => Gfp::Freq512Hz,
            true => Gfp::Freq32Khz,
        }
    }
    #[doc = "512 Hz prescaler clock"]
    #[inline(always)]
    pub fn is_freq_512_hz(&self) -> bool {
        *self == Gfp::Freq512Hz
    }
    #[doc = "32.768 kHz clock"]
    #[inline(always)]
    pub fn is_freq_32_khz(&self) -> bool {
        *self == Gfp::Freq32Khz
    }
}
#[doc = "Field `GFP` writer - Glitch Filter Prescaler"]
pub type GfpW<'a, REG> = crate::BitWriter<'a, REG, Gfp>;
impl<'a, REG> GfpW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "512 Hz prescaler clock"]
    #[inline(always)]
    pub fn freq_512_hz(self) -> &'a mut crate::W<REG> {
        self.variant(Gfp::Freq512Hz)
    }
    #[doc = "32.768 kHz clock"]
    #[inline(always)]
    pub fn freq_32_khz(self) -> &'a mut crate::W<REG> {
        self.variant(Gfp::Freq32Khz)
    }
}
#[doc = "Glitch Filter Enable\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Gfe {
    #[doc = "0: Bypasses"]
    Bypass = 0,
    #[doc = "1: Enables"]
    Enable = 1,
}
impl From<Gfe> for bool {
    #[inline(always)]
    fn from(variant: Gfe) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `GFE` reader - Glitch Filter Enable"]
pub type GfeR = crate::BitReader<Gfe>;
impl GfeR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Gfe {
        match self.bits {
            false => Gfe::Bypass,
            true => Gfe::Enable,
        }
    }
    #[doc = "Bypasses"]
    #[inline(always)]
    pub fn is_bypass(&self) -> bool {
        *self == Gfe::Bypass
    }
    #[doc = "Enables"]
    #[inline(always)]
    pub fn is_enable(&self) -> bool {
        *self == Gfe::Enable
    }
}
#[doc = "Field `GFE` writer - Glitch Filter Enable"]
pub type GfeW<'a, REG> = crate::BitWriter<'a, REG, Gfe>;
impl<'a, REG> GfeW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Bypasses"]
    #[inline(always)]
    pub fn bypass(self) -> &'a mut crate::W<REG> {
        self.variant(Gfe::Bypass)
    }
    #[doc = "Enables"]
    #[inline(always)]
    pub fn enable(self) -> &'a mut crate::W<REG> {
        self.variant(Gfe::Enable)
    }
}
#[doc = "Tamper Pin Sample Width\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Tpsw {
    #[doc = "0: Continuous monitoring, pin sampling disabled"]
    Disable = 0,
    #[doc = "1: 2 cycles for pull enable and 1 cycle for input buffer enable"]
    Cycles2 = 1,
    #[doc = "2: 4 cycles for pull enable and 2 cycles for input buffer enable"]
    Cycles4 = 2,
    #[doc = "3: 8 cycles for pull enable and 4 cycles for input buffer enable"]
    Cycles8 = 3,
}
impl From<Tpsw> for u8 {
    #[inline(always)]
    fn from(variant: Tpsw) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Tpsw {
    type Ux = u8;
}
impl crate::IsEnum for Tpsw {}
#[doc = "Field `TPSW` reader - Tamper Pin Sample Width"]
pub type TpswR = crate::FieldReader<Tpsw>;
impl TpswR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tpsw {
        match self.bits {
            0 => Tpsw::Disable,
            1 => Tpsw::Cycles2,
            2 => Tpsw::Cycles4,
            3 => Tpsw::Cycles8,
            _ => unreachable!(),
        }
    }
    #[doc = "Continuous monitoring, pin sampling disabled"]
    #[inline(always)]
    pub fn is_disable(&self) -> bool {
        *self == Tpsw::Disable
    }
    #[doc = "2 cycles for pull enable and 1 cycle for input buffer enable"]
    #[inline(always)]
    pub fn is_cycles_2(&self) -> bool {
        *self == Tpsw::Cycles2
    }
    #[doc = "4 cycles for pull enable and 2 cycles for input buffer enable"]
    #[inline(always)]
    pub fn is_cycles_4(&self) -> bool {
        *self == Tpsw::Cycles4
    }
    #[doc = "8 cycles for pull enable and 4 cycles for input buffer enable"]
    #[inline(always)]
    pub fn is_cycles_8(&self) -> bool {
        *self == Tpsw::Cycles8
    }
}
#[doc = "Field `TPSW` writer - Tamper Pin Sample Width"]
pub type TpswW<'a, REG> = crate::FieldWriter<'a, REG, 2, Tpsw, crate::Safe>;
impl<'a, REG> TpswW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Continuous monitoring, pin sampling disabled"]
    #[inline(always)]
    pub fn disable(self) -> &'a mut crate::W<REG> {
        self.variant(Tpsw::Disable)
    }
    #[doc = "2 cycles for pull enable and 1 cycle for input buffer enable"]
    #[inline(always)]
    pub fn cycles_2(self) -> &'a mut crate::W<REG> {
        self.variant(Tpsw::Cycles2)
    }
    #[doc = "4 cycles for pull enable and 2 cycles for input buffer enable"]
    #[inline(always)]
    pub fn cycles_4(self) -> &'a mut crate::W<REG> {
        self.variant(Tpsw::Cycles4)
    }
    #[doc = "8 cycles for pull enable and 4 cycles for input buffer enable"]
    #[inline(always)]
    pub fn cycles_8(self) -> &'a mut crate::W<REG> {
        self.variant(Tpsw::Cycles8)
    }
}
#[doc = "Tamper Pin Sample Frequency\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Tpsf {
    #[doc = "0: Every 8 cycles"]
    Cycles8 = 0,
    #[doc = "1: Every 32 cycles"]
    Cycles32 = 1,
    #[doc = "2: Every 128 cycles"]
    Cycles128 = 2,
    #[doc = "3: Every 512 cycles"]
    Cycles512 = 3,
}
impl From<Tpsf> for u8 {
    #[inline(always)]
    fn from(variant: Tpsf) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Tpsf {
    type Ux = u8;
}
impl crate::IsEnum for Tpsf {}
#[doc = "Field `TPSF` reader - Tamper Pin Sample Frequency"]
pub type TpsfR = crate::FieldReader<Tpsf>;
impl TpsfR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tpsf {
        match self.bits {
            0 => Tpsf::Cycles8,
            1 => Tpsf::Cycles32,
            2 => Tpsf::Cycles128,
            3 => Tpsf::Cycles512,
            _ => unreachable!(),
        }
    }
    #[doc = "Every 8 cycles"]
    #[inline(always)]
    pub fn is_cycles_8(&self) -> bool {
        *self == Tpsf::Cycles8
    }
    #[doc = "Every 32 cycles"]
    #[inline(always)]
    pub fn is_cycles_32(&self) -> bool {
        *self == Tpsf::Cycles32
    }
    #[doc = "Every 128 cycles"]
    #[inline(always)]
    pub fn is_cycles_128(&self) -> bool {
        *self == Tpsf::Cycles128
    }
    #[doc = "Every 512 cycles"]
    #[inline(always)]
    pub fn is_cycles_512(&self) -> bool {
        *self == Tpsf::Cycles512
    }
}
#[doc = "Field `TPSF` writer - Tamper Pin Sample Frequency"]
pub type TpsfW<'a, REG> = crate::FieldWriter<'a, REG, 2, Tpsf, crate::Safe>;
impl<'a, REG> TpsfW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Every 8 cycles"]
    #[inline(always)]
    pub fn cycles_8(self) -> &'a mut crate::W<REG> {
        self.variant(Tpsf::Cycles8)
    }
    #[doc = "Every 32 cycles"]
    #[inline(always)]
    pub fn cycles_32(self) -> &'a mut crate::W<REG> {
        self.variant(Tpsf::Cycles32)
    }
    #[doc = "Every 128 cycles"]
    #[inline(always)]
    pub fn cycles_128(self) -> &'a mut crate::W<REG> {
        self.variant(Tpsf::Cycles128)
    }
    #[doc = "Every 512 cycles"]
    #[inline(always)]
    pub fn cycles_512(self) -> &'a mut crate::W<REG> {
        self.variant(Tpsf::Cycles512)
    }
}
#[doc = "Tamper Pull Enable\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tpe {
    #[doc = "0: Disables"]
    Disable = 0,
    #[doc = "1: Enables"]
    Enable = 1,
}
impl From<Tpe> for bool {
    #[inline(always)]
    fn from(variant: Tpe) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TPE` reader - Tamper Pull Enable"]
pub type TpeR = crate::BitReader<Tpe>;
impl TpeR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tpe {
        match self.bits {
            false => Tpe::Disable,
            true => Tpe::Enable,
        }
    }
    #[doc = "Disables"]
    #[inline(always)]
    pub fn is_disable(&self) -> bool {
        *self == Tpe::Disable
    }
    #[doc = "Enables"]
    #[inline(always)]
    pub fn is_enable(&self) -> bool {
        *self == Tpe::Enable
    }
}
#[doc = "Field `TPE` writer - Tamper Pull Enable"]
pub type TpeW<'a, REG> = crate::BitWriter<'a, REG, Tpe>;
impl<'a, REG> TpeW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Disables"]
    #[inline(always)]
    pub fn disable(self) -> &'a mut crate::W<REG> {
        self.variant(Tpe::Disable)
    }
    #[doc = "Enables"]
    #[inline(always)]
    pub fn enable(self) -> &'a mut crate::W<REG> {
        self.variant(Tpe::Enable)
    }
}
#[doc = "Tamper Pull Select\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tps {
    #[doc = "0: Asserts"]
    Assert = 0,
    #[doc = "1: Negates"]
    Negate = 1,
}
impl From<Tps> for bool {
    #[inline(always)]
    fn from(variant: Tps) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TPS` reader - Tamper Pull Select"]
pub type TpsR = crate::BitReader<Tps>;
impl TpsR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tps {
        match self.bits {
            false => Tps::Assert,
            true => Tps::Negate,
        }
    }
    #[doc = "Asserts"]
    #[inline(always)]
    pub fn is_assert(&self) -> bool {
        *self == Tps::Assert
    }
    #[doc = "Negates"]
    #[inline(always)]
    pub fn is_negate(&self) -> bool {
        *self == Tps::Negate
    }
}
#[doc = "Field `TPS` writer - Tamper Pull Select"]
pub type TpsW<'a, REG> = crate::BitWriter<'a, REG, Tps>;
impl<'a, REG> TpsW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Asserts"]
    #[inline(always)]
    pub fn assert(self) -> &'a mut crate::W<REG> {
        self.variant(Tps::Assert)
    }
    #[doc = "Negates"]
    #[inline(always)]
    pub fn negate(self) -> &'a mut crate::W<REG> {
        self.variant(Tps::Negate)
    }
}
#[doc = "Tamper Pull Value\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tpv {
    #[doc = "0: Low"]
    Low = 0,
    #[doc = "1: High"]
    High = 1,
}
impl From<Tpv> for bool {
    #[inline(always)]
    fn from(variant: Tpv) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TPV` reader - Tamper Pull Value"]
pub type TpvR = crate::BitReader<Tpv>;
impl TpvR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tpv {
        match self.bits {
            false => Tpv::Low,
            true => Tpv::High,
        }
    }
    #[doc = "Low"]
    #[inline(always)]
    pub fn is_low(&self) -> bool {
        *self == Tpv::Low
    }
    #[doc = "High"]
    #[inline(always)]
    pub fn is_high(&self) -> bool {
        *self == Tpv::High
    }
}
#[doc = "Field `TPV` writer - Tamper Pull Value"]
pub type TpvW<'a, REG> = crate::BitWriter<'a, REG, Tpv>;
impl<'a, REG> TpvW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Low"]
    #[inline(always)]
    pub fn low(self) -> &'a mut crate::W<REG> {
        self.variant(Tpv::Low)
    }
    #[doc = "High"]
    #[inline(always)]
    pub fn high(self) -> &'a mut crate::W<REG> {
        self.variant(Tpv::High)
    }
}
#[doc = "Tamper Passive Filter\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tpf {
    #[doc = "0: Disables"]
    Disable = 0,
    #[doc = "1: Enables"]
    Enable = 1,
}
impl From<Tpf> for bool {
    #[inline(always)]
    fn from(variant: Tpf) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TPF` reader - Tamper Passive Filter"]
pub type TpfR = crate::BitReader<Tpf>;
impl TpfR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tpf {
        match self.bits {
            false => Tpf::Disable,
            true => Tpf::Enable,
        }
    }
    #[doc = "Disables"]
    #[inline(always)]
    pub fn is_disable(&self) -> bool {
        *self == Tpf::Disable
    }
    #[doc = "Enables"]
    #[inline(always)]
    pub fn is_enable(&self) -> bool {
        *self == Tpf::Enable
    }
}
#[doc = "Field `TPF` writer - Tamper Passive Filter"]
pub type TpfW<'a, REG> = crate::BitWriter<'a, REG, Tpf>;
impl<'a, REG> TpfW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Disables"]
    #[inline(always)]
    pub fn disable(self) -> &'a mut crate::W<REG> {
        self.variant(Tpf::Disable)
    }
    #[doc = "Enables"]
    #[inline(always)]
    pub fn enable(self) -> &'a mut crate::W<REG> {
        self.variant(Tpf::Enable)
    }
}
#[doc = "Input Buffer Enable\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Ibe {
    #[doc = "0: Disables"]
    Disable = 0,
    #[doc = "1: Enables"]
    Enable = 1,
}
impl From<Ibe> for bool {
    #[inline(always)]
    fn from(variant: Ibe) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `IBE` reader - Input Buffer Enable"]
pub type IbeR = crate::BitReader<Ibe>;
impl IbeR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Ibe {
        match self.bits {
            false => Ibe::Disable,
            true => Ibe::Enable,
        }
    }
    #[doc = "Disables"]
    #[inline(always)]
    pub fn is_disable(&self) -> bool {
        *self == Ibe::Disable
    }
    #[doc = "Enables"]
    #[inline(always)]
    pub fn is_enable(&self) -> bool {
        *self == Ibe::Enable
    }
}
#[doc = "Field `IBE` writer - Input Buffer Enable"]
pub type IbeW<'a, REG> = crate::BitWriter<'a, REG, Ibe>;
impl<'a, REG> IbeW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Disables"]
    #[inline(always)]
    pub fn disable(self) -> &'a mut crate::W<REG> {
        self.variant(Ibe::Disable)
    }
    #[doc = "Enables"]
    #[inline(always)]
    pub fn enable(self) -> &'a mut crate::W<REG> {
        self.variant(Ibe::Enable)
    }
}
impl R {
    #[doc = "Bits 0:5 - Glitch Filter Width"]
    #[inline(always)]
    pub fn gfw(&self) -> GfwR {
        GfwR::new((self.bits & 0x3f) as u8)
    }
    #[doc = "Bit 6 - Glitch Filter Prescaler"]
    #[inline(always)]
    pub fn gfp(&self) -> GfpR {
        GfpR::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - Glitch Filter Enable"]
    #[inline(always)]
    pub fn gfe(&self) -> GfeR {
        GfeR::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bits 8:9 - Tamper Pin Sample Width"]
    #[inline(always)]
    pub fn tpsw(&self) -> TpswR {
        TpswR::new(((self.bits >> 8) & 3) as u8)
    }
    #[doc = "Bits 10:11 - Tamper Pin Sample Frequency"]
    #[inline(always)]
    pub fn tpsf(&self) -> TpsfR {
        TpsfR::new(((self.bits >> 10) & 3) as u8)
    }
    #[doc = "Bit 24 - Tamper Pull Enable"]
    #[inline(always)]
    pub fn tpe(&self) -> TpeR {
        TpeR::new(((self.bits >> 24) & 1) != 0)
    }
    #[doc = "Bit 25 - Tamper Pull Select"]
    #[inline(always)]
    pub fn tps(&self) -> TpsR {
        TpsR::new(((self.bits >> 25) & 1) != 0)
    }
    #[doc = "Bit 26 - Tamper Pull Value"]
    #[inline(always)]
    pub fn tpv(&self) -> TpvR {
        TpvR::new(((self.bits >> 26) & 1) != 0)
    }
    #[doc = "Bit 27 - Tamper Passive Filter"]
    #[inline(always)]
    pub fn tpf(&self) -> TpfR {
        TpfR::new(((self.bits >> 27) & 1) != 0)
    }
    #[doc = "Bit 31 - Input Buffer Enable"]
    #[inline(always)]
    pub fn ibe(&self) -> IbeR {
        IbeR::new(((self.bits >> 31) & 1) != 0)
    }
}
#[cfg(feature = "debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("PGFR")
            .field("gfw", &self.gfw())
            .field("gfp", &self.gfp())
            .field("gfe", &self.gfe())
            .field("tpsw", &self.tpsw())
            .field("tpsf", &self.tpsf())
            .field("tpe", &self.tpe())
            .field("tps", &self.tps())
            .field("tpv", &self.tpv())
            .field("tpf", &self.tpf())
            .field("ibe", &self.ibe())
            .finish()
    }
}
impl W {
    #[doc = "Bits 0:5 - Glitch Filter Width"]
    #[inline(always)]
    pub fn gfw(&mut self) -> GfwW<'_, PgfrSpec> {
        GfwW::new(self, 0)
    }
    #[doc = "Bit 6 - Glitch Filter Prescaler"]
    #[inline(always)]
    pub fn gfp(&mut self) -> GfpW<'_, PgfrSpec> {
        GfpW::new(self, 6)
    }
    #[doc = "Bit 7 - Glitch Filter Enable"]
    #[inline(always)]
    pub fn gfe(&mut self) -> GfeW<'_, PgfrSpec> {
        GfeW::new(self, 7)
    }
    #[doc = "Bits 8:9 - Tamper Pin Sample Width"]
    #[inline(always)]
    pub fn tpsw(&mut self) -> TpswW<'_, PgfrSpec> {
        TpswW::new(self, 8)
    }
    #[doc = "Bits 10:11 - Tamper Pin Sample Frequency"]
    #[inline(always)]
    pub fn tpsf(&mut self) -> TpsfW<'_, PgfrSpec> {
        TpsfW::new(self, 10)
    }
    #[doc = "Bit 24 - Tamper Pull Enable"]
    #[inline(always)]
    pub fn tpe(&mut self) -> TpeW<'_, PgfrSpec> {
        TpeW::new(self, 24)
    }
    #[doc = "Bit 25 - Tamper Pull Select"]
    #[inline(always)]
    pub fn tps(&mut self) -> TpsW<'_, PgfrSpec> {
        TpsW::new(self, 25)
    }
    #[doc = "Bit 26 - Tamper Pull Value"]
    #[inline(always)]
    pub fn tpv(&mut self) -> TpvW<'_, PgfrSpec> {
        TpvW::new(self, 26)
    }
    #[doc = "Bit 27 - Tamper Passive Filter"]
    #[inline(always)]
    pub fn tpf(&mut self) -> TpfW<'_, PgfrSpec> {
        TpfW::new(self, 27)
    }
    #[doc = "Bit 31 - Input Buffer Enable"]
    #[inline(always)]
    pub fn ibe(&mut self) -> IbeW<'_, PgfrSpec> {
        IbeW::new(self, 31)
    }
}
#[doc = "Pin Glitch Filter\n\nYou can [`read`](crate::Reg::read) this register and get [`pgfr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pgfr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct PgfrSpec;
impl crate::RegisterSpec for PgfrSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`pgfr::R`](R) reader structure"]
impl crate::Readable for PgfrSpec {}
#[doc = "`write(|w| ..)` method takes [`pgfr::W`](W) writer structure"]
impl crate::Writable for PgfrSpec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets PGFR[%s] to value 0"]
impl crate::Resettable for PgfrSpec {}