mcxa-pac 0.1.1

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
#[doc = "Register `TIMCTL[%s]` reader"]
pub type R = crate::R<TimctlSpec>;
#[doc = "Register `TIMCTL[%s]` writer"]
pub type W = crate::W<TimctlSpec>;
#[doc = "Timer Mode\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Timod {
    #[doc = "0: Timer disabled"]
    Disable = 0,
    #[doc = "1: Dual 8-bit counters baud mode"]
    Dual8bitBaud = 1,
    #[doc = "2: Dual 8-bit counters PWM high mode"]
    Dual8bitPwmH = 2,
    #[doc = "3: Single 16-bit counter mode"]
    Single16bit = 3,
    #[doc = "4: Single 16-bit counter disable mode"]
    Single16bitDisable = 4,
    #[doc = "5: Dual 8-bit counters word mode"]
    Dual8bitWord = 5,
    #[doc = "6: Dual 8-bit counters PWM low mode"]
    Dual8bitPwmL = 6,
    #[doc = "7: Single 16-bit input capture mode"]
    Single16bitInCapture = 7,
}
impl From<Timod> for u8 {
    #[inline(always)]
    fn from(variant: Timod) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Timod {
    type Ux = u8;
}
impl crate::IsEnum for Timod {}
#[doc = "Field `TIMOD` reader - Timer Mode"]
pub type TimodR = crate::FieldReader<Timod>;
impl TimodR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Timod {
        match self.bits {
            0 => Timod::Disable,
            1 => Timod::Dual8bitBaud,
            2 => Timod::Dual8bitPwmH,
            3 => Timod::Single16bit,
            4 => Timod::Single16bitDisable,
            5 => Timod::Dual8bitWord,
            6 => Timod::Dual8bitPwmL,
            7 => Timod::Single16bitInCapture,
            _ => unreachable!(),
        }
    }
    #[doc = "Timer disabled"]
    #[inline(always)]
    pub fn is_disable(&self) -> bool {
        *self == Timod::Disable
    }
    #[doc = "Dual 8-bit counters baud mode"]
    #[inline(always)]
    pub fn is_dual8bit_baud(&self) -> bool {
        *self == Timod::Dual8bitBaud
    }
    #[doc = "Dual 8-bit counters PWM high mode"]
    #[inline(always)]
    pub fn is_dual8bit_pwm_h(&self) -> bool {
        *self == Timod::Dual8bitPwmH
    }
    #[doc = "Single 16-bit counter mode"]
    #[inline(always)]
    pub fn is_single16bit(&self) -> bool {
        *self == Timod::Single16bit
    }
    #[doc = "Single 16-bit counter disable mode"]
    #[inline(always)]
    pub fn is_single16bit_disable(&self) -> bool {
        *self == Timod::Single16bitDisable
    }
    #[doc = "Dual 8-bit counters word mode"]
    #[inline(always)]
    pub fn is_dual8bit_word(&self) -> bool {
        *self == Timod::Dual8bitWord
    }
    #[doc = "Dual 8-bit counters PWM low mode"]
    #[inline(always)]
    pub fn is_dual8bit_pwm_l(&self) -> bool {
        *self == Timod::Dual8bitPwmL
    }
    #[doc = "Single 16-bit input capture mode"]
    #[inline(always)]
    pub fn is_single16bit_in_capture(&self) -> bool {
        *self == Timod::Single16bitInCapture
    }
}
#[doc = "Field `TIMOD` writer - Timer Mode"]
pub type TimodW<'a, REG> = crate::FieldWriter<'a, REG, 3, Timod, crate::Safe>;
impl<'a, REG> TimodW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Timer disabled"]
    #[inline(always)]
    pub fn disable(self) -> &'a mut crate::W<REG> {
        self.variant(Timod::Disable)
    }
    #[doc = "Dual 8-bit counters baud mode"]
    #[inline(always)]
    pub fn dual8bit_baud(self) -> &'a mut crate::W<REG> {
        self.variant(Timod::Dual8bitBaud)
    }
    #[doc = "Dual 8-bit counters PWM high mode"]
    #[inline(always)]
    pub fn dual8bit_pwm_h(self) -> &'a mut crate::W<REG> {
        self.variant(Timod::Dual8bitPwmH)
    }
    #[doc = "Single 16-bit counter mode"]
    #[inline(always)]
    pub fn single16bit(self) -> &'a mut crate::W<REG> {
        self.variant(Timod::Single16bit)
    }
    #[doc = "Single 16-bit counter disable mode"]
    #[inline(always)]
    pub fn single16bit_disable(self) -> &'a mut crate::W<REG> {
        self.variant(Timod::Single16bitDisable)
    }
    #[doc = "Dual 8-bit counters word mode"]
    #[inline(always)]
    pub fn dual8bit_word(self) -> &'a mut crate::W<REG> {
        self.variant(Timod::Dual8bitWord)
    }
    #[doc = "Dual 8-bit counters PWM low mode"]
    #[inline(always)]
    pub fn dual8bit_pwm_l(self) -> &'a mut crate::W<REG> {
        self.variant(Timod::Dual8bitPwmL)
    }
    #[doc = "Single 16-bit input capture mode"]
    #[inline(always)]
    pub fn single16bit_in_capture(self) -> &'a mut crate::W<REG> {
        self.variant(Timod::Single16bitInCapture)
    }
}
#[doc = "Timer One Time Operation\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Onetim {
    #[doc = "0: Generate the timer enable event as normal"]
    NotBlocked = 0,
    #[doc = "1: Block the timer enable event unless the timer status flag is clear"]
    Blocked = 1,
}
impl From<Onetim> for bool {
    #[inline(always)]
    fn from(variant: Onetim) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `ONETIM` reader - Timer One Time Operation"]
pub type OnetimR = crate::BitReader<Onetim>;
impl OnetimR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Onetim {
        match self.bits {
            false => Onetim::NotBlocked,
            true => Onetim::Blocked,
        }
    }
    #[doc = "Generate the timer enable event as normal"]
    #[inline(always)]
    pub fn is_not_blocked(&self) -> bool {
        *self == Onetim::NotBlocked
    }
    #[doc = "Block the timer enable event unless the timer status flag is clear"]
    #[inline(always)]
    pub fn is_blocked(&self) -> bool {
        *self == Onetim::Blocked
    }
}
#[doc = "Field `ONETIM` writer - Timer One Time Operation"]
pub type OnetimW<'a, REG> = crate::BitWriter<'a, REG, Onetim>;
impl<'a, REG> OnetimW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Generate the timer enable event as normal"]
    #[inline(always)]
    pub fn not_blocked(self) -> &'a mut crate::W<REG> {
        self.variant(Onetim::NotBlocked)
    }
    #[doc = "Block the timer enable event unless the timer status flag is clear"]
    #[inline(always)]
    pub fn blocked(self) -> &'a mut crate::W<REG> {
        self.variant(Onetim::Blocked)
    }
}
#[doc = "Timer Pin Input Select\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Pinins {
    #[doc = "0: PINSEL selects timer pin input and output"]
    Pinsel = 0,
    #[doc = "1: PINSEL + 1 selects the timer pin input; timer pin output remains selected by PINSEL"]
    Pinselplus1 = 1,
}
impl From<Pinins> for bool {
    #[inline(always)]
    fn from(variant: Pinins) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `PININS` reader - Timer Pin Input Select"]
pub type PininsR = crate::BitReader<Pinins>;
impl PininsR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Pinins {
        match self.bits {
            false => Pinins::Pinsel,
            true => Pinins::Pinselplus1,
        }
    }
    #[doc = "PINSEL selects timer pin input and output"]
    #[inline(always)]
    pub fn is_pinsel(&self) -> bool {
        *self == Pinins::Pinsel
    }
    #[doc = "PINSEL + 1 selects the timer pin input; timer pin output remains selected by PINSEL"]
    #[inline(always)]
    pub fn is_pinselplus1(&self) -> bool {
        *self == Pinins::Pinselplus1
    }
}
#[doc = "Field `PININS` writer - Timer Pin Input Select"]
pub type PininsW<'a, REG> = crate::BitWriter<'a, REG, Pinins>;
impl<'a, REG> PininsW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "PINSEL selects timer pin input and output"]
    #[inline(always)]
    pub fn pinsel(self) -> &'a mut crate::W<REG> {
        self.variant(Pinins::Pinsel)
    }
    #[doc = "PINSEL + 1 selects the timer pin input; timer pin output remains selected by PINSEL"]
    #[inline(always)]
    pub fn pinselplus1(self) -> &'a mut crate::W<REG> {
        self.variant(Pinins::Pinselplus1)
    }
}
#[doc = "Timer Pin Polarity\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Pinpol {
    #[doc = "0: Active high"]
    ActiveHigh = 0,
    #[doc = "1: Active low"]
    ActiveLow = 1,
}
impl From<Pinpol> for bool {
    #[inline(always)]
    fn from(variant: Pinpol) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `PINPOL` reader - Timer Pin Polarity"]
pub type PinpolR = crate::BitReader<Pinpol>;
impl PinpolR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Pinpol {
        match self.bits {
            false => Pinpol::ActiveHigh,
            true => Pinpol::ActiveLow,
        }
    }
    #[doc = "Active high"]
    #[inline(always)]
    pub fn is_active_high(&self) -> bool {
        *self == Pinpol::ActiveHigh
    }
    #[doc = "Active low"]
    #[inline(always)]
    pub fn is_active_low(&self) -> bool {
        *self == Pinpol::ActiveLow
    }
}
#[doc = "Field `PINPOL` writer - Timer Pin Polarity"]
pub type PinpolW<'a, REG> = crate::BitWriter<'a, REG, Pinpol>;
impl<'a, REG> PinpolW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Active high"]
    #[inline(always)]
    pub fn active_high(self) -> &'a mut crate::W<REG> {
        self.variant(Pinpol::ActiveHigh)
    }
    #[doc = "Active low"]
    #[inline(always)]
    pub fn active_low(self) -> &'a mut crate::W<REG> {
        self.variant(Pinpol::ActiveLow)
    }
}
#[doc = "Field `PINSEL` reader - Timer Pin Select"]
pub type PinselR = crate::FieldReader;
#[doc = "Field `PINSEL` writer - Timer Pin Select"]
pub type PinselW<'a, REG> = crate::FieldWriter<'a, REG, 5>;
#[doc = "Timer Pin Configuration\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Pincfg {
    #[doc = "0: Timer pin output disabled"]
    Outdisable = 0,
    #[doc = "1: Timer pin open-drain or bidirectional output enable"]
    OpendBidirouten = 1,
    #[doc = "2: Timer pin bidirectional output data"]
    BidirOutdata = 2,
    #[doc = "3: Timer pin output"]
    Output = 3,
}
impl From<Pincfg> for u8 {
    #[inline(always)]
    fn from(variant: Pincfg) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Pincfg {
    type Ux = u8;
}
impl crate::IsEnum for Pincfg {}
#[doc = "Field `PINCFG` reader - Timer Pin Configuration"]
pub type PincfgR = crate::FieldReader<Pincfg>;
impl PincfgR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Pincfg {
        match self.bits {
            0 => Pincfg::Outdisable,
            1 => Pincfg::OpendBidirouten,
            2 => Pincfg::BidirOutdata,
            3 => Pincfg::Output,
            _ => unreachable!(),
        }
    }
    #[doc = "Timer pin output disabled"]
    #[inline(always)]
    pub fn is_outdisable(&self) -> bool {
        *self == Pincfg::Outdisable
    }
    #[doc = "Timer pin open-drain or bidirectional output enable"]
    #[inline(always)]
    pub fn is_opend_bidirouten(&self) -> bool {
        *self == Pincfg::OpendBidirouten
    }
    #[doc = "Timer pin bidirectional output data"]
    #[inline(always)]
    pub fn is_bidir_outdata(&self) -> bool {
        *self == Pincfg::BidirOutdata
    }
    #[doc = "Timer pin output"]
    #[inline(always)]
    pub fn is_output(&self) -> bool {
        *self == Pincfg::Output
    }
}
#[doc = "Field `PINCFG` writer - Timer Pin Configuration"]
pub type PincfgW<'a, REG> = crate::FieldWriter<'a, REG, 2, Pincfg, crate::Safe>;
impl<'a, REG> PincfgW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Timer pin output disabled"]
    #[inline(always)]
    pub fn outdisable(self) -> &'a mut crate::W<REG> {
        self.variant(Pincfg::Outdisable)
    }
    #[doc = "Timer pin open-drain or bidirectional output enable"]
    #[inline(always)]
    pub fn opend_bidirouten(self) -> &'a mut crate::W<REG> {
        self.variant(Pincfg::OpendBidirouten)
    }
    #[doc = "Timer pin bidirectional output data"]
    #[inline(always)]
    pub fn bidir_outdata(self) -> &'a mut crate::W<REG> {
        self.variant(Pincfg::BidirOutdata)
    }
    #[doc = "Timer pin output"]
    #[inline(always)]
    pub fn output(self) -> &'a mut crate::W<REG> {
        self.variant(Pincfg::Output)
    }
}
#[doc = "Trigger Source\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Trgsrc {
    #[doc = "0: External"]
    ExtTrig = 0,
    #[doc = "1: Internal"]
    InternalTrig = 1,
}
impl From<Trgsrc> for bool {
    #[inline(always)]
    fn from(variant: Trgsrc) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TRGSRC` reader - Trigger Source"]
pub type TrgsrcR = crate::BitReader<Trgsrc>;
impl TrgsrcR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Trgsrc {
        match self.bits {
            false => Trgsrc::ExtTrig,
            true => Trgsrc::InternalTrig,
        }
    }
    #[doc = "External"]
    #[inline(always)]
    pub fn is_ext_trig(&self) -> bool {
        *self == Trgsrc::ExtTrig
    }
    #[doc = "Internal"]
    #[inline(always)]
    pub fn is_internal_trig(&self) -> bool {
        *self == Trgsrc::InternalTrig
    }
}
#[doc = "Field `TRGSRC` writer - Trigger Source"]
pub type TrgsrcW<'a, REG> = crate::BitWriter<'a, REG, Trgsrc>;
impl<'a, REG> TrgsrcW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "External"]
    #[inline(always)]
    pub fn ext_trig(self) -> &'a mut crate::W<REG> {
        self.variant(Trgsrc::ExtTrig)
    }
    #[doc = "Internal"]
    #[inline(always)]
    pub fn internal_trig(self) -> &'a mut crate::W<REG> {
        self.variant(Trgsrc::InternalTrig)
    }
}
#[doc = "Trigger Polarity\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Trgpol {
    #[doc = "0: Active high"]
    ActiveHigh = 0,
    #[doc = "1: Active low"]
    ActiveLow = 1,
}
impl From<Trgpol> for bool {
    #[inline(always)]
    fn from(variant: Trgpol) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TRGPOL` reader - Trigger Polarity"]
pub type TrgpolR = crate::BitReader<Trgpol>;
impl TrgpolR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Trgpol {
        match self.bits {
            false => Trgpol::ActiveHigh,
            true => Trgpol::ActiveLow,
        }
    }
    #[doc = "Active high"]
    #[inline(always)]
    pub fn is_active_high(&self) -> bool {
        *self == Trgpol::ActiveHigh
    }
    #[doc = "Active low"]
    #[inline(always)]
    pub fn is_active_low(&self) -> bool {
        *self == Trgpol::ActiveLow
    }
}
#[doc = "Field `TRGPOL` writer - Trigger Polarity"]
pub type TrgpolW<'a, REG> = crate::BitWriter<'a, REG, Trgpol>;
impl<'a, REG> TrgpolW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Active high"]
    #[inline(always)]
    pub fn active_high(self) -> &'a mut crate::W<REG> {
        self.variant(Trgpol::ActiveHigh)
    }
    #[doc = "Active low"]
    #[inline(always)]
    pub fn active_low(self) -> &'a mut crate::W<REG> {
        self.variant(Trgpol::ActiveLow)
    }
}
#[doc = "Field `TRGSEL` reader - Trigger Select"]
pub type TrgselR = crate::FieldReader;
#[doc = "Field `TRGSEL` writer - Trigger Select"]
pub type TrgselW<'a, REG> = crate::FieldWriter<'a, REG, 6>;
impl R {
    #[doc = "Bits 0:2 - Timer Mode"]
    #[inline(always)]
    pub fn timod(&self) -> TimodR {
        TimodR::new((self.bits & 7) as u8)
    }
    #[doc = "Bit 5 - Timer One Time Operation"]
    #[inline(always)]
    pub fn onetim(&self) -> OnetimR {
        OnetimR::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - Timer Pin Input Select"]
    #[inline(always)]
    pub fn pinins(&self) -> PininsR {
        PininsR::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - Timer Pin Polarity"]
    #[inline(always)]
    pub fn pinpol(&self) -> PinpolR {
        PinpolR::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bits 8:12 - Timer Pin Select"]
    #[inline(always)]
    pub fn pinsel(&self) -> PinselR {
        PinselR::new(((self.bits >> 8) & 0x1f) as u8)
    }
    #[doc = "Bits 16:17 - Timer Pin Configuration"]
    #[inline(always)]
    pub fn pincfg(&self) -> PincfgR {
        PincfgR::new(((self.bits >> 16) & 3) as u8)
    }
    #[doc = "Bit 22 - Trigger Source"]
    #[inline(always)]
    pub fn trgsrc(&self) -> TrgsrcR {
        TrgsrcR::new(((self.bits >> 22) & 1) != 0)
    }
    #[doc = "Bit 23 - Trigger Polarity"]
    #[inline(always)]
    pub fn trgpol(&self) -> TrgpolR {
        TrgpolR::new(((self.bits >> 23) & 1) != 0)
    }
    #[doc = "Bits 24:29 - Trigger Select"]
    #[inline(always)]
    pub fn trgsel(&self) -> TrgselR {
        TrgselR::new(((self.bits >> 24) & 0x3f) 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("TIMCTL")
            .field("timod", &self.timod())
            .field("onetim", &self.onetim())
            .field("pinins", &self.pinins())
            .field("pinpol", &self.pinpol())
            .field("pinsel", &self.pinsel())
            .field("pincfg", &self.pincfg())
            .field("trgsrc", &self.trgsrc())
            .field("trgpol", &self.trgpol())
            .field("trgsel", &self.trgsel())
            .finish()
    }
}
impl W {
    #[doc = "Bits 0:2 - Timer Mode"]
    #[inline(always)]
    pub fn timod(&mut self) -> TimodW<'_, TimctlSpec> {
        TimodW::new(self, 0)
    }
    #[doc = "Bit 5 - Timer One Time Operation"]
    #[inline(always)]
    pub fn onetim(&mut self) -> OnetimW<'_, TimctlSpec> {
        OnetimW::new(self, 5)
    }
    #[doc = "Bit 6 - Timer Pin Input Select"]
    #[inline(always)]
    pub fn pinins(&mut self) -> PininsW<'_, TimctlSpec> {
        PininsW::new(self, 6)
    }
    #[doc = "Bit 7 - Timer Pin Polarity"]
    #[inline(always)]
    pub fn pinpol(&mut self) -> PinpolW<'_, TimctlSpec> {
        PinpolW::new(self, 7)
    }
    #[doc = "Bits 8:12 - Timer Pin Select"]
    #[inline(always)]
    pub fn pinsel(&mut self) -> PinselW<'_, TimctlSpec> {
        PinselW::new(self, 8)
    }
    #[doc = "Bits 16:17 - Timer Pin Configuration"]
    #[inline(always)]
    pub fn pincfg(&mut self) -> PincfgW<'_, TimctlSpec> {
        PincfgW::new(self, 16)
    }
    #[doc = "Bit 22 - Trigger Source"]
    #[inline(always)]
    pub fn trgsrc(&mut self) -> TrgsrcW<'_, TimctlSpec> {
        TrgsrcW::new(self, 22)
    }
    #[doc = "Bit 23 - Trigger Polarity"]
    #[inline(always)]
    pub fn trgpol(&mut self) -> TrgpolW<'_, TimctlSpec> {
        TrgpolW::new(self, 23)
    }
    #[doc = "Bits 24:29 - Trigger Select"]
    #[inline(always)]
    pub fn trgsel(&mut self) -> TrgselW<'_, TimctlSpec> {
        TrgselW::new(self, 24)
    }
}
#[doc = "Timer Control\n\nYou can [`read`](crate::Reg::read) this register and get [`timctl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`timctl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct TimctlSpec;
impl crate::RegisterSpec for TimctlSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`timctl::R`](R) reader structure"]
impl crate::Readable for TimctlSpec {}
#[doc = "`write(|w| ..)` method takes [`timctl::W`](W) writer structure"]
impl crate::Writable for TimctlSpec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets TIMCTL[%s] to value 0"]
impl crate::Resettable for TimctlSpec {}