cc13x0_pac 0.10.3

Peripheral Access Crate for TI's cc13x0 microcontroller
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
#[doc = "Register `CTL` reader"]
pub type R = crate::R<CtlSpec>;
#[doc = "Register `CTL` writer"]
pub type W = crate::W<CtlSpec>;
#[doc = "0:0\\]
GPT Timer A Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Taen {
    #[doc = "1: Timer A is enabled and begins counting or the capture logic is enabled based on the CFG register."]
    En = 1,
    #[doc = "0: Timer A is disabled."]
    Dis = 0,
}
impl From<Taen> for bool {
    #[inline(always)]
    fn from(variant: Taen) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TAEN` reader - 0:0\\]
GPT Timer A Enable"]
pub type TaenR = crate::BitReader<Taen>;
impl TaenR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Taen {
        match self.bits {
            true => Taen::En,
            false => Taen::Dis,
        }
    }
    #[doc = "Timer A is enabled and begins counting or the capture logic is enabled based on the CFG register."]
    #[inline(always)]
    pub fn is_en(&self) -> bool {
        *self == Taen::En
    }
    #[doc = "Timer A is disabled."]
    #[inline(always)]
    pub fn is_dis(&self) -> bool {
        *self == Taen::Dis
    }
}
#[doc = "Field `TAEN` writer - 0:0\\]
GPT Timer A Enable"]
pub type TaenW<'a, REG> = crate::BitWriter<'a, REG, Taen>;
impl<'a, REG> TaenW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Timer A is enabled and begins counting or the capture logic is enabled based on the CFG register."]
    #[inline(always)]
    pub fn en(self) -> &'a mut crate::W<REG> {
        self.variant(Taen::En)
    }
    #[doc = "Timer A is disabled."]
    #[inline(always)]
    pub fn dis(self) -> &'a mut crate::W<REG> {
        self.variant(Taen::Dis)
    }
}
#[doc = "1:1\\]
GPT Timer A Stall Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tastall {
    #[doc = "1: Timer A freezes counting while the processor is halted by the debugger."]
    En = 1,
    #[doc = "0: Timer A continues counting while the processor is halted by the debugger."]
    Dis = 0,
}
impl From<Tastall> for bool {
    #[inline(always)]
    fn from(variant: Tastall) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TASTALL` reader - 1:1\\]
GPT Timer A Stall Enable"]
pub type TastallR = crate::BitReader<Tastall>;
impl TastallR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tastall {
        match self.bits {
            true => Tastall::En,
            false => Tastall::Dis,
        }
    }
    #[doc = "Timer A freezes counting while the processor is halted by the debugger."]
    #[inline(always)]
    pub fn is_en(&self) -> bool {
        *self == Tastall::En
    }
    #[doc = "Timer A continues counting while the processor is halted by the debugger."]
    #[inline(always)]
    pub fn is_dis(&self) -> bool {
        *self == Tastall::Dis
    }
}
#[doc = "Field `TASTALL` writer - 1:1\\]
GPT Timer A Stall Enable"]
pub type TastallW<'a, REG> = crate::BitWriter<'a, REG, Tastall>;
impl<'a, REG> TastallW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Timer A freezes counting while the processor is halted by the debugger."]
    #[inline(always)]
    pub fn en(self) -> &'a mut crate::W<REG> {
        self.variant(Tastall::En)
    }
    #[doc = "Timer A continues counting while the processor is halted by the debugger."]
    #[inline(always)]
    pub fn dis(self) -> &'a mut crate::W<REG> {
        self.variant(Tastall::Dis)
    }
}
#[doc = "3:2\\]
GPT Timer A Event Mode The values in this register are defined as follows: Value Description 0x0 Positive edge 0x1 Negative edge 0x2 Reserved 0x3 Both edges Note: If PWM output inversion is enabled, edge detection interrupt behavior is reversed. Thus, if a positive-edge interrupt trigger has been set and the PWM inversion generates a postive edge, no event-trigger interrupt asserts. Instead, the interrupt is generated on the negative edge of the PWM signal.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Taevent {
    #[doc = "3: Both edges"]
    Both = 3,
    #[doc = "1: Negative edge"]
    Neg = 1,
    #[doc = "0: Positive edge"]
    Pos = 0,
}
impl From<Taevent> for u8 {
    #[inline(always)]
    fn from(variant: Taevent) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Taevent {
    type Ux = u8;
}
impl crate::IsEnum for Taevent {}
#[doc = "Field `TAEVENT` reader - 3:2\\]
GPT Timer A Event Mode The values in this register are defined as follows: Value Description 0x0 Positive edge 0x1 Negative edge 0x2 Reserved 0x3 Both edges Note: If PWM output inversion is enabled, edge detection interrupt behavior is reversed. Thus, if a positive-edge interrupt trigger has been set and the PWM inversion generates a postive edge, no event-trigger interrupt asserts. Instead, the interrupt is generated on the negative edge of the PWM signal."]
pub type TaeventR = crate::FieldReader<Taevent>;
impl TaeventR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Taevent> {
        match self.bits {
            3 => Some(Taevent::Both),
            1 => Some(Taevent::Neg),
            0 => Some(Taevent::Pos),
            _ => None,
        }
    }
    #[doc = "Both edges"]
    #[inline(always)]
    pub fn is_both(&self) -> bool {
        *self == Taevent::Both
    }
    #[doc = "Negative edge"]
    #[inline(always)]
    pub fn is_neg(&self) -> bool {
        *self == Taevent::Neg
    }
    #[doc = "Positive edge"]
    #[inline(always)]
    pub fn is_pos(&self) -> bool {
        *self == Taevent::Pos
    }
}
#[doc = "Field `TAEVENT` writer - 3:2\\]
GPT Timer A Event Mode The values in this register are defined as follows: Value Description 0x0 Positive edge 0x1 Negative edge 0x2 Reserved 0x3 Both edges Note: If PWM output inversion is enabled, edge detection interrupt behavior is reversed. Thus, if a positive-edge interrupt trigger has been set and the PWM inversion generates a postive edge, no event-trigger interrupt asserts. Instead, the interrupt is generated on the negative edge of the PWM signal."]
pub type TaeventW<'a, REG> = crate::FieldWriter<'a, REG, 2, Taevent>;
impl<'a, REG> TaeventW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Both edges"]
    #[inline(always)]
    pub fn both(self) -> &'a mut crate::W<REG> {
        self.variant(Taevent::Both)
    }
    #[doc = "Negative edge"]
    #[inline(always)]
    pub fn neg(self) -> &'a mut crate::W<REG> {
        self.variant(Taevent::Neg)
    }
    #[doc = "Positive edge"]
    #[inline(always)]
    pub fn pos(self) -> &'a mut crate::W<REG> {
        self.variant(Taevent::Pos)
    }
}
#[doc = "Field `RESERVED4` reader - 5:4\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
pub type Reserved4R = crate::FieldReader;
#[doc = "Field `RESERVED4` writer - 5:4\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
pub type Reserved4W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
#[doc = "6:6\\]
GPT Timer A PWM Output Level\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tapwml {
    #[doc = "1: Inverted"]
    Inverted = 1,
    #[doc = "0: Not inverted"]
    Normal = 0,
}
impl From<Tapwml> for bool {
    #[inline(always)]
    fn from(variant: Tapwml) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TAPWML` reader - 6:6\\]
GPT Timer A PWM Output Level"]
pub type TapwmlR = crate::BitReader<Tapwml>;
impl TapwmlR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tapwml {
        match self.bits {
            true => Tapwml::Inverted,
            false => Tapwml::Normal,
        }
    }
    #[doc = "Inverted"]
    #[inline(always)]
    pub fn is_inverted(&self) -> bool {
        *self == Tapwml::Inverted
    }
    #[doc = "Not inverted"]
    #[inline(always)]
    pub fn is_normal(&self) -> bool {
        *self == Tapwml::Normal
    }
}
#[doc = "Field `TAPWML` writer - 6:6\\]
GPT Timer A PWM Output Level"]
pub type TapwmlW<'a, REG> = crate::BitWriter<'a, REG, Tapwml>;
impl<'a, REG> TapwmlW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Inverted"]
    #[inline(always)]
    pub fn inverted(self) -> &'a mut crate::W<REG> {
        self.variant(Tapwml::Inverted)
    }
    #[doc = "Not inverted"]
    #[inline(always)]
    pub fn normal(self) -> &'a mut crate::W<REG> {
        self.variant(Tapwml::Normal)
    }
}
#[doc = "Field `RESERVED7` reader - 7:7\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
pub type Reserved7R = crate::BitReader;
#[doc = "Field `RESERVED7` writer - 7:7\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
pub type Reserved7W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "8:8\\]
GPT Timer B Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tben {
    #[doc = "1: Timer B is enabled and begins counting or the capture logic is enabled based on CFG register."]
    En = 1,
    #[doc = "0: Timer B is disabled."]
    Dis = 0,
}
impl From<Tben> for bool {
    #[inline(always)]
    fn from(variant: Tben) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TBEN` reader - 8:8\\]
GPT Timer B Enable"]
pub type TbenR = crate::BitReader<Tben>;
impl TbenR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tben {
        match self.bits {
            true => Tben::En,
            false => Tben::Dis,
        }
    }
    #[doc = "Timer B is enabled and begins counting or the capture logic is enabled based on CFG register."]
    #[inline(always)]
    pub fn is_en(&self) -> bool {
        *self == Tben::En
    }
    #[doc = "Timer B is disabled."]
    #[inline(always)]
    pub fn is_dis(&self) -> bool {
        *self == Tben::Dis
    }
}
#[doc = "Field `TBEN` writer - 8:8\\]
GPT Timer B Enable"]
pub type TbenW<'a, REG> = crate::BitWriter<'a, REG, Tben>;
impl<'a, REG> TbenW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Timer B is enabled and begins counting or the capture logic is enabled based on CFG register."]
    #[inline(always)]
    pub fn en(self) -> &'a mut crate::W<REG> {
        self.variant(Tben::En)
    }
    #[doc = "Timer B is disabled."]
    #[inline(always)]
    pub fn dis(self) -> &'a mut crate::W<REG> {
        self.variant(Tben::Dis)
    }
}
#[doc = "9:9\\]
GPT Timer B Stall Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tbstall {
    #[doc = "1: Timer B freezes counting while the processor is halted by the debugger."]
    En = 1,
    #[doc = "0: Timer B continues counting while the processor is halted by the debugger."]
    Dis = 0,
}
impl From<Tbstall> for bool {
    #[inline(always)]
    fn from(variant: Tbstall) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TBSTALL` reader - 9:9\\]
GPT Timer B Stall Enable"]
pub type TbstallR = crate::BitReader<Tbstall>;
impl TbstallR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tbstall {
        match self.bits {
            true => Tbstall::En,
            false => Tbstall::Dis,
        }
    }
    #[doc = "Timer B freezes counting while the processor is halted by the debugger."]
    #[inline(always)]
    pub fn is_en(&self) -> bool {
        *self == Tbstall::En
    }
    #[doc = "Timer B continues counting while the processor is halted by the debugger."]
    #[inline(always)]
    pub fn is_dis(&self) -> bool {
        *self == Tbstall::Dis
    }
}
#[doc = "Field `TBSTALL` writer - 9:9\\]
GPT Timer B Stall Enable"]
pub type TbstallW<'a, REG> = crate::BitWriter<'a, REG, Tbstall>;
impl<'a, REG> TbstallW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Timer B freezes counting while the processor is halted by the debugger."]
    #[inline(always)]
    pub fn en(self) -> &'a mut crate::W<REG> {
        self.variant(Tbstall::En)
    }
    #[doc = "Timer B continues counting while the processor is halted by the debugger."]
    #[inline(always)]
    pub fn dis(self) -> &'a mut crate::W<REG> {
        self.variant(Tbstall::Dis)
    }
}
#[doc = "11:10\\]
GPT Timer B Event Mode The values in this register are defined as follows: Value Description 0x0 Positive edge 0x1 Negative edge 0x2 Reserved 0x3 Both edges Note: If PWM output inversion is enabled, edge detection interrupt behavior is reversed. Thus, if a positive-edge interrupt trigger has been set and the PWM inversion generates a postive edge, no event-trigger interrupt asserts. Instead, the interrupt is generated on the negative edge of the PWM signal.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Tbevent {
    #[doc = "3: Both edges"]
    Both = 3,
    #[doc = "1: Negative edge"]
    Neg = 1,
    #[doc = "0: Positive edge"]
    Pos = 0,
}
impl From<Tbevent> for u8 {
    #[inline(always)]
    fn from(variant: Tbevent) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Tbevent {
    type Ux = u8;
}
impl crate::IsEnum for Tbevent {}
#[doc = "Field `TBEVENT` reader - 11:10\\]
GPT Timer B Event Mode The values in this register are defined as follows: Value Description 0x0 Positive edge 0x1 Negative edge 0x2 Reserved 0x3 Both edges Note: If PWM output inversion is enabled, edge detection interrupt behavior is reversed. Thus, if a positive-edge interrupt trigger has been set and the PWM inversion generates a postive edge, no event-trigger interrupt asserts. Instead, the interrupt is generated on the negative edge of the PWM signal."]
pub type TbeventR = crate::FieldReader<Tbevent>;
impl TbeventR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Tbevent> {
        match self.bits {
            3 => Some(Tbevent::Both),
            1 => Some(Tbevent::Neg),
            0 => Some(Tbevent::Pos),
            _ => None,
        }
    }
    #[doc = "Both edges"]
    #[inline(always)]
    pub fn is_both(&self) -> bool {
        *self == Tbevent::Both
    }
    #[doc = "Negative edge"]
    #[inline(always)]
    pub fn is_neg(&self) -> bool {
        *self == Tbevent::Neg
    }
    #[doc = "Positive edge"]
    #[inline(always)]
    pub fn is_pos(&self) -> bool {
        *self == Tbevent::Pos
    }
}
#[doc = "Field `TBEVENT` writer - 11:10\\]
GPT Timer B Event Mode The values in this register are defined as follows: Value Description 0x0 Positive edge 0x1 Negative edge 0x2 Reserved 0x3 Both edges Note: If PWM output inversion is enabled, edge detection interrupt behavior is reversed. Thus, if a positive-edge interrupt trigger has been set and the PWM inversion generates a postive edge, no event-trigger interrupt asserts. Instead, the interrupt is generated on the negative edge of the PWM signal."]
pub type TbeventW<'a, REG> = crate::FieldWriter<'a, REG, 2, Tbevent>;
impl<'a, REG> TbeventW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "Both edges"]
    #[inline(always)]
    pub fn both(self) -> &'a mut crate::W<REG> {
        self.variant(Tbevent::Both)
    }
    #[doc = "Negative edge"]
    #[inline(always)]
    pub fn neg(self) -> &'a mut crate::W<REG> {
        self.variant(Tbevent::Neg)
    }
    #[doc = "Positive edge"]
    #[inline(always)]
    pub fn pos(self) -> &'a mut crate::W<REG> {
        self.variant(Tbevent::Pos)
    }
}
#[doc = "Field `RESERVED12` reader - 13:12\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
pub type Reserved12R = crate::FieldReader;
#[doc = "Field `RESERVED12` writer - 13:12\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
pub type Reserved12W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
#[doc = "14:14\\]
GPT Timer B PWM Output Level 0: Output is unaffected. 1: Output is inverted.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tbpwml {
    #[doc = "1: Inverted"]
    Inverted = 1,
    #[doc = "0: Not inverted"]
    Normal = 0,
}
impl From<Tbpwml> for bool {
    #[inline(always)]
    fn from(variant: Tbpwml) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TBPWML` reader - 14:14\\]
GPT Timer B PWM Output Level 0: Output is unaffected. 1: Output is inverted."]
pub type TbpwmlR = crate::BitReader<Tbpwml>;
impl TbpwmlR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tbpwml {
        match self.bits {
            true => Tbpwml::Inverted,
            false => Tbpwml::Normal,
        }
    }
    #[doc = "Inverted"]
    #[inline(always)]
    pub fn is_inverted(&self) -> bool {
        *self == Tbpwml::Inverted
    }
    #[doc = "Not inverted"]
    #[inline(always)]
    pub fn is_normal(&self) -> bool {
        *self == Tbpwml::Normal
    }
}
#[doc = "Field `TBPWML` writer - 14:14\\]
GPT Timer B PWM Output Level 0: Output is unaffected. 1: Output is inverted."]
pub type TbpwmlW<'a, REG> = crate::BitWriter<'a, REG, Tbpwml>;
impl<'a, REG> TbpwmlW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Inverted"]
    #[inline(always)]
    pub fn inverted(self) -> &'a mut crate::W<REG> {
        self.variant(Tbpwml::Inverted)
    }
    #[doc = "Not inverted"]
    #[inline(always)]
    pub fn normal(self) -> &'a mut crate::W<REG> {
        self.variant(Tbpwml::Normal)
    }
}
#[doc = "Field `RESERVED15` reader - 31:15\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
pub type Reserved15R = crate::FieldReader<u32>;
#[doc = "Field `RESERVED15` writer - 31:15\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
pub type Reserved15W<'a, REG> = crate::FieldWriter<'a, REG, 17, u32>;
impl R {
    #[doc = "Bit 0 - 0:0\\]
GPT Timer A Enable"]
    #[inline(always)]
    pub fn taen(&self) -> TaenR {
        TaenR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - 1:1\\]
GPT Timer A Stall Enable"]
    #[inline(always)]
    pub fn tastall(&self) -> TastallR {
        TastallR::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bits 2:3 - 3:2\\]
GPT Timer A Event Mode The values in this register are defined as follows: Value Description 0x0 Positive edge 0x1 Negative edge 0x2 Reserved 0x3 Both edges Note: If PWM output inversion is enabled, edge detection interrupt behavior is reversed. Thus, if a positive-edge interrupt trigger has been set and the PWM inversion generates a postive edge, no event-trigger interrupt asserts. Instead, the interrupt is generated on the negative edge of the PWM signal."]
    #[inline(always)]
    pub fn taevent(&self) -> TaeventR {
        TaeventR::new(((self.bits >> 2) & 3) as u8)
    }
    #[doc = "Bits 4:5 - 5:4\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline(always)]
    pub fn reserved4(&self) -> Reserved4R {
        Reserved4R::new(((self.bits >> 4) & 3) as u8)
    }
    #[doc = "Bit 6 - 6:6\\]
GPT Timer A PWM Output Level"]
    #[inline(always)]
    pub fn tapwml(&self) -> TapwmlR {
        TapwmlR::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - 7:7\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline(always)]
    pub fn reserved7(&self) -> Reserved7R {
        Reserved7R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8 - 8:8\\]
GPT Timer B Enable"]
    #[inline(always)]
    pub fn tben(&self) -> TbenR {
        TbenR::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 9 - 9:9\\]
GPT Timer B Stall Enable"]
    #[inline(always)]
    pub fn tbstall(&self) -> TbstallR {
        TbstallR::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bits 10:11 - 11:10\\]
GPT Timer B Event Mode The values in this register are defined as follows: Value Description 0x0 Positive edge 0x1 Negative edge 0x2 Reserved 0x3 Both edges Note: If PWM output inversion is enabled, edge detection interrupt behavior is reversed. Thus, if a positive-edge interrupt trigger has been set and the PWM inversion generates a postive edge, no event-trigger interrupt asserts. Instead, the interrupt is generated on the negative edge of the PWM signal."]
    #[inline(always)]
    pub fn tbevent(&self) -> TbeventR {
        TbeventR::new(((self.bits >> 10) & 3) as u8)
    }
    #[doc = "Bits 12:13 - 13:12\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline(always)]
    pub fn reserved12(&self) -> Reserved12R {
        Reserved12R::new(((self.bits >> 12) & 3) as u8)
    }
    #[doc = "Bit 14 - 14:14\\]
GPT Timer B PWM Output Level 0: Output is unaffected. 1: Output is inverted."]
    #[inline(always)]
    pub fn tbpwml(&self) -> TbpwmlR {
        TbpwmlR::new(((self.bits >> 14) & 1) != 0)
    }
    #[doc = "Bits 15:31 - 31:15\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline(always)]
    pub fn reserved15(&self) -> Reserved15R {
        Reserved15R::new((self.bits >> 15) & 0x0001_ffff)
    }
}
impl W {
    #[doc = "Bit 0 - 0:0\\]
GPT Timer A Enable"]
    #[inline(always)]
    #[must_use]
    pub fn taen(&mut self) -> TaenW<CtlSpec> {
        TaenW::new(self, 0)
    }
    #[doc = "Bit 1 - 1:1\\]
GPT Timer A Stall Enable"]
    #[inline(always)]
    #[must_use]
    pub fn tastall(&mut self) -> TastallW<CtlSpec> {
        TastallW::new(self, 1)
    }
    #[doc = "Bits 2:3 - 3:2\\]
GPT Timer A Event Mode The values in this register are defined as follows: Value Description 0x0 Positive edge 0x1 Negative edge 0x2 Reserved 0x3 Both edges Note: If PWM output inversion is enabled, edge detection interrupt behavior is reversed. Thus, if a positive-edge interrupt trigger has been set and the PWM inversion generates a postive edge, no event-trigger interrupt asserts. Instead, the interrupt is generated on the negative edge of the PWM signal."]
    #[inline(always)]
    #[must_use]
    pub fn taevent(&mut self) -> TaeventW<CtlSpec> {
        TaeventW::new(self, 2)
    }
    #[doc = "Bits 4:5 - 5:4\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline(always)]
    #[must_use]
    pub fn reserved4(&mut self) -> Reserved4W<CtlSpec> {
        Reserved4W::new(self, 4)
    }
    #[doc = "Bit 6 - 6:6\\]
GPT Timer A PWM Output Level"]
    #[inline(always)]
    #[must_use]
    pub fn tapwml(&mut self) -> TapwmlW<CtlSpec> {
        TapwmlW::new(self, 6)
    }
    #[doc = "Bit 7 - 7:7\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline(always)]
    #[must_use]
    pub fn reserved7(&mut self) -> Reserved7W<CtlSpec> {
        Reserved7W::new(self, 7)
    }
    #[doc = "Bit 8 - 8:8\\]
GPT Timer B Enable"]
    #[inline(always)]
    #[must_use]
    pub fn tben(&mut self) -> TbenW<CtlSpec> {
        TbenW::new(self, 8)
    }
    #[doc = "Bit 9 - 9:9\\]
GPT Timer B Stall Enable"]
    #[inline(always)]
    #[must_use]
    pub fn tbstall(&mut self) -> TbstallW<CtlSpec> {
        TbstallW::new(self, 9)
    }
    #[doc = "Bits 10:11 - 11:10\\]
GPT Timer B Event Mode The values in this register are defined as follows: Value Description 0x0 Positive edge 0x1 Negative edge 0x2 Reserved 0x3 Both edges Note: If PWM output inversion is enabled, edge detection interrupt behavior is reversed. Thus, if a positive-edge interrupt trigger has been set and the PWM inversion generates a postive edge, no event-trigger interrupt asserts. Instead, the interrupt is generated on the negative edge of the PWM signal."]
    #[inline(always)]
    #[must_use]
    pub fn tbevent(&mut self) -> TbeventW<CtlSpec> {
        TbeventW::new(self, 10)
    }
    #[doc = "Bits 12:13 - 13:12\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline(always)]
    #[must_use]
    pub fn reserved12(&mut self) -> Reserved12W<CtlSpec> {
        Reserved12W::new(self, 12)
    }
    #[doc = "Bit 14 - 14:14\\]
GPT Timer B PWM Output Level 0: Output is unaffected. 1: Output is inverted."]
    #[inline(always)]
    #[must_use]
    pub fn tbpwml(&mut self) -> TbpwmlW<CtlSpec> {
        TbpwmlW::new(self, 14)
    }
    #[doc = "Bits 15:31 - 31:15\\]
Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline(always)]
    #[must_use]
    pub fn reserved15(&mut self) -> Reserved15W<CtlSpec> {
        Reserved15W::new(self, 15)
    }
}
#[doc = "Control\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ctl::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 [`ctl::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CtlSpec;
impl crate::RegisterSpec for CtlSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`ctl::R`](R) reader structure"]
impl crate::Readable for CtlSpec {}
#[doc = "`write(|w| ..)` method takes [`ctl::W`](W) writer structure"]
impl crate::Writable for CtlSpec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets CTL to value 0"]
impl crate::Resettable for CtlSpec {
    const RESET_VALUE: u32 = 0;
}