esp32 0.42.0

Peripheral access crate for the ESP32
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
#[doc = "Register `INT_ENA` reader"]
pub type R = crate::R<INT_ENA_SPEC>;
#[doc = "Register `INT_ENA` writer"]
pub type W = crate::W<INT_ENA_SPEC>;
#[doc = "Field `TIMER_STOP(0-2)` reader - The interrupt enable bit for the timer%s stop event."]
pub type TIMER_STOP_R = crate::BitReader;
#[doc = "Field `TIMER_STOP(0-2)` writer - The interrupt enable bit for the timer%s stop event."]
pub type TIMER_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TIMER_TEZ(0-2)` reader - The interrupt enable bit for the timer%s zero event."]
pub type TIMER_TEZ_R = crate::BitReader;
#[doc = "Field `TIMER_TEZ(0-2)` writer - The interrupt enable bit for the timer%s zero event."]
pub type TIMER_TEZ_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TIMER_TEP(0-2)` reader - The interrupt enable bit for the timer%s period event."]
pub type TIMER_TEP_R = crate::BitReader;
#[doc = "Field `TIMER_TEP(0-2)` writer - The interrupt enable bit for the timer%s period event."]
pub type TIMER_TEP_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `FAULT(0-2)` reader - The interrupt enable bit for the fault%s event."]
pub type FAULT_R = crate::BitReader;
#[doc = "Field `FAULT(0-2)` writer - The interrupt enable bit for the fault%s event."]
pub type FAULT_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `FAULT_CLR(0-2)` reader - The interrupt enable bit for the fault%s clear event."]
pub type FAULT_CLR_R = crate::BitReader;
#[doc = "Field `FAULT_CLR(0-2)` writer - The interrupt enable bit for the fault%s clear event."]
pub type FAULT_CLR_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CMPR_TEA(0-2)` reader - The interrupt enable bit for the operator%s compare A event."]
pub type CMPR_TEA_R = crate::BitReader;
#[doc = "Field `CMPR_TEA(0-2)` writer - The interrupt enable bit for the operator%s compare A event."]
pub type CMPR_TEA_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CMPR_TEB(0-2)` reader - The interrupt enable bit for the operator%s compare B event."]
pub type CMPR_TEB_R = crate::BitReader;
#[doc = "Field `CMPR_TEB(0-2)` writer - The interrupt enable bit for the operator%s compare B event."]
pub type CMPR_TEB_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TZ_CBC(0-2)` reader - The interrupt enable bit for the fault handler%s cycle-by-cycle mode action."]
pub type TZ_CBC_R = crate::BitReader;
#[doc = "Field `TZ_CBC(0-2)` writer - The interrupt enable bit for the fault handler%s cycle-by-cycle mode action."]
pub type TZ_CBC_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TZ_OST(0-2)` reader - The interrupt enable bit for the fault handler%s one-shot mode action."]
pub type TZ_OST_R = crate::BitReader;
#[doc = "Field `TZ_OST(0-2)` writer - The interrupt enable bit for the fault handler%s one-shot mode action."]
pub type TZ_OST_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CAP(0-2)` reader - The interrupt enable bit for the capture%s event."]
pub type CAP_R = crate::BitReader;
#[doc = "Field `CAP(0-2)` writer - The interrupt enable bit for the capture%s event."]
pub type CAP_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "The interrupt enable bit for the timer(0-2) stop event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `TIMER0_STOP` field.</div>"]
    #[inline(always)]
    pub fn timer_stop(&self, n: u8) -> TIMER_STOP_R {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        TIMER_STOP_R::new(((self.bits >> n) & 1) != 0)
    }
    #[doc = "Iterator for array of:"]
    #[doc = "The interrupt enable bit for the timer(0-2) stop event."]
    #[inline(always)]
    pub fn timer_stop_iter(&self) -> impl Iterator<Item = TIMER_STOP_R> + '_ {
        (0..3).map(move |n| TIMER_STOP_R::new(((self.bits >> n) & 1) != 0))
    }
    #[doc = "Bit 0 - The interrupt enable bit for the timer0 stop event."]
    #[inline(always)]
    pub fn timer0_stop(&self) -> TIMER_STOP_R {
        TIMER_STOP_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - The interrupt enable bit for the timer1 stop event."]
    #[inline(always)]
    pub fn timer1_stop(&self) -> TIMER_STOP_R {
        TIMER_STOP_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - The interrupt enable bit for the timer2 stop event."]
    #[inline(always)]
    pub fn timer2_stop(&self) -> TIMER_STOP_R {
        TIMER_STOP_R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "The interrupt enable bit for the timer(0-2) zero event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `TIMER0_TEZ` field.</div>"]
    #[inline(always)]
    pub fn timer_tez(&self, n: u8) -> TIMER_TEZ_R {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        TIMER_TEZ_R::new(((self.bits >> (n + 3)) & 1) != 0)
    }
    #[doc = "Iterator for array of:"]
    #[doc = "The interrupt enable bit for the timer(0-2) zero event."]
    #[inline(always)]
    pub fn timer_tez_iter(&self) -> impl Iterator<Item = TIMER_TEZ_R> + '_ {
        (0..3).map(move |n| TIMER_TEZ_R::new(((self.bits >> (n + 3)) & 1) != 0))
    }
    #[doc = "Bit 3 - The interrupt enable bit for the timer0 zero event."]
    #[inline(always)]
    pub fn timer0_tez(&self) -> TIMER_TEZ_R {
        TIMER_TEZ_R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - The interrupt enable bit for the timer1 zero event."]
    #[inline(always)]
    pub fn timer1_tez(&self) -> TIMER_TEZ_R {
        TIMER_TEZ_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - The interrupt enable bit for the timer2 zero event."]
    #[inline(always)]
    pub fn timer2_tez(&self) -> TIMER_TEZ_R {
        TIMER_TEZ_R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "The interrupt enable bit for the timer(0-2) period event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `TIMER0_TEP` field.</div>"]
    #[inline(always)]
    pub fn timer_tep(&self, n: u8) -> TIMER_TEP_R {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        TIMER_TEP_R::new(((self.bits >> (n + 6)) & 1) != 0)
    }
    #[doc = "Iterator for array of:"]
    #[doc = "The interrupt enable bit for the timer(0-2) period event."]
    #[inline(always)]
    pub fn timer_tep_iter(&self) -> impl Iterator<Item = TIMER_TEP_R> + '_ {
        (0..3).map(move |n| TIMER_TEP_R::new(((self.bits >> (n + 6)) & 1) != 0))
    }
    #[doc = "Bit 6 - The interrupt enable bit for the timer0 period event."]
    #[inline(always)]
    pub fn timer0_tep(&self) -> TIMER_TEP_R {
        TIMER_TEP_R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - The interrupt enable bit for the timer1 period event."]
    #[inline(always)]
    pub fn timer1_tep(&self) -> TIMER_TEP_R {
        TIMER_TEP_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8 - The interrupt enable bit for the timer2 period event."]
    #[inline(always)]
    pub fn timer2_tep(&self) -> TIMER_TEP_R {
        TIMER_TEP_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "The interrupt enable bit for the fault(0-2) event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `FAULT0` field.</div>"]
    #[inline(always)]
    pub fn fault(&self, n: u8) -> FAULT_R {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        FAULT_R::new(((self.bits >> (n + 9)) & 1) != 0)
    }
    #[doc = "Iterator for array of:"]
    #[doc = "The interrupt enable bit for the fault(0-2) event."]
    #[inline(always)]
    pub fn fault_iter(&self) -> impl Iterator<Item = FAULT_R> + '_ {
        (0..3).map(move |n| FAULT_R::new(((self.bits >> (n + 9)) & 1) != 0))
    }
    #[doc = "Bit 9 - The interrupt enable bit for the fault0 event."]
    #[inline(always)]
    pub fn fault0(&self) -> FAULT_R {
        FAULT_R::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 10 - The interrupt enable bit for the fault1 event."]
    #[inline(always)]
    pub fn fault1(&self) -> FAULT_R {
        FAULT_R::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 11 - The interrupt enable bit for the fault2 event."]
    #[inline(always)]
    pub fn fault2(&self) -> FAULT_R {
        FAULT_R::new(((self.bits >> 11) & 1) != 0)
    }
    #[doc = "The interrupt enable bit for the fault(0-2) clear event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `FAULT0_CLR` field.</div>"]
    #[inline(always)]
    pub fn fault_clr(&self, n: u8) -> FAULT_CLR_R {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        FAULT_CLR_R::new(((self.bits >> (n + 12)) & 1) != 0)
    }
    #[doc = "Iterator for array of:"]
    #[doc = "The interrupt enable bit for the fault(0-2) clear event."]
    #[inline(always)]
    pub fn fault_clr_iter(&self) -> impl Iterator<Item = FAULT_CLR_R> + '_ {
        (0..3).map(move |n| FAULT_CLR_R::new(((self.bits >> (n + 12)) & 1) != 0))
    }
    #[doc = "Bit 12 - The interrupt enable bit for the fault0 clear event."]
    #[inline(always)]
    pub fn fault0_clr(&self) -> FAULT_CLR_R {
        FAULT_CLR_R::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 13 - The interrupt enable bit for the fault1 clear event."]
    #[inline(always)]
    pub fn fault1_clr(&self) -> FAULT_CLR_R {
        FAULT_CLR_R::new(((self.bits >> 13) & 1) != 0)
    }
    #[doc = "Bit 14 - The interrupt enable bit for the fault2 clear event."]
    #[inline(always)]
    pub fn fault2_clr(&self) -> FAULT_CLR_R {
        FAULT_CLR_R::new(((self.bits >> 14) & 1) != 0)
    }
    #[doc = "The interrupt enable bit for the operator(0-2) compare A event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `CMPR0_TEA` field.</div>"]
    #[inline(always)]
    pub fn cmpr_tea(&self, n: u8) -> CMPR_TEA_R {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        CMPR_TEA_R::new(((self.bits >> (n + 15)) & 1) != 0)
    }
    #[doc = "Iterator for array of:"]
    #[doc = "The interrupt enable bit for the operator(0-2) compare A event."]
    #[inline(always)]
    pub fn cmpr_tea_iter(&self) -> impl Iterator<Item = CMPR_TEA_R> + '_ {
        (0..3).map(move |n| CMPR_TEA_R::new(((self.bits >> (n + 15)) & 1) != 0))
    }
    #[doc = "Bit 15 - The interrupt enable bit for the operator0 compare A event."]
    #[inline(always)]
    pub fn cmpr0_tea(&self) -> CMPR_TEA_R {
        CMPR_TEA_R::new(((self.bits >> 15) & 1) != 0)
    }
    #[doc = "Bit 16 - The interrupt enable bit for the operator1 compare A event."]
    #[inline(always)]
    pub fn cmpr1_tea(&self) -> CMPR_TEA_R {
        CMPR_TEA_R::new(((self.bits >> 16) & 1) != 0)
    }
    #[doc = "Bit 17 - The interrupt enable bit for the operator2 compare A event."]
    #[inline(always)]
    pub fn cmpr2_tea(&self) -> CMPR_TEA_R {
        CMPR_TEA_R::new(((self.bits >> 17) & 1) != 0)
    }
    #[doc = "The interrupt enable bit for the operator(0-2) compare B event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `CMPR0_TEB` field.</div>"]
    #[inline(always)]
    pub fn cmpr_teb(&self, n: u8) -> CMPR_TEB_R {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        CMPR_TEB_R::new(((self.bits >> (n + 18)) & 1) != 0)
    }
    #[doc = "Iterator for array of:"]
    #[doc = "The interrupt enable bit for the operator(0-2) compare B event."]
    #[inline(always)]
    pub fn cmpr_teb_iter(&self) -> impl Iterator<Item = CMPR_TEB_R> + '_ {
        (0..3).map(move |n| CMPR_TEB_R::new(((self.bits >> (n + 18)) & 1) != 0))
    }
    #[doc = "Bit 18 - The interrupt enable bit for the operator0 compare B event."]
    #[inline(always)]
    pub fn cmpr0_teb(&self) -> CMPR_TEB_R {
        CMPR_TEB_R::new(((self.bits >> 18) & 1) != 0)
    }
    #[doc = "Bit 19 - The interrupt enable bit for the operator1 compare B event."]
    #[inline(always)]
    pub fn cmpr1_teb(&self) -> CMPR_TEB_R {
        CMPR_TEB_R::new(((self.bits >> 19) & 1) != 0)
    }
    #[doc = "Bit 20 - The interrupt enable bit for the operator2 compare B event."]
    #[inline(always)]
    pub fn cmpr2_teb(&self) -> CMPR_TEB_R {
        CMPR_TEB_R::new(((self.bits >> 20) & 1) != 0)
    }
    #[doc = "The interrupt enable bit for the fault handler(0-2) cycle-by-cycle mode action."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `TZ0_CBC` field.</div>"]
    #[inline(always)]
    pub fn tz_cbc(&self, n: u8) -> TZ_CBC_R {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        TZ_CBC_R::new(((self.bits >> (n + 21)) & 1) != 0)
    }
    #[doc = "Iterator for array of:"]
    #[doc = "The interrupt enable bit for the fault handler(0-2) cycle-by-cycle mode action."]
    #[inline(always)]
    pub fn tz_cbc_iter(&self) -> impl Iterator<Item = TZ_CBC_R> + '_ {
        (0..3).map(move |n| TZ_CBC_R::new(((self.bits >> (n + 21)) & 1) != 0))
    }
    #[doc = "Bit 21 - The interrupt enable bit for the fault handler0 cycle-by-cycle mode action."]
    #[inline(always)]
    pub fn tz0_cbc(&self) -> TZ_CBC_R {
        TZ_CBC_R::new(((self.bits >> 21) & 1) != 0)
    }
    #[doc = "Bit 22 - The interrupt enable bit for the fault handler1 cycle-by-cycle mode action."]
    #[inline(always)]
    pub fn tz1_cbc(&self) -> TZ_CBC_R {
        TZ_CBC_R::new(((self.bits >> 22) & 1) != 0)
    }
    #[doc = "Bit 23 - The interrupt enable bit for the fault handler2 cycle-by-cycle mode action."]
    #[inline(always)]
    pub fn tz2_cbc(&self) -> TZ_CBC_R {
        TZ_CBC_R::new(((self.bits >> 23) & 1) != 0)
    }
    #[doc = "The interrupt enable bit for the fault handler(0-2) one-shot mode action."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `TZ0_OST` field.</div>"]
    #[inline(always)]
    pub fn tz_ost(&self, n: u8) -> TZ_OST_R {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        TZ_OST_R::new(((self.bits >> (n + 24)) & 1) != 0)
    }
    #[doc = "Iterator for array of:"]
    #[doc = "The interrupt enable bit for the fault handler(0-2) one-shot mode action."]
    #[inline(always)]
    pub fn tz_ost_iter(&self) -> impl Iterator<Item = TZ_OST_R> + '_ {
        (0..3).map(move |n| TZ_OST_R::new(((self.bits >> (n + 24)) & 1) != 0))
    }
    #[doc = "Bit 24 - The interrupt enable bit for the fault handler0 one-shot mode action."]
    #[inline(always)]
    pub fn tz0_ost(&self) -> TZ_OST_R {
        TZ_OST_R::new(((self.bits >> 24) & 1) != 0)
    }
    #[doc = "Bit 25 - The interrupt enable bit for the fault handler1 one-shot mode action."]
    #[inline(always)]
    pub fn tz1_ost(&self) -> TZ_OST_R {
        TZ_OST_R::new(((self.bits >> 25) & 1) != 0)
    }
    #[doc = "Bit 26 - The interrupt enable bit for the fault handler2 one-shot mode action."]
    #[inline(always)]
    pub fn tz2_ost(&self) -> TZ_OST_R {
        TZ_OST_R::new(((self.bits >> 26) & 1) != 0)
    }
    #[doc = "The interrupt enable bit for the capture(0-2) event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `CAP0` field.</div>"]
    #[inline(always)]
    pub fn cap(&self, n: u8) -> CAP_R {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        CAP_R::new(((self.bits >> (n + 27)) & 1) != 0)
    }
    #[doc = "Iterator for array of:"]
    #[doc = "The interrupt enable bit for the capture(0-2) event."]
    #[inline(always)]
    pub fn cap_iter(&self) -> impl Iterator<Item = CAP_R> + '_ {
        (0..3).map(move |n| CAP_R::new(((self.bits >> (n + 27)) & 1) != 0))
    }
    #[doc = "Bit 27 - The interrupt enable bit for the capture0 event."]
    #[inline(always)]
    pub fn cap0(&self) -> CAP_R {
        CAP_R::new(((self.bits >> 27) & 1) != 0)
    }
    #[doc = "Bit 28 - The interrupt enable bit for the capture1 event."]
    #[inline(always)]
    pub fn cap1(&self) -> CAP_R {
        CAP_R::new(((self.bits >> 28) & 1) != 0)
    }
    #[doc = "Bit 29 - The interrupt enable bit for the capture2 event."]
    #[inline(always)]
    pub fn cap2(&self) -> CAP_R {
        CAP_R::new(((self.bits >> 29) & 1) != 0)
    }
}
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("INT_ENA")
            .field("timer0_stop", &self.timer0_stop())
            .field("timer1_stop", &self.timer1_stop())
            .field("timer2_stop", &self.timer2_stop())
            .field("timer0_tez", &self.timer0_tez())
            .field("timer1_tez", &self.timer1_tez())
            .field("timer2_tez", &self.timer2_tez())
            .field("timer0_tep", &self.timer0_tep())
            .field("timer1_tep", &self.timer1_tep())
            .field("timer2_tep", &self.timer2_tep())
            .field("fault0", &self.fault0())
            .field("fault1", &self.fault1())
            .field("fault2", &self.fault2())
            .field("fault0_clr", &self.fault0_clr())
            .field("fault1_clr", &self.fault1_clr())
            .field("fault2_clr", &self.fault2_clr())
            .field("cmpr0_tea", &self.cmpr0_tea())
            .field("cmpr1_tea", &self.cmpr1_tea())
            .field("cmpr2_tea", &self.cmpr2_tea())
            .field("cmpr0_teb", &self.cmpr0_teb())
            .field("cmpr1_teb", &self.cmpr1_teb())
            .field("cmpr2_teb", &self.cmpr2_teb())
            .field("tz0_cbc", &self.tz0_cbc())
            .field("tz1_cbc", &self.tz1_cbc())
            .field("tz2_cbc", &self.tz2_cbc())
            .field("tz0_ost", &self.tz0_ost())
            .field("tz1_ost", &self.tz1_ost())
            .field("tz2_ost", &self.tz2_ost())
            .field("cap0", &self.cap0())
            .field("cap1", &self.cap1())
            .field("cap2", &self.cap2())
            .finish()
    }
}
impl W {
    #[doc = "The interrupt enable bit for the timer(0-2) stop event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `TIMER0_STOP` field.</div>"]
    #[inline(always)]
    pub fn timer_stop(&mut self, n: u8) -> TIMER_STOP_W<'_, INT_ENA_SPEC> {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        TIMER_STOP_W::new(self, n)
    }
    #[doc = "Bit 0 - The interrupt enable bit for the timer0 stop event."]
    #[inline(always)]
    pub fn timer0_stop(&mut self) -> TIMER_STOP_W<'_, INT_ENA_SPEC> {
        TIMER_STOP_W::new(self, 0)
    }
    #[doc = "Bit 1 - The interrupt enable bit for the timer1 stop event."]
    #[inline(always)]
    pub fn timer1_stop(&mut self) -> TIMER_STOP_W<'_, INT_ENA_SPEC> {
        TIMER_STOP_W::new(self, 1)
    }
    #[doc = "Bit 2 - The interrupt enable bit for the timer2 stop event."]
    #[inline(always)]
    pub fn timer2_stop(&mut self) -> TIMER_STOP_W<'_, INT_ENA_SPEC> {
        TIMER_STOP_W::new(self, 2)
    }
    #[doc = "The interrupt enable bit for the timer(0-2) zero event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `TIMER0_TEZ` field.</div>"]
    #[inline(always)]
    pub fn timer_tez(&mut self, n: u8) -> TIMER_TEZ_W<'_, INT_ENA_SPEC> {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        TIMER_TEZ_W::new(self, n + 3)
    }
    #[doc = "Bit 3 - The interrupt enable bit for the timer0 zero event."]
    #[inline(always)]
    pub fn timer0_tez(&mut self) -> TIMER_TEZ_W<'_, INT_ENA_SPEC> {
        TIMER_TEZ_W::new(self, 3)
    }
    #[doc = "Bit 4 - The interrupt enable bit for the timer1 zero event."]
    #[inline(always)]
    pub fn timer1_tez(&mut self) -> TIMER_TEZ_W<'_, INT_ENA_SPEC> {
        TIMER_TEZ_W::new(self, 4)
    }
    #[doc = "Bit 5 - The interrupt enable bit for the timer2 zero event."]
    #[inline(always)]
    pub fn timer2_tez(&mut self) -> TIMER_TEZ_W<'_, INT_ENA_SPEC> {
        TIMER_TEZ_W::new(self, 5)
    }
    #[doc = "The interrupt enable bit for the timer(0-2) period event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `TIMER0_TEP` field.</div>"]
    #[inline(always)]
    pub fn timer_tep(&mut self, n: u8) -> TIMER_TEP_W<'_, INT_ENA_SPEC> {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        TIMER_TEP_W::new(self, n + 6)
    }
    #[doc = "Bit 6 - The interrupt enable bit for the timer0 period event."]
    #[inline(always)]
    pub fn timer0_tep(&mut self) -> TIMER_TEP_W<'_, INT_ENA_SPEC> {
        TIMER_TEP_W::new(self, 6)
    }
    #[doc = "Bit 7 - The interrupt enable bit for the timer1 period event."]
    #[inline(always)]
    pub fn timer1_tep(&mut self) -> TIMER_TEP_W<'_, INT_ENA_SPEC> {
        TIMER_TEP_W::new(self, 7)
    }
    #[doc = "Bit 8 - The interrupt enable bit for the timer2 period event."]
    #[inline(always)]
    pub fn timer2_tep(&mut self) -> TIMER_TEP_W<'_, INT_ENA_SPEC> {
        TIMER_TEP_W::new(self, 8)
    }
    #[doc = "The interrupt enable bit for the fault(0-2) event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `FAULT0` field.</div>"]
    #[inline(always)]
    pub fn fault(&mut self, n: u8) -> FAULT_W<'_, INT_ENA_SPEC> {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        FAULT_W::new(self, n + 9)
    }
    #[doc = "Bit 9 - The interrupt enable bit for the fault0 event."]
    #[inline(always)]
    pub fn fault0(&mut self) -> FAULT_W<'_, INT_ENA_SPEC> {
        FAULT_W::new(self, 9)
    }
    #[doc = "Bit 10 - The interrupt enable bit for the fault1 event."]
    #[inline(always)]
    pub fn fault1(&mut self) -> FAULT_W<'_, INT_ENA_SPEC> {
        FAULT_W::new(self, 10)
    }
    #[doc = "Bit 11 - The interrupt enable bit for the fault2 event."]
    #[inline(always)]
    pub fn fault2(&mut self) -> FAULT_W<'_, INT_ENA_SPEC> {
        FAULT_W::new(self, 11)
    }
    #[doc = "The interrupt enable bit for the fault(0-2) clear event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `FAULT0_CLR` field.</div>"]
    #[inline(always)]
    pub fn fault_clr(&mut self, n: u8) -> FAULT_CLR_W<'_, INT_ENA_SPEC> {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        FAULT_CLR_W::new(self, n + 12)
    }
    #[doc = "Bit 12 - The interrupt enable bit for the fault0 clear event."]
    #[inline(always)]
    pub fn fault0_clr(&mut self) -> FAULT_CLR_W<'_, INT_ENA_SPEC> {
        FAULT_CLR_W::new(self, 12)
    }
    #[doc = "Bit 13 - The interrupt enable bit for the fault1 clear event."]
    #[inline(always)]
    pub fn fault1_clr(&mut self) -> FAULT_CLR_W<'_, INT_ENA_SPEC> {
        FAULT_CLR_W::new(self, 13)
    }
    #[doc = "Bit 14 - The interrupt enable bit for the fault2 clear event."]
    #[inline(always)]
    pub fn fault2_clr(&mut self) -> FAULT_CLR_W<'_, INT_ENA_SPEC> {
        FAULT_CLR_W::new(self, 14)
    }
    #[doc = "The interrupt enable bit for the operator(0-2) compare A event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `CMPR0_TEA` field.</div>"]
    #[inline(always)]
    pub fn cmpr_tea(&mut self, n: u8) -> CMPR_TEA_W<'_, INT_ENA_SPEC> {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        CMPR_TEA_W::new(self, n + 15)
    }
    #[doc = "Bit 15 - The interrupt enable bit for the operator0 compare A event."]
    #[inline(always)]
    pub fn cmpr0_tea(&mut self) -> CMPR_TEA_W<'_, INT_ENA_SPEC> {
        CMPR_TEA_W::new(self, 15)
    }
    #[doc = "Bit 16 - The interrupt enable bit for the operator1 compare A event."]
    #[inline(always)]
    pub fn cmpr1_tea(&mut self) -> CMPR_TEA_W<'_, INT_ENA_SPEC> {
        CMPR_TEA_W::new(self, 16)
    }
    #[doc = "Bit 17 - The interrupt enable bit for the operator2 compare A event."]
    #[inline(always)]
    pub fn cmpr2_tea(&mut self) -> CMPR_TEA_W<'_, INT_ENA_SPEC> {
        CMPR_TEA_W::new(self, 17)
    }
    #[doc = "The interrupt enable bit for the operator(0-2) compare B event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `CMPR0_TEB` field.</div>"]
    #[inline(always)]
    pub fn cmpr_teb(&mut self, n: u8) -> CMPR_TEB_W<'_, INT_ENA_SPEC> {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        CMPR_TEB_W::new(self, n + 18)
    }
    #[doc = "Bit 18 - The interrupt enable bit for the operator0 compare B event."]
    #[inline(always)]
    pub fn cmpr0_teb(&mut self) -> CMPR_TEB_W<'_, INT_ENA_SPEC> {
        CMPR_TEB_W::new(self, 18)
    }
    #[doc = "Bit 19 - The interrupt enable bit for the operator1 compare B event."]
    #[inline(always)]
    pub fn cmpr1_teb(&mut self) -> CMPR_TEB_W<'_, INT_ENA_SPEC> {
        CMPR_TEB_W::new(self, 19)
    }
    #[doc = "Bit 20 - The interrupt enable bit for the operator2 compare B event."]
    #[inline(always)]
    pub fn cmpr2_teb(&mut self) -> CMPR_TEB_W<'_, INT_ENA_SPEC> {
        CMPR_TEB_W::new(self, 20)
    }
    #[doc = "The interrupt enable bit for the fault handler(0-2) cycle-by-cycle mode action."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `TZ0_CBC` field.</div>"]
    #[inline(always)]
    pub fn tz_cbc(&mut self, n: u8) -> TZ_CBC_W<'_, INT_ENA_SPEC> {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        TZ_CBC_W::new(self, n + 21)
    }
    #[doc = "Bit 21 - The interrupt enable bit for the fault handler0 cycle-by-cycle mode action."]
    #[inline(always)]
    pub fn tz0_cbc(&mut self) -> TZ_CBC_W<'_, INT_ENA_SPEC> {
        TZ_CBC_W::new(self, 21)
    }
    #[doc = "Bit 22 - The interrupt enable bit for the fault handler1 cycle-by-cycle mode action."]
    #[inline(always)]
    pub fn tz1_cbc(&mut self) -> TZ_CBC_W<'_, INT_ENA_SPEC> {
        TZ_CBC_W::new(self, 22)
    }
    #[doc = "Bit 23 - The interrupt enable bit for the fault handler2 cycle-by-cycle mode action."]
    #[inline(always)]
    pub fn tz2_cbc(&mut self) -> TZ_CBC_W<'_, INT_ENA_SPEC> {
        TZ_CBC_W::new(self, 23)
    }
    #[doc = "The interrupt enable bit for the fault handler(0-2) one-shot mode action."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `TZ0_OST` field.</div>"]
    #[inline(always)]
    pub fn tz_ost(&mut self, n: u8) -> TZ_OST_W<'_, INT_ENA_SPEC> {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        TZ_OST_W::new(self, n + 24)
    }
    #[doc = "Bit 24 - The interrupt enable bit for the fault handler0 one-shot mode action."]
    #[inline(always)]
    pub fn tz0_ost(&mut self) -> TZ_OST_W<'_, INT_ENA_SPEC> {
        TZ_OST_W::new(self, 24)
    }
    #[doc = "Bit 25 - The interrupt enable bit for the fault handler1 one-shot mode action."]
    #[inline(always)]
    pub fn tz1_ost(&mut self) -> TZ_OST_W<'_, INT_ENA_SPEC> {
        TZ_OST_W::new(self, 25)
    }
    #[doc = "Bit 26 - The interrupt enable bit for the fault handler2 one-shot mode action."]
    #[inline(always)]
    pub fn tz2_ost(&mut self) -> TZ_OST_W<'_, INT_ENA_SPEC> {
        TZ_OST_W::new(self, 26)
    }
    #[doc = "The interrupt enable bit for the capture(0-2) event."]
    #[doc = ""]
    #[doc = "<div class=\"warning\">`n` is number of field in register. `n == 0` corresponds to `CAP0` field.</div>"]
    #[inline(always)]
    pub fn cap(&mut self, n: u8) -> CAP_W<'_, INT_ENA_SPEC> {
        #[allow(clippy::no_effect)]
        [(); 3][n as usize];
        CAP_W::new(self, n + 27)
    }
    #[doc = "Bit 27 - The interrupt enable bit for the capture0 event."]
    #[inline(always)]
    pub fn cap0(&mut self) -> CAP_W<'_, INT_ENA_SPEC> {
        CAP_W::new(self, 27)
    }
    #[doc = "Bit 28 - The interrupt enable bit for the capture1 event."]
    #[inline(always)]
    pub fn cap1(&mut self) -> CAP_W<'_, INT_ENA_SPEC> {
        CAP_W::new(self, 28)
    }
    #[doc = "Bit 29 - The interrupt enable bit for the capture2 event."]
    #[inline(always)]
    pub fn cap2(&mut self) -> CAP_W<'_, INT_ENA_SPEC> {
        CAP_W::new(self, 29)
    }
}
#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`int_ena::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_ena::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct INT_ENA_SPEC;
impl crate::RegisterSpec for INT_ENA_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`int_ena::R`](R) reader structure"]
impl crate::Readable for INT_ENA_SPEC {}
#[doc = "`write(|w| ..)` method takes [`int_ena::W`](W) writer structure"]
impl crate::Writable for INT_ENA_SPEC {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets INT_ENA to value 0"]
impl crate::Resettable for INT_ENA_SPEC {}