consortium-pac-imx9 0.5.0

Peripheral Access Crate for the i.MX 9 series of microcontrollers
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
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![doc = "Peripheral access API (generated using chiptool v0.1.0 (bcf538a 2026-05-18))"]
#[doc = ""]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT {
    ptr: *mut u8,
}
unsafe impl Send for LPIT {}
unsafe impl Sync for LPIT {}
impl LPIT {
    #[inline(always)]
    pub const unsafe fn from_ptr(ptr: *mut ()) -> Self {
        Self { ptr: ptr as _ }
    }
    #[inline(always)]
    pub const fn as_ptr(&self) -> *mut () {
        self.ptr as _
    }
    #[inline(always)]
    pub const fn VERID(self) -> crate::common::Reg<LPIT_VERID, crate::common::RW> {
        unsafe { crate::common::Reg::from_ptr(self.ptr.wrapping_add(0x0usize) as _) }
    }
    #[inline(always)]
    pub const fn PARAM(self) -> crate::common::Reg<LPIT_PARAM, crate::common::RW> {
        unsafe { crate::common::Reg::from_ptr(self.ptr.wrapping_add(0x04usize) as _) }
    }
    #[inline(always)]
    pub const fn MCR(self) -> crate::common::Reg<u32, crate::common::RW> {
        unsafe { crate::common::Reg::from_ptr(self.ptr.wrapping_add(0x08usize) as _) }
    }
    #[inline(always)]
    pub const fn MSR(self) -> crate::common::Reg<LPIT_MSR, crate::common::RW> {
        unsafe { crate::common::Reg::from_ptr(self.ptr.wrapping_add(0x0cusize) as _) }
    }
    #[inline(always)]
    pub const fn MIER(self) -> crate::common::Reg<LPIT_MIER, crate::common::RW> {
        unsafe { crate::common::Reg::from_ptr(self.ptr.wrapping_add(0x10usize) as _) }
    }
    #[inline(always)]
    pub const fn SETTEN(self) -> crate::common::Reg<u32, crate::common::RW> {
        unsafe { crate::common::Reg::from_ptr(self.ptr.wrapping_add(0x14usize) as _) }
    }
    #[inline(always)]
    pub const fn CLRTEN(self) -> crate::common::Reg<u32, crate::common::RW> {
        unsafe { crate::common::Reg::from_ptr(self.ptr.wrapping_add(0x18usize) as _) }
    }
    #[inline(always)]
    pub const fn CHANNEL_TVAL(self, n: usize) -> crate::common::Reg<u32, crate::common::RW> {
        assert!(n < 4usize);
        unsafe { crate::common::Reg::from_ptr(self.ptr.wrapping_add(0x20usize + n * 16usize) as _) }
    }
    #[inline(always)]
    pub const fn CHANNEL_CVAL(
        self,
        n: usize,
    ) -> crate::common::Reg<LPIT_CVAL_TMR_CUR, crate::common::RW> {
        assert!(n < 4usize);
        unsafe { crate::common::Reg::from_ptr(self.ptr.wrapping_add(0x24usize + n * 16usize) as _) }
    }
    #[inline(always)]
    pub const fn CHANNEL_TCTRL(self, n: usize) -> crate::common::Reg<u32, crate::common::RW> {
        assert!(n < 4usize);
        unsafe { crate::common::Reg::from_ptr(self.ptr.wrapping_add(0x28usize + n * 16usize) as _) }
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_CVAL_TMR_CUR(pub u32);
impl LPIT_CVAL_TMR_CUR {
    #[doc = "Current Timer Value"]
    #[must_use]
    #[inline(always)]
    pub const fn VAL(&self) -> u32 {
        let val = (self.0 >> 0usize) & 0xffff_ffff;
        val as u32
    }
    #[doc = "Current Timer Value"]
    #[inline(always)]
    pub const fn set_VAL(&mut self, val: u32) {
        self.0 = (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
    }
}
impl Default for LPIT_CVAL_TMR_CUR {
    #[inline(always)]
    fn default() -> LPIT_CVAL_TMR_CUR {
        LPIT_CVAL_TMR_CUR(0)
    }
}
impl core::fmt::Debug for LPIT_CVAL_TMR_CUR {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_CVAL_TMR_CUR")
            .field("VAL", &self.VAL())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_CVAL_TMR_CUR {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(f, "LPIT_CVAL_TMR_CUR {{ VAL: {=u32:?} }}", self.VAL())
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_MCR_DBG(pub u32);
impl LPIT_MCR_DBG {
    #[must_use]
    #[inline(always)]
    pub const fn EN(&self) -> bool {
        let val = (self.0 >> 3usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_EN(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
    }
}
impl Default for LPIT_MCR_DBG {
    #[inline(always)]
    fn default() -> LPIT_MCR_DBG {
        LPIT_MCR_DBG(0)
    }
}
impl core::fmt::Debug for LPIT_MCR_DBG {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_MCR_DBG")
            .field("EN", &self.EN())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_MCR_DBG {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(f, "LPIT_MCR_DBG {{ EN: {=bool:?} }}", self.EN())
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_MCR_DOZE(pub u32);
impl LPIT_MCR_DOZE {
    #[must_use]
    #[inline(always)]
    pub const fn EN(&self) -> bool {
        let val = (self.0 >> 2usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_EN(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
    }
}
impl Default for LPIT_MCR_DOZE {
    #[inline(always)]
    fn default() -> LPIT_MCR_DOZE {
        LPIT_MCR_DOZE(0)
    }
}
impl core::fmt::Debug for LPIT_MCR_DOZE {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_MCR_DOZE")
            .field("EN", &self.EN())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_MCR_DOZE {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(f, "LPIT_MCR_DOZE {{ EN: {=bool:?} }}", self.EN())
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_MCR_M(pub u32);
impl LPIT_MCR_M {
    #[must_use]
    #[inline(always)]
    pub const fn CEN(&self) -> bool {
        let val = (self.0 >> 0usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_CEN(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
    }
}
impl Default for LPIT_MCR_M {
    #[inline(always)]
    fn default() -> LPIT_MCR_M {
        LPIT_MCR_M(0)
    }
}
impl core::fmt::Debug for LPIT_MCR_M {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_MCR_M")
            .field("CEN", &self.CEN())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_MCR_M {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(f, "LPIT_MCR_M {{ CEN: {=bool:?} }}", self.CEN())
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_MCR_SW(pub u32);
impl LPIT_MCR_SW {
    #[must_use]
    #[inline(always)]
    pub const fn RST(&self) -> bool {
        let val = (self.0 >> 1usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_RST(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
    }
}
impl Default for LPIT_MCR_SW {
    #[inline(always)]
    fn default() -> LPIT_MCR_SW {
        LPIT_MCR_SW(0)
    }
}
impl core::fmt::Debug for LPIT_MCR_SW {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_MCR_SW")
            .field("RST", &self.RST())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_MCR_SW {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(f, "LPIT_MCR_SW {{ RST: {=bool:?} }}", self.RST())
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_MIER(pub u32);
impl LPIT_MIER {
    #[must_use]
    #[inline(always)]
    pub const fn TIE0(&self) -> bool {
        let val = (self.0 >> 0usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_TIE0(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
    }
    #[must_use]
    #[inline(always)]
    pub const fn TIE1(&self) -> bool {
        let val = (self.0 >> 1usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_TIE1(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
    }
    #[must_use]
    #[inline(always)]
    pub const fn TIE2(&self) -> bool {
        let val = (self.0 >> 2usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_TIE2(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
    }
    #[must_use]
    #[inline(always)]
    pub const fn TIE3(&self) -> bool {
        let val = (self.0 >> 3usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_TIE3(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
    }
}
impl Default for LPIT_MIER {
    #[inline(always)]
    fn default() -> LPIT_MIER {
        LPIT_MIER(0)
    }
}
impl core::fmt::Debug for LPIT_MIER {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_MIER")
            .field("TIE0", &self.TIE0())
            .field("TIE1", &self.TIE1())
            .field("TIE2", &self.TIE2())
            .field("TIE3", &self.TIE3())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_MIER {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(
            f,
            "LPIT_MIER {{ TIE0: {=bool:?}, TIE1: {=bool:?}, TIE2: {=bool:?}, TIE3: {=bool:?} }}",
            self.TIE0(),
            self.TIE1(),
            self.TIE2(),
            self.TIE3()
        )
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_MSR(pub u32);
impl LPIT_MSR {
    #[must_use]
    #[inline(always)]
    pub const fn TIF0(&self) -> bool {
        let val = (self.0 >> 0usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_TIF0(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
    }
    #[must_use]
    #[inline(always)]
    pub const fn TIF1(&self) -> bool {
        let val = (self.0 >> 1usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_TIF1(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
    }
    #[must_use]
    #[inline(always)]
    pub const fn TIF2(&self) -> bool {
        let val = (self.0 >> 2usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_TIF2(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
    }
    #[must_use]
    #[inline(always)]
    pub const fn TIF3(&self) -> bool {
        let val = (self.0 >> 3usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_TIF3(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
    }
}
impl Default for LPIT_MSR {
    #[inline(always)]
    fn default() -> LPIT_MSR {
        LPIT_MSR(0)
    }
}
impl core::fmt::Debug for LPIT_MSR {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_MSR")
            .field("TIF0", &self.TIF0())
            .field("TIF1", &self.TIF1())
            .field("TIF2", &self.TIF2())
            .field("TIF3", &self.TIF3())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_MSR {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(
            f,
            "LPIT_MSR {{ TIF0: {=bool:?}, TIF1: {=bool:?}, TIF2: {=bool:?}, TIF3: {=bool:?} }}",
            self.TIF0(),
            self.TIF1(),
            self.TIF2(),
            self.TIF3()
        )
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_PARAM(pub u32);
impl LPIT_PARAM {
    #[doc = "Number of Timer Channels"]
    #[must_use]
    #[inline(always)]
    pub const fn CHANNEL(&self) -> u8 {
        let val = (self.0 >> 0usize) & 0xff;
        val as u8
    }
    #[doc = "Number of Timer Channels"]
    #[inline(always)]
    pub const fn set_CHANNEL(&mut self, val: u8) {
        self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize);
    }
}
impl Default for LPIT_PARAM {
    #[inline(always)]
    fn default() -> LPIT_PARAM {
        LPIT_PARAM(0)
    }
}
impl core::fmt::Debug for LPIT_PARAM {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_PARAM")
            .field("CHANNEL", &self.CHANNEL())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_PARAM {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(f, "LPIT_PARAM {{ CHANNEL: {=u8:?} }}", self.CHANNEL())
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_PARAM_EXT(pub u32);
impl LPIT_PARAM_EXT {
    #[doc = "Number of Timer Channels"]
    #[must_use]
    #[inline(always)]
    pub const fn TRIG(&self) -> u8 {
        let val = (self.0 >> 8usize) & 0xff;
        val as u8
    }
    #[doc = "Number of Timer Channels"]
    #[inline(always)]
    pub const fn set_TRIG(&mut self, val: u8) {
        self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize);
    }
}
impl Default for LPIT_PARAM_EXT {
    #[inline(always)]
    fn default() -> LPIT_PARAM_EXT {
        LPIT_PARAM_EXT(0)
    }
}
impl core::fmt::Debug for LPIT_PARAM_EXT {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_PARAM_EXT")
            .field("TRIG", &self.TRIG())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_PARAM_EXT {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(f, "LPIT_PARAM_EXT {{ TRIG: {=u8:?} }}", self.TRIG())
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_TCTRL(pub u32);
impl LPIT_TCTRL {
    #[must_use]
    #[inline(always)]
    pub const fn CHAIN(&self) -> bool {
        let val = (self.0 >> 1usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_CHAIN(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
    }
    #[must_use]
    #[inline(always)]
    pub const fn MODE(&self) -> u8 {
        let val = (self.0 >> 2usize) & 0x03;
        val as u8
    }
    #[inline(always)]
    pub const fn set_MODE(&mut self, val: u8) {
        self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize);
    }
    #[must_use]
    #[inline(always)]
    pub const fn TSOT(&self) -> bool {
        let val = (self.0 >> 16usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_TSOT(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
    }
    #[must_use]
    #[inline(always)]
    pub const fn TSOI(&self) -> bool {
        let val = (self.0 >> 17usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_TSOI(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize);
    }
    #[must_use]
    #[inline(always)]
    pub const fn TROT(&self) -> bool {
        let val = (self.0 >> 18usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_TROT(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize);
    }
}
impl Default for LPIT_TCTRL {
    #[inline(always)]
    fn default() -> LPIT_TCTRL {
        LPIT_TCTRL(0)
    }
}
impl core::fmt::Debug for LPIT_TCTRL {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_TCTRL")
            .field("CHAIN", &self.CHAIN())
            .field("MODE", &self.MODE())
            .field("TSOT", &self.TSOT())
            .field("TSOI", &self.TSOI())
            .field("TROT", &self.TROT())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_TCTRL {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(
            f,
            "LPIT_TCTRL {{ CHAIN: {=bool:?}, MODE: {=u8:?}, TSOT: {=bool:?}, TSOI: {=bool:?}, TROT: {=bool:?} }}",
            self.CHAIN(),
            self.MODE(),
            self.TSOT(),
            self.TSOI(),
            self.TROT()
        )
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_TCTRL_T(pub u32);
impl LPIT_TCTRL_T {
    #[must_use]
    #[inline(always)]
    pub const fn EN(&self) -> bool {
        let val = (self.0 >> 0usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_EN(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
    }
}
impl Default for LPIT_TCTRL_T {
    #[inline(always)]
    fn default() -> LPIT_TCTRL_T {
        LPIT_TCTRL_T(0)
    }
}
impl core::fmt::Debug for LPIT_TCTRL_T {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_TCTRL_T")
            .field("EN", &self.EN())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_TCTRL_T {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(f, "LPIT_TCTRL_T {{ EN: {=bool:?} }}", self.EN())
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_TCTRL_TRG(pub u32);
impl LPIT_TCTRL_TRG {
    #[must_use]
    #[inline(always)]
    pub const fn SRC(&self) -> bool {
        let val = (self.0 >> 23usize) & 0x01;
        val != 0
    }
    #[inline(always)]
    pub const fn set_SRC(&mut self, val: bool) {
        self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
    }
    #[must_use]
    #[inline(always)]
    pub const fn SEL(&self) -> u8 {
        let val = (self.0 >> 24usize) & 0x0f;
        val as u8
    }
    #[inline(always)]
    pub const fn set_SEL(&mut self, val: u8) {
        self.0 = (self.0 & !(0x0f << 24usize)) | (((val as u32) & 0x0f) << 24usize);
    }
}
impl Default for LPIT_TCTRL_TRG {
    #[inline(always)]
    fn default() -> LPIT_TCTRL_TRG {
        LPIT_TCTRL_TRG(0)
    }
}
impl core::fmt::Debug for LPIT_TCTRL_TRG {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_TCTRL_TRG")
            .field("SRC", &self.SRC())
            .field("SEL", &self.SEL())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_TCTRL_TRG {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(
            f,
            "LPIT_TCTRL_TRG {{ SRC: {=bool:?}, SEL: {=u8:?} }}",
            self.SRC(),
            self.SEL()
        )
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_TVAL_TMR(pub u32);
impl LPIT_TVAL_TMR {
    #[must_use]
    #[inline(always)]
    pub const fn VAL(&self) -> u32 {
        let val = (self.0 >> 0usize) & 0xffff_ffff;
        val as u32
    }
    #[inline(always)]
    pub const fn set_VAL(&mut self, val: u32) {
        self.0 = (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize);
    }
}
impl Default for LPIT_TVAL_TMR {
    #[inline(always)]
    fn default() -> LPIT_TVAL_TMR {
        LPIT_TVAL_TMR(0)
    }
}
impl core::fmt::Debug for LPIT_TVAL_TMR {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_TVAL_TMR")
            .field("VAL", &self.VAL())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_TVAL_TMR {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(f, "LPIT_TVAL_TMR {{ VAL: {=u32:?} }}", self.VAL())
    }
}
#[doc = ""]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct LPIT_VERID(pub u32);
impl LPIT_VERID {
    #[doc = "Feature Number"]
    #[must_use]
    #[inline(always)]
    pub const fn FEATURE(&self) -> u16 {
        let val = (self.0 >> 0usize) & 0xffff;
        val as u16
    }
    #[doc = "Feature Number"]
    #[inline(always)]
    pub const fn set_FEATURE(&mut self, val: u16) {
        self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize);
    }
    #[doc = "Feature Number"]
    #[must_use]
    #[inline(always)]
    pub const fn MINOR(&self) -> u8 {
        let val = (self.0 >> 16usize) & 0xff;
        val as u8
    }
    #[doc = "Feature Number"]
    #[inline(always)]
    pub const fn set_MINOR(&mut self, val: u8) {
        self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize);
    }
    #[doc = "Minor Version Number"]
    #[must_use]
    #[inline(always)]
    pub const fn MAJOR(&self) -> u8 {
        let val = (self.0 >> 24usize) & 0xff;
        val as u8
    }
    #[doc = "Minor Version Number"]
    #[inline(always)]
    pub const fn set_MAJOR(&mut self, val: u8) {
        self.0 = (self.0 & !(0xff << 24usize)) | (((val as u32) & 0xff) << 24usize);
    }
}
impl Default for LPIT_VERID {
    #[inline(always)]
    fn default() -> LPIT_VERID {
        LPIT_VERID(0)
    }
}
impl core::fmt::Debug for LPIT_VERID {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("LPIT_VERID")
            .field("FEATURE", &self.FEATURE())
            .field("MINOR", &self.MINOR())
            .field("MAJOR", &self.MAJOR())
            .finish()
    }
}
#[cfg(feature = "defmt")]
impl defmt::Format for LPIT_VERID {
    fn format(&self, f: defmt::Formatter) {
        defmt::write!(
            f,
            "LPIT_VERID {{ FEATURE: {=u16:?}, MINOR: {=u8:?}, MAJOR: {=u8:?} }}",
            self.FEATURE(),
            self.MINOR(),
            self.MAJOR()
        )
    }
}