Skip to main content

wip_s32k144/
lib.rs

1#![doc = "Peripheral access API for S32K144 microcontrollers (generated using svd2rust v0.17.0)\n\nYou can find an overview of the API [here].\n\n[here]: https://docs.rs/svd2rust/0.17.0/svd2rust/#peripheral-api"]
2#![deny(const_err)]
3#![deny(dead_code)]
4#![deny(improper_ctypes)]
5#![deny(legacy_directory_ownership)]
6#![deny(missing_docs)]
7#![deny(no_mangle_generic_items)]
8#![deny(non_shorthand_field_patterns)]
9#![deny(overflowing_literals)]
10#![deny(path_statements)]
11#![deny(patterns_in_fns_without_body)]
12#![deny(plugin_as_library)]
13#![deny(private_in_public)]
14#![deny(safe_extern_statics)]
15#![deny(unconditional_recursion)]
16#![deny(unions_with_drop_fields)]
17#![deny(unused_allocation)]
18#![deny(unused_comparisons)]
19#![deny(unused_parens)]
20#![deny(while_true)]
21#![allow(non_camel_case_types)]
22#![allow(non_snake_case)]
23#![no_std]
24extern crate bare_metal;
25extern crate cortex_m;
26#[cfg(feature = "rt")]
27extern crate cortex_m_rt;
28extern crate vcell;
29use core::marker::PhantomData;
30use core::ops::Deref;
31#[doc = r"Number available in the NVIC for configuring priority"]
32pub const NVIC_PRIO_BITS: u8 = 4;
33#[cfg(feature = "rt")]
34extern "C" {
35    fn DMA0();
36    fn DMA1();
37    fn DMA2();
38    fn DMA3();
39    fn DMA4();
40    fn DMA5();
41    fn DMA6();
42    fn DMA7();
43    fn DMA8();
44    fn DMA9();
45    fn DMA10();
46    fn DMA11();
47    fn DMA12();
48    fn DMA13();
49    fn DMA14();
50    fn DMA15();
51    fn DMA_ERROR();
52    fn MCM();
53    fn FTFC();
54    fn READ_COLLISION();
55    fn LVD_LVW();
56    fn FTFC_FAULT();
57    fn WDOG_EWM();
58    fn RCM();
59    fn LPI2C0_MASTER();
60    fn LPI2C0_SLAVE();
61    fn LPSPI0();
62    fn LPSPI1();
63    fn LPSPI2();
64    fn LPUART0_RXTX();
65    fn LPUART1_RXTX();
66    fn LPUART2_RXTX();
67    fn ADC0();
68    fn ADC1();
69    fn CMP0();
70    fn ERM_SINGLE_FAULT();
71    fn ERM_DOUBLE_FAULT();
72    fn RTC();
73    fn RTC_SECONDS();
74    fn LPIT0_CH0();
75    fn LPIT0_CH1();
76    fn LPIT0_CH2();
77    fn LPIT0_CH3();
78    fn PDB0();
79    fn SCG();
80    fn LPTMR0();
81    fn PORTA();
82    fn PORTB();
83    fn PORTC();
84    fn PORTD();
85    fn PORTE();
86    fn PDB1();
87    fn FLEXIO();
88    fn CAN0_ORED();
89    fn CAN0_ERROR();
90    fn CAN0_WAKE_UP();
91    fn CAN0_ORED_0_15_MB();
92    fn CAN0_ORED_16_31_MB();
93    fn CAN1_ORED();
94    fn CAN1_ERROR();
95    fn CAN1_ORED_0_15_MB();
96    fn CAN2_ORED();
97    fn CAN2_ERROR();
98    fn CAN2_ORED_0_15_MB();
99    fn FTM0_CH0_CH1();
100    fn FTM0_CH2_CH3();
101    fn FTM0_CH4_CH5();
102    fn FTM0_CH6_CH7();
103    fn FTM0_FAULT();
104    fn FTM0_OVF_RELOAD();
105    fn FTM1_CH0_CH1();
106    fn FTM1_CH2_CH3();
107    fn FTM1_CH4_CH5();
108    fn FTM1_CH6_CH7();
109    fn FTM1_FAULT();
110    fn FTM1_OVF_RELOAD();
111    fn FTM2_CH0_CH1();
112    fn FTM2_CH2_CH3();
113    fn FTM2_CH4_CH5();
114    fn FTM2_CH6_CH7();
115    fn FTM2_FAULT();
116    fn FTM2_OVF_RELOAD();
117    fn FTM3_CH0_CH1();
118    fn FTM3_CH2_CH3();
119    fn FTM3_CH4_CH5();
120    fn FTM3_CH6_CH7();
121    fn FTM3_FAULT();
122    fn FTM3_OVF_RELOAD();
123}
124#[doc(hidden)]
125pub union Vector {
126    _handler: unsafe extern "C" fn(),
127    _reserved: u32,
128}
129#[cfg(feature = "rt")]
130#[doc(hidden)]
131#[link_section = ".vector_table.interrupts"]
132#[no_mangle]
133pub static __INTERRUPTS: [Vector; 123] = [
134    Vector { _handler: DMA0 },
135    Vector { _handler: DMA1 },
136    Vector { _handler: DMA2 },
137    Vector { _handler: DMA3 },
138    Vector { _handler: DMA4 },
139    Vector { _handler: DMA5 },
140    Vector { _handler: DMA6 },
141    Vector { _handler: DMA7 },
142    Vector { _handler: DMA8 },
143    Vector { _handler: DMA9 },
144    Vector { _handler: DMA10 },
145    Vector { _handler: DMA11 },
146    Vector { _handler: DMA12 },
147    Vector { _handler: DMA13 },
148    Vector { _handler: DMA14 },
149    Vector { _handler: DMA15 },
150    Vector { _handler: DMA_ERROR },
151    Vector { _handler: MCM },
152    Vector { _handler: FTFC },
153    Vector { _handler: READ_COLLISION },
154    Vector { _handler: LVD_LVW },
155    Vector { _handler: FTFC_FAULT },
156    Vector { _handler: WDOG_EWM },
157    Vector { _handler: RCM },
158    Vector { _handler: LPI2C0_MASTER },
159    Vector { _handler: LPI2C0_SLAVE },
160    Vector { _handler: LPSPI0 },
161    Vector { _handler: LPSPI1 },
162    Vector { _handler: LPSPI2 },
163    Vector { _reserved: 0 },
164    Vector { _reserved: 0 },
165    Vector { _handler: LPUART0_RXTX },
166    Vector { _reserved: 0 },
167    Vector { _handler: LPUART1_RXTX },
168    Vector { _reserved: 0 },
169    Vector { _handler: LPUART2_RXTX },
170    Vector { _reserved: 0 },
171    Vector { _reserved: 0 },
172    Vector { _reserved: 0 },
173    Vector { _handler: ADC0 },
174    Vector { _handler: ADC1 },
175    Vector { _handler: CMP0 },
176    Vector { _reserved: 0 },
177    Vector { _reserved: 0 },
178    Vector { _handler: ERM_SINGLE_FAULT },
179    Vector { _handler: ERM_DOUBLE_FAULT },
180    Vector { _handler: RTC },
181    Vector { _handler: RTC_SECONDS },
182    Vector { _handler: LPIT0_CH0 },
183    Vector { _handler: LPIT0_CH1 },
184    Vector { _handler: LPIT0_CH2 },
185    Vector { _handler: LPIT0_CH3 },
186    Vector { _handler: PDB0 },
187    Vector { _reserved: 0 },
188    Vector { _reserved: 0 },
189    Vector { _reserved: 0 },
190    Vector { _reserved: 0 },
191    Vector { _handler: SCG },
192    Vector { _handler: LPTMR0 },
193    Vector { _handler: PORTA },
194    Vector { _handler: PORTB },
195    Vector { _handler: PORTC },
196    Vector { _handler: PORTD },
197    Vector { _handler: PORTE },
198    Vector { _reserved: 0 },
199    Vector { _reserved: 0 },
200    Vector { _reserved: 0 },
201    Vector { _reserved: 0 },
202    Vector { _handler: PDB1 },
203    Vector { _handler: FLEXIO },
204    Vector { _reserved: 0 },
205    Vector { _reserved: 0 },
206    Vector { _reserved: 0 },
207    Vector { _reserved: 0 },
208    Vector { _reserved: 0 },
209    Vector { _reserved: 0 },
210    Vector { _reserved: 0 },
211    Vector { _reserved: 0 },
212    Vector { _handler: CAN0_ORED },
213    Vector { _handler: CAN0_ERROR },
214    Vector { _handler: CAN0_WAKE_UP },
215    Vector { _handler: CAN0_ORED_0_15_MB },
216    Vector { _handler: CAN0_ORED_16_31_MB },
217    Vector { _reserved: 0 },
218    Vector { _reserved: 0 },
219    Vector { _handler: CAN1_ORED },
220    Vector { _handler: CAN1_ERROR },
221    Vector { _reserved: 0 },
222    Vector { _handler: CAN1_ORED_0_15_MB },
223    Vector { _reserved: 0 },
224    Vector { _reserved: 0 },
225    Vector { _reserved: 0 },
226    Vector { _handler: CAN2_ORED },
227    Vector { _handler: CAN2_ERROR },
228    Vector { _reserved: 0 },
229    Vector { _handler: CAN2_ORED_0_15_MB },
230    Vector { _reserved: 0 },
231    Vector { _reserved: 0 },
232    Vector { _reserved: 0 },
233    Vector { _handler: FTM0_CH0_CH1 },
234    Vector { _handler: FTM0_CH2_CH3 },
235    Vector { _handler: FTM0_CH4_CH5 },
236    Vector { _handler: FTM0_CH6_CH7 },
237    Vector { _handler: FTM0_FAULT },
238    Vector { _handler: FTM0_OVF_RELOAD },
239    Vector { _handler: FTM1_CH0_CH1 },
240    Vector { _handler: FTM1_CH2_CH3 },
241    Vector { _handler: FTM1_CH4_CH5 },
242    Vector { _handler: FTM1_CH6_CH7 },
243    Vector { _handler: FTM1_FAULT },
244    Vector { _handler: FTM1_OVF_RELOAD },
245    Vector { _handler: FTM2_CH0_CH1 },
246    Vector { _handler: FTM2_CH2_CH3 },
247    Vector { _handler: FTM2_CH4_CH5 },
248    Vector { _handler: FTM2_CH6_CH7 },
249    Vector { _handler: FTM2_FAULT },
250    Vector { _handler: FTM2_OVF_RELOAD },
251    Vector { _handler: FTM3_CH0_CH1 },
252    Vector { _handler: FTM3_CH2_CH3 },
253    Vector { _handler: FTM3_CH4_CH5 },
254    Vector { _handler: FTM3_CH6_CH7 },
255    Vector { _handler: FTM3_FAULT },
256    Vector { _handler: FTM3_OVF_RELOAD },
257];
258#[doc = r"Enumeration of all the interrupts"]
259#[derive(Copy, Clone, Debug)]
260#[repr(u8)]
261pub enum Interrupt {
262    #[doc = "0 - DMA0"]
263    DMA0 = 0,
264    #[doc = "1 - DMA1"]
265    DMA1 = 1,
266    #[doc = "2 - DMA2"]
267    DMA2 = 2,
268    #[doc = "3 - DMA3"]
269    DMA3 = 3,
270    #[doc = "4 - DMA4"]
271    DMA4 = 4,
272    #[doc = "5 - DMA5"]
273    DMA5 = 5,
274    #[doc = "6 - DMA6"]
275    DMA6 = 6,
276    #[doc = "7 - DMA7"]
277    DMA7 = 7,
278    #[doc = "8 - DMA8"]
279    DMA8 = 8,
280    #[doc = "9 - DMA9"]
281    DMA9 = 9,
282    #[doc = "10 - DMA10"]
283    DMA10 = 10,
284    #[doc = "11 - DMA11"]
285    DMA11 = 11,
286    #[doc = "12 - DMA12"]
287    DMA12 = 12,
288    #[doc = "13 - DMA13"]
289    DMA13 = 13,
290    #[doc = "14 - DMA14"]
291    DMA14 = 14,
292    #[doc = "15 - DMA15"]
293    DMA15 = 15,
294    #[doc = "16 - DMA_Error"]
295    DMA_ERROR = 16,
296    #[doc = "17 - MCM"]
297    MCM = 17,
298    #[doc = "18 - FTFC"]
299    FTFC = 18,
300    #[doc = "19 - Read_Collision"]
301    READ_COLLISION = 19,
302    #[doc = "20 - LVD_LVW"]
303    LVD_LVW = 20,
304    #[doc = "21 - FTFC_Fault"]
305    FTFC_FAULT = 21,
306    #[doc = "22 - WDOG_EWM"]
307    WDOG_EWM = 22,
308    #[doc = "23 - RCM"]
309    RCM = 23,
310    #[doc = "24 - LPI2C0_Master"]
311    LPI2C0_MASTER = 24,
312    #[doc = "25 - LPI2C0_Slave"]
313    LPI2C0_SLAVE = 25,
314    #[doc = "26 - LPSPI0"]
315    LPSPI0 = 26,
316    #[doc = "27 - LPSPI1"]
317    LPSPI1 = 27,
318    #[doc = "28 - LPSPI2"]
319    LPSPI2 = 28,
320    #[doc = "31 - LPUART0_RxTx"]
321    LPUART0_RXTX = 31,
322    #[doc = "33 - LPUART1_RxTx"]
323    LPUART1_RXTX = 33,
324    #[doc = "35 - LPUART2_RxTx"]
325    LPUART2_RXTX = 35,
326    #[doc = "39 - ADC0"]
327    ADC0 = 39,
328    #[doc = "40 - ADC1"]
329    ADC1 = 40,
330    #[doc = "41 - CMP0"]
331    CMP0 = 41,
332    #[doc = "44 - ERM_single_fault"]
333    ERM_SINGLE_FAULT = 44,
334    #[doc = "45 - ERM_double_fault"]
335    ERM_DOUBLE_FAULT = 45,
336    #[doc = "46 - RTC"]
337    RTC = 46,
338    #[doc = "47 - RTC_Seconds"]
339    RTC_SECONDS = 47,
340    #[doc = "48 - LPIT0_Ch0"]
341    LPIT0_CH0 = 48,
342    #[doc = "49 - LPIT0_Ch1"]
343    LPIT0_CH1 = 49,
344    #[doc = "50 - LPIT0_Ch2"]
345    LPIT0_CH2 = 50,
346    #[doc = "51 - LPIT0_Ch3"]
347    LPIT0_CH3 = 51,
348    #[doc = "52 - PDB0"]
349    PDB0 = 52,
350    #[doc = "57 - SCG"]
351    SCG = 57,
352    #[doc = "58 - LPTMR0"]
353    LPTMR0 = 58,
354    #[doc = "59 - PORTA"]
355    PORTA = 59,
356    #[doc = "60 - PORTB"]
357    PORTB = 60,
358    #[doc = "61 - PORTC"]
359    PORTC = 61,
360    #[doc = "62 - PORTD"]
361    PORTD = 62,
362    #[doc = "63 - PORTE"]
363    PORTE = 63,
364    #[doc = "68 - PDB1"]
365    PDB1 = 68,
366    #[doc = "69 - FLEXIO"]
367    FLEXIO = 69,
368    #[doc = "78 - CAN0_ORed"]
369    CAN0_ORED = 78,
370    #[doc = "79 - CAN0_Error"]
371    CAN0_ERROR = 79,
372    #[doc = "80 - CAN0_Wake_Up"]
373    CAN0_WAKE_UP = 80,
374    #[doc = "81 - CAN0_ORed_0_15_MB"]
375    CAN0_ORED_0_15_MB = 81,
376    #[doc = "82 - CAN0_ORed_16_31_MB"]
377    CAN0_ORED_16_31_MB = 82,
378    #[doc = "85 - CAN1_ORed"]
379    CAN1_ORED = 85,
380    #[doc = "86 - CAN1_Error"]
381    CAN1_ERROR = 86,
382    #[doc = "88 - CAN1_ORed_0_15_MB"]
383    CAN1_ORED_0_15_MB = 88,
384    #[doc = "92 - CAN2_ORed"]
385    CAN2_ORED = 92,
386    #[doc = "93 - CAN2_Error"]
387    CAN2_ERROR = 93,
388    #[doc = "95 - CAN2_ORed_0_15_MB"]
389    CAN2_ORED_0_15_MB = 95,
390    #[doc = "99 - FTM0_Ch0_Ch1"]
391    FTM0_CH0_CH1 = 99,
392    #[doc = "100 - FTM0_Ch2_Ch3"]
393    FTM0_CH2_CH3 = 100,
394    #[doc = "101 - FTM0_Ch4_Ch5"]
395    FTM0_CH4_CH5 = 101,
396    #[doc = "102 - FTM0_Ch6_Ch7"]
397    FTM0_CH6_CH7 = 102,
398    #[doc = "103 - FTM0_Fault"]
399    FTM0_FAULT = 103,
400    #[doc = "104 - FTM0_Ovf_Reload"]
401    FTM0_OVF_RELOAD = 104,
402    #[doc = "105 - FTM1_Ch0_Ch1"]
403    FTM1_CH0_CH1 = 105,
404    #[doc = "106 - FTM1_Ch2_Ch3"]
405    FTM1_CH2_CH3 = 106,
406    #[doc = "107 - FTM1_Ch4_Ch5"]
407    FTM1_CH4_CH5 = 107,
408    #[doc = "108 - FTM1_Ch6_Ch7"]
409    FTM1_CH6_CH7 = 108,
410    #[doc = "109 - FTM1_Fault"]
411    FTM1_FAULT = 109,
412    #[doc = "110 - FTM1_Ovf_Reload"]
413    FTM1_OVF_RELOAD = 110,
414    #[doc = "111 - FTM2_Ch0_Ch1"]
415    FTM2_CH0_CH1 = 111,
416    #[doc = "112 - FTM2_Ch2_Ch3"]
417    FTM2_CH2_CH3 = 112,
418    #[doc = "113 - FTM2_Ch4_Ch5"]
419    FTM2_CH4_CH5 = 113,
420    #[doc = "114 - FTM2_Ch6_Ch7"]
421    FTM2_CH6_CH7 = 114,
422    #[doc = "115 - FTM2_Fault"]
423    FTM2_FAULT = 115,
424    #[doc = "116 - FTM2_Ovf_Reload"]
425    FTM2_OVF_RELOAD = 116,
426    #[doc = "117 - FTM3_Ch0_Ch1"]
427    FTM3_CH0_CH1 = 117,
428    #[doc = "118 - FTM3_Ch2_Ch3"]
429    FTM3_CH2_CH3 = 118,
430    #[doc = "119 - FTM3_Ch4_Ch5"]
431    FTM3_CH4_CH5 = 119,
432    #[doc = "120 - FTM3_Ch6_Ch7"]
433    FTM3_CH6_CH7 = 120,
434    #[doc = "121 - FTM3_Fault"]
435    FTM3_FAULT = 121,
436    #[doc = "122 - FTM3_Ovf_Reload"]
437    FTM3_OVF_RELOAD = 122,
438}
439unsafe impl bare_metal::Nr for Interrupt {
440    #[inline(always)]
441    fn nr(&self) -> u8 {
442        *self as u8
443    }
444}
445#[cfg(feature = "rt")]
446pub use self::Interrupt as interrupt;
447pub use cortex_m::peripheral::Peripherals as CorePeripherals;
448pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, FPU, ITM, MPU, NVIC, SCB, SYST, TPIU};
449#[cfg(feature = "rt")]
450pub use cortex_m_rt::interrupt;
451#[allow(unused_imports)]
452use generic::*;
453#[doc = r"Common register and bit access and modify traits"]
454pub mod generic;
455#[doc = "CSE_PRAM"]
456pub struct CSE_PRAM {
457    _marker: PhantomData<*const ()>,
458}
459unsafe impl Send for CSE_PRAM {}
460impl CSE_PRAM {
461    #[doc = r"Returns a pointer to the register block"]
462    #[inline(always)]
463    pub const fn ptr() -> *const cse_pram::RegisterBlock {
464        0x1400_1000 as *const _
465    }
466}
467impl Deref for CSE_PRAM {
468    type Target = cse_pram::RegisterBlock;
469    #[inline(always)]
470    fn deref(&self) -> &Self::Target {
471        unsafe { &*CSE_PRAM::ptr() }
472    }
473}
474#[doc = "CSE_PRAM"]
475pub mod cse_pram;
476#[doc = "AIPS-Lite Bridge"]
477pub struct AIPS {
478    _marker: PhantomData<*const ()>,
479}
480unsafe impl Send for AIPS {}
481impl AIPS {
482    #[doc = r"Returns a pointer to the register block"]
483    #[inline(always)]
484    pub const fn ptr() -> *const aips::RegisterBlock {
485        0x4000_0000 as *const _
486    }
487}
488impl Deref for AIPS {
489    type Target = aips::RegisterBlock;
490    #[inline(always)]
491    fn deref(&self) -> &Self::Target {
492        unsafe { &*AIPS::ptr() }
493    }
494}
495#[doc = "AIPS-Lite Bridge"]
496pub mod aips;
497#[doc = "MSCM"]
498pub struct MSCM {
499    _marker: PhantomData<*const ()>,
500}
501unsafe impl Send for MSCM {}
502impl MSCM {
503    #[doc = r"Returns a pointer to the register block"]
504    #[inline(always)]
505    pub const fn ptr() -> *const mscm::RegisterBlock {
506        0x4000_1000 as *const _
507    }
508}
509impl Deref for MSCM {
510    type Target = mscm::RegisterBlock;
511    #[inline(always)]
512    fn deref(&self) -> &Self::Target {
513        unsafe { &*MSCM::ptr() }
514    }
515}
516#[doc = "MSCM"]
517pub mod mscm;
518#[doc = "Enhanced Direct Memory Access"]
519pub struct DMA {
520    _marker: PhantomData<*const ()>,
521}
522unsafe impl Send for DMA {}
523impl DMA {
524    #[doc = r"Returns a pointer to the register block"]
525    #[inline(always)]
526    pub const fn ptr() -> *const dma::RegisterBlock {
527        0x4000_8000 as *const _
528    }
529}
530impl Deref for DMA {
531    type Target = dma::RegisterBlock;
532    #[inline(always)]
533    fn deref(&self) -> &Self::Target {
534        unsafe { &*DMA::ptr() }
535    }
536}
537#[doc = "Enhanced Direct Memory Access"]
538pub mod dma;
539#[doc = "ERM"]
540pub struct ERM {
541    _marker: PhantomData<*const ()>,
542}
543unsafe impl Send for ERM {}
544impl ERM {
545    #[doc = r"Returns a pointer to the register block"]
546    #[inline(always)]
547    pub const fn ptr() -> *const erm::RegisterBlock {
548        0x4001_8000 as *const _
549    }
550}
551impl Deref for ERM {
552    type Target = erm::RegisterBlock;
553    #[inline(always)]
554    fn deref(&self) -> &Self::Target {
555        unsafe { &*ERM::ptr() }
556    }
557}
558#[doc = "ERM"]
559pub mod erm;
560#[doc = "Error Injection Module"]
561pub struct EIM {
562    _marker: PhantomData<*const ()>,
563}
564unsafe impl Send for EIM {}
565impl EIM {
566    #[doc = r"Returns a pointer to the register block"]
567    #[inline(always)]
568    pub const fn ptr() -> *const eim::RegisterBlock {
569        0x4001_9000 as *const _
570    }
571}
572impl Deref for EIM {
573    type Target = eim::RegisterBlock;
574    #[inline(always)]
575    fn deref(&self) -> &Self::Target {
576        unsafe { &*EIM::ptr() }
577    }
578}
579#[doc = "Error Injection Module"]
580pub mod eim;
581#[doc = "FTFC"]
582pub struct FTFC {
583    _marker: PhantomData<*const ()>,
584}
585unsafe impl Send for FTFC {}
586impl FTFC {
587    #[doc = r"Returns a pointer to the register block"]
588    #[inline(always)]
589    pub const fn ptr() -> *const ftfc::RegisterBlock {
590        0x4002_0000 as *const _
591    }
592}
593impl Deref for FTFC {
594    type Target = ftfc::RegisterBlock;
595    #[inline(always)]
596    fn deref(&self) -> &Self::Target {
597        unsafe { &*FTFC::ptr() }
598    }
599}
600#[doc = "FTFC"]
601pub mod ftfc;
602#[doc = "DMA channel multiplexor"]
603pub struct DMAMUX {
604    _marker: PhantomData<*const ()>,
605}
606unsafe impl Send for DMAMUX {}
607impl DMAMUX {
608    #[doc = r"Returns a pointer to the register block"]
609    #[inline(always)]
610    pub const fn ptr() -> *const dmamux::RegisterBlock {
611        0x4002_1000 as *const _
612    }
613}
614impl Deref for DMAMUX {
615    type Target = dmamux::RegisterBlock;
616    #[inline(always)]
617    fn deref(&self) -> &Self::Target {
618        unsafe { &*DMAMUX::ptr() }
619    }
620}
621#[doc = "DMA channel multiplexor"]
622pub mod dmamux;
623#[doc = "Flex Controller Area Network module"]
624pub struct CAN0 {
625    _marker: PhantomData<*const ()>,
626}
627unsafe impl Send for CAN0 {}
628impl CAN0 {
629    #[doc = r"Returns a pointer to the register block"]
630    #[inline(always)]
631    pub const fn ptr() -> *const can0::RegisterBlock {
632        0x4002_4000 as *const _
633    }
634}
635impl Deref for CAN0 {
636    type Target = can0::RegisterBlock;
637    #[inline(always)]
638    fn deref(&self) -> &Self::Target {
639        unsafe { &*CAN0::ptr() }
640    }
641}
642#[doc = "Flex Controller Area Network module"]
643pub mod can0;
644#[doc = "Flex Controller Area Network module"]
645pub struct CAN1 {
646    _marker: PhantomData<*const ()>,
647}
648unsafe impl Send for CAN1 {}
649impl CAN1 {
650    #[doc = r"Returns a pointer to the register block"]
651    #[inline(always)]
652    pub const fn ptr() -> *const can1::RegisterBlock {
653        0x4002_5000 as *const _
654    }
655}
656impl Deref for CAN1 {
657    type Target = can1::RegisterBlock;
658    #[inline(always)]
659    fn deref(&self) -> &Self::Target {
660        unsafe { &*CAN1::ptr() }
661    }
662}
663#[doc = "Flex Controller Area Network module"]
664pub mod can1;
665#[doc = "Flex Controller Area Network module"]
666pub struct CAN2 {
667    _marker: PhantomData<*const ()>,
668}
669unsafe impl Send for CAN2 {}
670impl CAN2 {
671    #[doc = r"Returns a pointer to the register block"]
672    #[inline(always)]
673    pub const fn ptr() -> *const can2::RegisterBlock {
674        0x4002_b000 as *const _
675    }
676}
677impl Deref for CAN2 {
678    type Target = can2::RegisterBlock;
679    #[inline(always)]
680    fn deref(&self) -> &Self::Target {
681        unsafe { &*CAN2::ptr() }
682    }
683}
684#[doc = "Flex Controller Area Network module"]
685pub mod can2;
686#[doc = "FlexTimer Module"]
687pub struct FTM0 {
688    _marker: PhantomData<*const ()>,
689}
690unsafe impl Send for FTM0 {}
691impl FTM0 {
692    #[doc = r"Returns a pointer to the register block"]
693    #[inline(always)]
694    pub const fn ptr() -> *const ftm0::RegisterBlock {
695        0x4003_8000 as *const _
696    }
697}
698impl Deref for FTM0 {
699    type Target = ftm0::RegisterBlock;
700    #[inline(always)]
701    fn deref(&self) -> &Self::Target {
702        unsafe { &*FTM0::ptr() }
703    }
704}
705#[doc = "FlexTimer Module"]
706pub mod ftm0;
707#[doc = "FlexTimer Module"]
708pub struct FTM1 {
709    _marker: PhantomData<*const ()>,
710}
711unsafe impl Send for FTM1 {}
712impl FTM1 {
713    #[doc = r"Returns a pointer to the register block"]
714    #[inline(always)]
715    pub const fn ptr() -> *const ftm1::RegisterBlock {
716        0x4003_9000 as *const _
717    }
718}
719impl Deref for FTM1 {
720    type Target = ftm1::RegisterBlock;
721    #[inline(always)]
722    fn deref(&self) -> &Self::Target {
723        unsafe { &*FTM1::ptr() }
724    }
725}
726#[doc = "FlexTimer Module"]
727pub mod ftm1;
728#[doc = "FlexTimer Module"]
729pub struct FTM2 {
730    _marker: PhantomData<*const ()>,
731}
732unsafe impl Send for FTM2 {}
733impl FTM2 {
734    #[doc = r"Returns a pointer to the register block"]
735    #[inline(always)]
736    pub const fn ptr() -> *const ftm2::RegisterBlock {
737        0x4003_a000 as *const _
738    }
739}
740impl Deref for FTM2 {
741    type Target = ftm2::RegisterBlock;
742    #[inline(always)]
743    fn deref(&self) -> &Self::Target {
744        unsafe { &*FTM2::ptr() }
745    }
746}
747#[doc = "FlexTimer Module"]
748pub mod ftm2;
749#[doc = "FlexTimer Module"]
750pub struct FTM3 {
751    _marker: PhantomData<*const ()>,
752}
753unsafe impl Send for FTM3 {}
754impl FTM3 {
755    #[doc = r"Returns a pointer to the register block"]
756    #[inline(always)]
757    pub const fn ptr() -> *const ftm3::RegisterBlock {
758        0x4002_6000 as *const _
759    }
760}
761impl Deref for FTM3 {
762    type Target = ftm3::RegisterBlock;
763    #[inline(always)]
764    fn deref(&self) -> &Self::Target {
765        unsafe { &*FTM3::ptr() }
766    }
767}
768#[doc = "FlexTimer Module"]
769pub mod ftm3;
770#[doc = "Analog-to-Digital Converter"]
771pub struct ADC0 {
772    _marker: PhantomData<*const ()>,
773}
774unsafe impl Send for ADC0 {}
775impl ADC0 {
776    #[doc = r"Returns a pointer to the register block"]
777    #[inline(always)]
778    pub const fn ptr() -> *const adc0::RegisterBlock {
779        0x4003_b000 as *const _
780    }
781}
782impl Deref for ADC0 {
783    type Target = adc0::RegisterBlock;
784    #[inline(always)]
785    fn deref(&self) -> &Self::Target {
786        unsafe { &*ADC0::ptr() }
787    }
788}
789#[doc = "Analog-to-Digital Converter"]
790pub mod adc0;
791#[doc = "Analog-to-Digital Converter"]
792pub struct ADC1 {
793    _marker: PhantomData<*const ()>,
794}
795unsafe impl Send for ADC1 {}
796impl ADC1 {
797    #[doc = r"Returns a pointer to the register block"]
798    #[inline(always)]
799    pub const fn ptr() -> *const adc1::RegisterBlock {
800        0x4002_7000 as *const _
801    }
802}
803impl Deref for ADC1 {
804    type Target = adc1::RegisterBlock;
805    #[inline(always)]
806    fn deref(&self) -> &Self::Target {
807        unsafe { &*ADC1::ptr() }
808    }
809}
810#[doc = "Analog-to-Digital Converter"]
811pub mod adc1;
812#[doc = "The LPSPI Memory Map/Register Definition can be found here."]
813pub struct LPSPI0 {
814    _marker: PhantomData<*const ()>,
815}
816unsafe impl Send for LPSPI0 {}
817impl LPSPI0 {
818    #[doc = r"Returns a pointer to the register block"]
819    #[inline(always)]
820    pub const fn ptr() -> *const lpspi0::RegisterBlock {
821        0x4002_c000 as *const _
822    }
823}
824impl Deref for LPSPI0 {
825    type Target = lpspi0::RegisterBlock;
826    #[inline(always)]
827    fn deref(&self) -> &Self::Target {
828        unsafe { &*LPSPI0::ptr() }
829    }
830}
831#[doc = "The LPSPI Memory Map/Register Definition can be found here."]
832pub mod lpspi0;
833#[doc = "The LPSPI Memory Map/Register Definition can be found here."]
834pub struct LPSPI1 {
835    _marker: PhantomData<*const ()>,
836}
837unsafe impl Send for LPSPI1 {}
838impl LPSPI1 {
839    #[doc = r"Returns a pointer to the register block"]
840    #[inline(always)]
841    pub const fn ptr() -> *const lpspi1::RegisterBlock {
842        0x4002_d000 as *const _
843    }
844}
845impl Deref for LPSPI1 {
846    type Target = lpspi1::RegisterBlock;
847    #[inline(always)]
848    fn deref(&self) -> &Self::Target {
849        unsafe { &*LPSPI1::ptr() }
850    }
851}
852#[doc = "The LPSPI Memory Map/Register Definition can be found here."]
853pub mod lpspi1;
854#[doc = "The LPSPI Memory Map/Register Definition can be found here."]
855pub struct LPSPI2 {
856    _marker: PhantomData<*const ()>,
857}
858unsafe impl Send for LPSPI2 {}
859impl LPSPI2 {
860    #[doc = r"Returns a pointer to the register block"]
861    #[inline(always)]
862    pub const fn ptr() -> *const lpspi2::RegisterBlock {
863        0x4002_e000 as *const _
864    }
865}
866impl Deref for LPSPI2 {
867    type Target = lpspi2::RegisterBlock;
868    #[inline(always)]
869    fn deref(&self) -> &Self::Target {
870        unsafe { &*LPSPI2::ptr() }
871    }
872}
873#[doc = "The LPSPI Memory Map/Register Definition can be found here."]
874pub mod lpspi2;
875#[doc = "Programmable Delay Block"]
876pub struct PDB0 {
877    _marker: PhantomData<*const ()>,
878}
879unsafe impl Send for PDB0 {}
880impl PDB0 {
881    #[doc = r"Returns a pointer to the register block"]
882    #[inline(always)]
883    pub const fn ptr() -> *const pdb0::RegisterBlock {
884        0x4003_6000 as *const _
885    }
886}
887impl Deref for PDB0 {
888    type Target = pdb0::RegisterBlock;
889    #[inline(always)]
890    fn deref(&self) -> &Self::Target {
891        unsafe { &*PDB0::ptr() }
892    }
893}
894#[doc = "Programmable Delay Block"]
895pub mod pdb0;
896#[doc = "Programmable Delay Block"]
897pub struct PDB1 {
898    _marker: PhantomData<*const ()>,
899}
900unsafe impl Send for PDB1 {}
901impl PDB1 {
902    #[doc = r"Returns a pointer to the register block"]
903    #[inline(always)]
904    pub const fn ptr() -> *const pdb1::RegisterBlock {
905        0x4003_1000 as *const _
906    }
907}
908impl Deref for PDB1 {
909    type Target = pdb1::RegisterBlock;
910    #[inline(always)]
911    fn deref(&self) -> &Self::Target {
912        unsafe { &*PDB1::ptr() }
913    }
914}
915#[doc = "Programmable Delay Block"]
916pub mod pdb1;
917#[doc = "Cyclic Redundancy Check"]
918pub struct CRC {
919    _marker: PhantomData<*const ()>,
920}
921unsafe impl Send for CRC {}
922impl CRC {
923    #[doc = r"Returns a pointer to the register block"]
924    #[inline(always)]
925    pub const fn ptr() -> *const crc::RegisterBlock {
926        0x4003_2000 as *const _
927    }
928}
929impl Deref for CRC {
930    type Target = crc::RegisterBlock;
931    #[inline(always)]
932    fn deref(&self) -> &Self::Target {
933        unsafe { &*CRC::ptr() }
934    }
935}
936#[doc = "Cyclic Redundancy Check"]
937pub mod crc;
938#[doc = "Low Power Periodic Interrupt Timer (LPIT)"]
939pub struct LPIT0 {
940    _marker: PhantomData<*const ()>,
941}
942unsafe impl Send for LPIT0 {}
943impl LPIT0 {
944    #[doc = r"Returns a pointer to the register block"]
945    #[inline(always)]
946    pub const fn ptr() -> *const lpit0::RegisterBlock {
947        0x4003_7000 as *const _
948    }
949}
950impl Deref for LPIT0 {
951    type Target = lpit0::RegisterBlock;
952    #[inline(always)]
953    fn deref(&self) -> &Self::Target {
954        unsafe { &*LPIT0::ptr() }
955    }
956}
957#[doc = "Low Power Periodic Interrupt Timer (LPIT)"]
958pub mod lpit0;
959#[doc = "Secure Real Time Clock"]
960pub struct RTC {
961    _marker: PhantomData<*const ()>,
962}
963unsafe impl Send for RTC {}
964impl RTC {
965    #[doc = r"Returns a pointer to the register block"]
966    #[inline(always)]
967    pub const fn ptr() -> *const rtc::RegisterBlock {
968        0x4003_d000 as *const _
969    }
970}
971impl Deref for RTC {
972    type Target = rtc::RegisterBlock;
973    #[inline(always)]
974    fn deref(&self) -> &Self::Target {
975        unsafe { &*RTC::ptr() }
976    }
977}
978#[doc = "Secure Real Time Clock"]
979pub mod rtc;
980#[doc = "Low Power Timer"]
981pub struct LPTMR0 {
982    _marker: PhantomData<*const ()>,
983}
984unsafe impl Send for LPTMR0 {}
985impl LPTMR0 {
986    #[doc = r"Returns a pointer to the register block"]
987    #[inline(always)]
988    pub const fn ptr() -> *const lptmr0::RegisterBlock {
989        0x4004_0000 as *const _
990    }
991}
992impl Deref for LPTMR0 {
993    type Target = lptmr0::RegisterBlock;
994    #[inline(always)]
995    fn deref(&self) -> &Self::Target {
996        unsafe { &*LPTMR0::ptr() }
997    }
998}
999#[doc = "Low Power Timer"]
1000pub mod lptmr0;
1001#[doc = "System Integration Module"]
1002pub struct SIM {
1003    _marker: PhantomData<*const ()>,
1004}
1005unsafe impl Send for SIM {}
1006impl SIM {
1007    #[doc = r"Returns a pointer to the register block"]
1008    #[inline(always)]
1009    pub const fn ptr() -> *const sim::RegisterBlock {
1010        0x4004_8000 as *const _
1011    }
1012}
1013impl Deref for SIM {
1014    type Target = sim::RegisterBlock;
1015    #[inline(always)]
1016    fn deref(&self) -> &Self::Target {
1017        unsafe { &*SIM::ptr() }
1018    }
1019}
1020#[doc = "System Integration Module"]
1021pub mod sim;
1022#[doc = "Pin Control and Interrupts"]
1023pub struct PORTA {
1024    _marker: PhantomData<*const ()>,
1025}
1026unsafe impl Send for PORTA {}
1027impl PORTA {
1028    #[doc = r"Returns a pointer to the register block"]
1029    #[inline(always)]
1030    pub const fn ptr() -> *const porta::RegisterBlock {
1031        0x4004_9000 as *const _
1032    }
1033}
1034impl Deref for PORTA {
1035    type Target = porta::RegisterBlock;
1036    #[inline(always)]
1037    fn deref(&self) -> &Self::Target {
1038        unsafe { &*PORTA::ptr() }
1039    }
1040}
1041#[doc = "Pin Control and Interrupts"]
1042pub mod porta;
1043#[doc = "Pin Control and Interrupts"]
1044pub struct PORTB {
1045    _marker: PhantomData<*const ()>,
1046}
1047unsafe impl Send for PORTB {}
1048impl PORTB {
1049    #[doc = r"Returns a pointer to the register block"]
1050    #[inline(always)]
1051    pub const fn ptr() -> *const portb::RegisterBlock {
1052        0x4004_a000 as *const _
1053    }
1054}
1055impl Deref for PORTB {
1056    type Target = portb::RegisterBlock;
1057    #[inline(always)]
1058    fn deref(&self) -> &Self::Target {
1059        unsafe { &*PORTB::ptr() }
1060    }
1061}
1062#[doc = "Pin Control and Interrupts"]
1063pub mod portb;
1064#[doc = "Pin Control and Interrupts"]
1065pub struct PORTC {
1066    _marker: PhantomData<*const ()>,
1067}
1068unsafe impl Send for PORTC {}
1069impl PORTC {
1070    #[doc = r"Returns a pointer to the register block"]
1071    #[inline(always)]
1072    pub const fn ptr() -> *const portc::RegisterBlock {
1073        0x4004_b000 as *const _
1074    }
1075}
1076impl Deref for PORTC {
1077    type Target = portc::RegisterBlock;
1078    #[inline(always)]
1079    fn deref(&self) -> &Self::Target {
1080        unsafe { &*PORTC::ptr() }
1081    }
1082}
1083#[doc = "Pin Control and Interrupts"]
1084pub mod portc;
1085#[doc = "Pin Control and Interrupts"]
1086pub struct PORTD {
1087    _marker: PhantomData<*const ()>,
1088}
1089unsafe impl Send for PORTD {}
1090impl PORTD {
1091    #[doc = r"Returns a pointer to the register block"]
1092    #[inline(always)]
1093    pub const fn ptr() -> *const portd::RegisterBlock {
1094        0x4004_c000 as *const _
1095    }
1096}
1097impl Deref for PORTD {
1098    type Target = portd::RegisterBlock;
1099    #[inline(always)]
1100    fn deref(&self) -> &Self::Target {
1101        unsafe { &*PORTD::ptr() }
1102    }
1103}
1104#[doc = "Pin Control and Interrupts"]
1105pub mod portd;
1106#[doc = "Pin Control and Interrupts"]
1107pub struct PORTE {
1108    _marker: PhantomData<*const ()>,
1109}
1110unsafe impl Send for PORTE {}
1111impl PORTE {
1112    #[doc = r"Returns a pointer to the register block"]
1113    #[inline(always)]
1114    pub const fn ptr() -> *const porte::RegisterBlock {
1115        0x4004_d000 as *const _
1116    }
1117}
1118impl Deref for PORTE {
1119    type Target = porte::RegisterBlock;
1120    #[inline(always)]
1121    fn deref(&self) -> &Self::Target {
1122        unsafe { &*PORTE::ptr() }
1123    }
1124}
1125#[doc = "Pin Control and Interrupts"]
1126pub mod porte;
1127#[doc = "Watchdog timer"]
1128pub struct WDOG {
1129    _marker: PhantomData<*const ()>,
1130}
1131unsafe impl Send for WDOG {}
1132impl WDOG {
1133    #[doc = r"Returns a pointer to the register block"]
1134    #[inline(always)]
1135    pub const fn ptr() -> *const wdog::RegisterBlock {
1136        0x4005_2000 as *const _
1137    }
1138}
1139impl Deref for WDOG {
1140    type Target = wdog::RegisterBlock;
1141    #[inline(always)]
1142    fn deref(&self) -> &Self::Target {
1143        unsafe { &*WDOG::ptr() }
1144    }
1145}
1146#[doc = "Watchdog timer"]
1147pub mod wdog;
1148#[doc = "The FLEXIO Memory Map/Register Definition can be found here."]
1149pub struct FLEXIO {
1150    _marker: PhantomData<*const ()>,
1151}
1152unsafe impl Send for FLEXIO {}
1153impl FLEXIO {
1154    #[doc = r"Returns a pointer to the register block"]
1155    #[inline(always)]
1156    pub const fn ptr() -> *const flexio::RegisterBlock {
1157        0x4005_a000 as *const _
1158    }
1159}
1160impl Deref for FLEXIO {
1161    type Target = flexio::RegisterBlock;
1162    #[inline(always)]
1163    fn deref(&self) -> &Self::Target {
1164        unsafe { &*FLEXIO::ptr() }
1165    }
1166}
1167#[doc = "The FLEXIO Memory Map/Register Definition can be found here."]
1168pub mod flexio;
1169#[doc = "External Watchdog Monitor"]
1170pub struct EWM {
1171    _marker: PhantomData<*const ()>,
1172}
1173unsafe impl Send for EWM {}
1174impl EWM {
1175    #[doc = r"Returns a pointer to the register block"]
1176    #[inline(always)]
1177    pub const fn ptr() -> *const ewm::RegisterBlock {
1178        0x4006_1000 as *const _
1179    }
1180}
1181impl Deref for EWM {
1182    type Target = ewm::RegisterBlock;
1183    #[inline(always)]
1184    fn deref(&self) -> &Self::Target {
1185        unsafe { &*EWM::ptr() }
1186    }
1187}
1188#[doc = "External Watchdog Monitor"]
1189pub mod ewm;
1190#[doc = "TRGMUX"]
1191pub struct TRGMUX {
1192    _marker: PhantomData<*const ()>,
1193}
1194unsafe impl Send for TRGMUX {}
1195impl TRGMUX {
1196    #[doc = r"Returns a pointer to the register block"]
1197    #[inline(always)]
1198    pub const fn ptr() -> *const trgmux::RegisterBlock {
1199        0x4006_3000 as *const _
1200    }
1201}
1202impl Deref for TRGMUX {
1203    type Target = trgmux::RegisterBlock;
1204    #[inline(always)]
1205    fn deref(&self) -> &Self::Target {
1206        unsafe { &*TRGMUX::ptr() }
1207    }
1208}
1209#[doc = "TRGMUX"]
1210pub mod trgmux;
1211#[doc = "System Clock Generator"]
1212pub struct SCG {
1213    _marker: PhantomData<*const ()>,
1214}
1215unsafe impl Send for SCG {}
1216impl SCG {
1217    #[doc = r"Returns a pointer to the register block"]
1218    #[inline(always)]
1219    pub const fn ptr() -> *const scg::RegisterBlock {
1220        0x4006_4000 as *const _
1221    }
1222}
1223impl Deref for SCG {
1224    type Target = scg::RegisterBlock;
1225    #[inline(always)]
1226    fn deref(&self) -> &Self::Target {
1227        unsafe { &*SCG::ptr() }
1228    }
1229}
1230#[doc = "System Clock Generator"]
1231pub mod scg;
1232#[doc = "PCC"]
1233pub struct PCC {
1234    _marker: PhantomData<*const ()>,
1235}
1236unsafe impl Send for PCC {}
1237impl PCC {
1238    #[doc = r"Returns a pointer to the register block"]
1239    #[inline(always)]
1240    pub const fn ptr() -> *const pcc::RegisterBlock {
1241        0x4006_5000 as *const _
1242    }
1243}
1244impl Deref for PCC {
1245    type Target = pcc::RegisterBlock;
1246    #[inline(always)]
1247    fn deref(&self) -> &Self::Target {
1248        unsafe { &*PCC::ptr() }
1249    }
1250}
1251#[doc = "PCC"]
1252pub mod pcc;
1253#[doc = "The LPI2C Memory Map/Register Definition can be found here."]
1254pub struct LPI2C0 {
1255    _marker: PhantomData<*const ()>,
1256}
1257unsafe impl Send for LPI2C0 {}
1258impl LPI2C0 {
1259    #[doc = r"Returns a pointer to the register block"]
1260    #[inline(always)]
1261    pub const fn ptr() -> *const lpi2c0::RegisterBlock {
1262        0x4006_6000 as *const _
1263    }
1264}
1265impl Deref for LPI2C0 {
1266    type Target = lpi2c0::RegisterBlock;
1267    #[inline(always)]
1268    fn deref(&self) -> &Self::Target {
1269        unsafe { &*LPI2C0::ptr() }
1270    }
1271}
1272#[doc = "The LPI2C Memory Map/Register Definition can be found here."]
1273pub mod lpi2c0;
1274#[doc = "Universal Asynchronous Receiver/Transmitter"]
1275pub struct LPUART0 {
1276    _marker: PhantomData<*const ()>,
1277}
1278unsafe impl Send for LPUART0 {}
1279impl LPUART0 {
1280    #[doc = r"Returns a pointer to the register block"]
1281    #[inline(always)]
1282    pub const fn ptr() -> *const lpuart0::RegisterBlock {
1283        0x4006_a000 as *const _
1284    }
1285}
1286impl Deref for LPUART0 {
1287    type Target = lpuart0::RegisterBlock;
1288    #[inline(always)]
1289    fn deref(&self) -> &Self::Target {
1290        unsafe { &*LPUART0::ptr() }
1291    }
1292}
1293#[doc = "Universal Asynchronous Receiver/Transmitter"]
1294pub mod lpuart0;
1295#[doc = "Universal Asynchronous Receiver/Transmitter"]
1296pub struct LPUART1 {
1297    _marker: PhantomData<*const ()>,
1298}
1299unsafe impl Send for LPUART1 {}
1300impl LPUART1 {
1301    #[doc = r"Returns a pointer to the register block"]
1302    #[inline(always)]
1303    pub const fn ptr() -> *const lpuart1::RegisterBlock {
1304        0x4006_b000 as *const _
1305    }
1306}
1307impl Deref for LPUART1 {
1308    type Target = lpuart1::RegisterBlock;
1309    #[inline(always)]
1310    fn deref(&self) -> &Self::Target {
1311        unsafe { &*LPUART1::ptr() }
1312    }
1313}
1314#[doc = "Universal Asynchronous Receiver/Transmitter"]
1315pub mod lpuart1;
1316#[doc = "Universal Asynchronous Receiver/Transmitter"]
1317pub struct LPUART2 {
1318    _marker: PhantomData<*const ()>,
1319}
1320unsafe impl Send for LPUART2 {}
1321impl LPUART2 {
1322    #[doc = r"Returns a pointer to the register block"]
1323    #[inline(always)]
1324    pub const fn ptr() -> *const lpuart2::RegisterBlock {
1325        0x4006_c000 as *const _
1326    }
1327}
1328impl Deref for LPUART2 {
1329    type Target = lpuart2::RegisterBlock;
1330    #[inline(always)]
1331    fn deref(&self) -> &Self::Target {
1332        unsafe { &*LPUART2::ptr() }
1333    }
1334}
1335#[doc = "Universal Asynchronous Receiver/Transmitter"]
1336pub mod lpuart2;
1337#[doc = "High-Speed Comparator (CMP), Voltage Reference (VREF) Digital-to-Analog Converter (DAC), and Analog Mux (ANMUX)"]
1338pub struct CMP0 {
1339    _marker: PhantomData<*const ()>,
1340}
1341unsafe impl Send for CMP0 {}
1342impl CMP0 {
1343    #[doc = r"Returns a pointer to the register block"]
1344    #[inline(always)]
1345    pub const fn ptr() -> *const cmp0::RegisterBlock {
1346        0x4007_3000 as *const _
1347    }
1348}
1349impl Deref for CMP0 {
1350    type Target = cmp0::RegisterBlock;
1351    #[inline(always)]
1352    fn deref(&self) -> &Self::Target {
1353        unsafe { &*CMP0::ptr() }
1354    }
1355}
1356#[doc = "High-Speed Comparator (CMP), Voltage Reference (VREF) Digital-to-Analog Converter (DAC), and Analog Mux (ANMUX)"]
1357pub mod cmp0;
1358#[doc = "PMC"]
1359pub struct PMC {
1360    _marker: PhantomData<*const ()>,
1361}
1362unsafe impl Send for PMC {}
1363impl PMC {
1364    #[doc = r"Returns a pointer to the register block"]
1365    #[inline(always)]
1366    pub const fn ptr() -> *const pmc::RegisterBlock {
1367        0x4007_d000 as *const _
1368    }
1369}
1370impl Deref for PMC {
1371    type Target = pmc::RegisterBlock;
1372    #[inline(always)]
1373    fn deref(&self) -> &Self::Target {
1374        unsafe { &*PMC::ptr() }
1375    }
1376}
1377#[doc = "PMC"]
1378pub mod pmc;
1379#[doc = "System Mode Controller"]
1380pub struct SMC {
1381    _marker: PhantomData<*const ()>,
1382}
1383unsafe impl Send for SMC {}
1384impl SMC {
1385    #[doc = r"Returns a pointer to the register block"]
1386    #[inline(always)]
1387    pub const fn ptr() -> *const smc::RegisterBlock {
1388        0x4007_e000 as *const _
1389    }
1390}
1391impl Deref for SMC {
1392    type Target = smc::RegisterBlock;
1393    #[inline(always)]
1394    fn deref(&self) -> &Self::Target {
1395        unsafe { &*SMC::ptr() }
1396    }
1397}
1398#[doc = "System Mode Controller"]
1399pub mod smc;
1400#[doc = "Reset Control Module"]
1401pub struct RCM {
1402    _marker: PhantomData<*const ()>,
1403}
1404unsafe impl Send for RCM {}
1405impl RCM {
1406    #[doc = r"Returns a pointer to the register block"]
1407    #[inline(always)]
1408    pub const fn ptr() -> *const rcm::RegisterBlock {
1409        0x4007_f000 as *const _
1410    }
1411}
1412impl Deref for RCM {
1413    type Target = rcm::RegisterBlock;
1414    #[inline(always)]
1415    fn deref(&self) -> &Self::Target {
1416        unsafe { &*RCM::ptr() }
1417    }
1418}
1419#[doc = "Reset Control Module"]
1420pub mod rcm;
1421#[doc = "General Purpose Input/Output"]
1422pub struct PTA {
1423    _marker: PhantomData<*const ()>,
1424}
1425unsafe impl Send for PTA {}
1426impl PTA {
1427    #[doc = r"Returns a pointer to the register block"]
1428    #[inline(always)]
1429    pub const fn ptr() -> *const pta::RegisterBlock {
1430        0x400f_f000 as *const _
1431    }
1432}
1433impl Deref for PTA {
1434    type Target = pta::RegisterBlock;
1435    #[inline(always)]
1436    fn deref(&self) -> &Self::Target {
1437        unsafe { &*PTA::ptr() }
1438    }
1439}
1440#[doc = "General Purpose Input/Output"]
1441pub mod pta;
1442#[doc = "General Purpose Input/Output"]
1443pub struct PTB {
1444    _marker: PhantomData<*const ()>,
1445}
1446unsafe impl Send for PTB {}
1447impl PTB {
1448    #[doc = r"Returns a pointer to the register block"]
1449    #[inline(always)]
1450    pub const fn ptr() -> *const ptb::RegisterBlock {
1451        0x400f_f040 as *const _
1452    }
1453}
1454impl Deref for PTB {
1455    type Target = ptb::RegisterBlock;
1456    #[inline(always)]
1457    fn deref(&self) -> &Self::Target {
1458        unsafe { &*PTB::ptr() }
1459    }
1460}
1461#[doc = "General Purpose Input/Output"]
1462pub mod ptb;
1463#[doc = "General Purpose Input/Output"]
1464pub struct PTC {
1465    _marker: PhantomData<*const ()>,
1466}
1467unsafe impl Send for PTC {}
1468impl PTC {
1469    #[doc = r"Returns a pointer to the register block"]
1470    #[inline(always)]
1471    pub const fn ptr() -> *const ptc::RegisterBlock {
1472        0x400f_f080 as *const _
1473    }
1474}
1475impl Deref for PTC {
1476    type Target = ptc::RegisterBlock;
1477    #[inline(always)]
1478    fn deref(&self) -> &Self::Target {
1479        unsafe { &*PTC::ptr() }
1480    }
1481}
1482#[doc = "General Purpose Input/Output"]
1483pub mod ptc;
1484#[doc = "General Purpose Input/Output"]
1485pub struct PTD {
1486    _marker: PhantomData<*const ()>,
1487}
1488unsafe impl Send for PTD {}
1489impl PTD {
1490    #[doc = r"Returns a pointer to the register block"]
1491    #[inline(always)]
1492    pub const fn ptr() -> *const ptd::RegisterBlock {
1493        0x400f_f0c0 as *const _
1494    }
1495}
1496impl Deref for PTD {
1497    type Target = ptd::RegisterBlock;
1498    #[inline(always)]
1499    fn deref(&self) -> &Self::Target {
1500        unsafe { &*PTD::ptr() }
1501    }
1502}
1503#[doc = "General Purpose Input/Output"]
1504pub mod ptd;
1505#[doc = "General Purpose Input/Output"]
1506pub struct PTE {
1507    _marker: PhantomData<*const ()>,
1508}
1509unsafe impl Send for PTE {}
1510impl PTE {
1511    #[doc = r"Returns a pointer to the register block"]
1512    #[inline(always)]
1513    pub const fn ptr() -> *const pte::RegisterBlock {
1514        0x400f_f100 as *const _
1515    }
1516}
1517impl Deref for PTE {
1518    type Target = pte::RegisterBlock;
1519    #[inline(always)]
1520    fn deref(&self) -> &Self::Target {
1521        unsafe { &*PTE::ptr() }
1522    }
1523}
1524#[doc = "General Purpose Input/Output"]
1525pub mod pte;
1526#[doc = "Core Platform Miscellaneous Control Module"]
1527pub struct MCM {
1528    _marker: PhantomData<*const ()>,
1529}
1530unsafe impl Send for MCM {}
1531impl MCM {
1532    #[doc = r"Returns a pointer to the register block"]
1533    #[inline(always)]
1534    pub const fn ptr() -> *const mcm::RegisterBlock {
1535        0xe008_0000 as *const _
1536    }
1537}
1538impl Deref for MCM {
1539    type Target = mcm::RegisterBlock;
1540    #[inline(always)]
1541    fn deref(&self) -> &Self::Target {
1542        unsafe { &*MCM::ptr() }
1543    }
1544}
1545#[doc = "Core Platform Miscellaneous Control Module"]
1546pub mod mcm;
1547#[doc = "Local Memory Controller"]
1548pub struct LMEM {
1549    _marker: PhantomData<*const ()>,
1550}
1551unsafe impl Send for LMEM {}
1552impl LMEM {
1553    #[doc = r"Returns a pointer to the register block"]
1554    #[inline(always)]
1555    pub const fn ptr() -> *const lmem::RegisterBlock {
1556        0xe008_2000 as *const _
1557    }
1558}
1559impl Deref for LMEM {
1560    type Target = lmem::RegisterBlock;
1561    #[inline(always)]
1562    fn deref(&self) -> &Self::Target {
1563        unsafe { &*LMEM::ptr() }
1564    }
1565}
1566#[doc = "Local Memory Controller"]
1567pub mod lmem;
1568#[no_mangle]
1569static mut DEVICE_PERIPHERALS: bool = false;
1570#[doc = r"All the peripherals"]
1571#[allow(non_snake_case)]
1572pub struct Peripherals {
1573    #[doc = "CSE_PRAM"]
1574    pub CSE_PRAM: CSE_PRAM,
1575    #[doc = "AIPS"]
1576    pub AIPS: AIPS,
1577    #[doc = "MSCM"]
1578    pub MSCM: MSCM,
1579    #[doc = "DMA"]
1580    pub DMA: DMA,
1581    #[doc = "ERM"]
1582    pub ERM: ERM,
1583    #[doc = "EIM"]
1584    pub EIM: EIM,
1585    #[doc = "FTFC"]
1586    pub FTFC: FTFC,
1587    #[doc = "DMAMUX"]
1588    pub DMAMUX: DMAMUX,
1589    #[doc = "CAN0"]
1590    pub CAN0: CAN0,
1591    #[doc = "CAN1"]
1592    pub CAN1: CAN1,
1593    #[doc = "CAN2"]
1594    pub CAN2: CAN2,
1595    #[doc = "FTM0"]
1596    pub FTM0: FTM0,
1597    #[doc = "FTM1"]
1598    pub FTM1: FTM1,
1599    #[doc = "FTM2"]
1600    pub FTM2: FTM2,
1601    #[doc = "FTM3"]
1602    pub FTM3: FTM3,
1603    #[doc = "ADC0"]
1604    pub ADC0: ADC0,
1605    #[doc = "ADC1"]
1606    pub ADC1: ADC1,
1607    #[doc = "LPSPI0"]
1608    pub LPSPI0: LPSPI0,
1609    #[doc = "LPSPI1"]
1610    pub LPSPI1: LPSPI1,
1611    #[doc = "LPSPI2"]
1612    pub LPSPI2: LPSPI2,
1613    #[doc = "PDB0"]
1614    pub PDB0: PDB0,
1615    #[doc = "PDB1"]
1616    pub PDB1: PDB1,
1617    #[doc = "CRC"]
1618    pub CRC: CRC,
1619    #[doc = "LPIT0"]
1620    pub LPIT0: LPIT0,
1621    #[doc = "RTC"]
1622    pub RTC: RTC,
1623    #[doc = "LPTMR0"]
1624    pub LPTMR0: LPTMR0,
1625    #[doc = "SIM"]
1626    pub SIM: SIM,
1627    #[doc = "PORTA"]
1628    pub PORTA: PORTA,
1629    #[doc = "PORTB"]
1630    pub PORTB: PORTB,
1631    #[doc = "PORTC"]
1632    pub PORTC: PORTC,
1633    #[doc = "PORTD"]
1634    pub PORTD: PORTD,
1635    #[doc = "PORTE"]
1636    pub PORTE: PORTE,
1637    #[doc = "WDOG"]
1638    pub WDOG: WDOG,
1639    #[doc = "FLEXIO"]
1640    pub FLEXIO: FLEXIO,
1641    #[doc = "EWM"]
1642    pub EWM: EWM,
1643    #[doc = "TRGMUX"]
1644    pub TRGMUX: TRGMUX,
1645    #[doc = "SCG"]
1646    pub SCG: SCG,
1647    #[doc = "PCC"]
1648    pub PCC: PCC,
1649    #[doc = "LPI2C0"]
1650    pub LPI2C0: LPI2C0,
1651    #[doc = "LPUART0"]
1652    pub LPUART0: LPUART0,
1653    #[doc = "LPUART1"]
1654    pub LPUART1: LPUART1,
1655    #[doc = "LPUART2"]
1656    pub LPUART2: LPUART2,
1657    #[doc = "CMP0"]
1658    pub CMP0: CMP0,
1659    #[doc = "PMC"]
1660    pub PMC: PMC,
1661    #[doc = "SMC"]
1662    pub SMC: SMC,
1663    #[doc = "RCM"]
1664    pub RCM: RCM,
1665    #[doc = "PTA"]
1666    pub PTA: PTA,
1667    #[doc = "PTB"]
1668    pub PTB: PTB,
1669    #[doc = "PTC"]
1670    pub PTC: PTC,
1671    #[doc = "PTD"]
1672    pub PTD: PTD,
1673    #[doc = "PTE"]
1674    pub PTE: PTE,
1675    #[doc = "MCM"]
1676    pub MCM: MCM,
1677    #[doc = "LMEM"]
1678    pub LMEM: LMEM,
1679}
1680impl Peripherals {
1681    #[doc = r"Returns all the peripherals *once*"]
1682    #[inline]
1683    pub fn take() -> Option<Self> {
1684        cortex_m::interrupt::free(|_| if unsafe { DEVICE_PERIPHERALS } { None } else { Some(unsafe { Peripherals::steal() }) })
1685    }
1686    #[doc = r"Unchecked version of `Peripherals::take`"]
1687    #[inline]
1688    pub unsafe fn steal() -> Self {
1689        DEVICE_PERIPHERALS = true;
1690        Peripherals {
1691            CSE_PRAM: CSE_PRAM { _marker: PhantomData },
1692            AIPS: AIPS { _marker: PhantomData },
1693            MSCM: MSCM { _marker: PhantomData },
1694            DMA: DMA { _marker: PhantomData },
1695            ERM: ERM { _marker: PhantomData },
1696            EIM: EIM { _marker: PhantomData },
1697            FTFC: FTFC { _marker: PhantomData },
1698            DMAMUX: DMAMUX { _marker: PhantomData },
1699            CAN0: CAN0 { _marker: PhantomData },
1700            CAN1: CAN1 { _marker: PhantomData },
1701            CAN2: CAN2 { _marker: PhantomData },
1702            FTM0: FTM0 { _marker: PhantomData },
1703            FTM1: FTM1 { _marker: PhantomData },
1704            FTM2: FTM2 { _marker: PhantomData },
1705            FTM3: FTM3 { _marker: PhantomData },
1706            ADC0: ADC0 { _marker: PhantomData },
1707            ADC1: ADC1 { _marker: PhantomData },
1708            LPSPI0: LPSPI0 { _marker: PhantomData },
1709            LPSPI1: LPSPI1 { _marker: PhantomData },
1710            LPSPI2: LPSPI2 { _marker: PhantomData },
1711            PDB0: PDB0 { _marker: PhantomData },
1712            PDB1: PDB1 { _marker: PhantomData },
1713            CRC: CRC { _marker: PhantomData },
1714            LPIT0: LPIT0 { _marker: PhantomData },
1715            RTC: RTC { _marker: PhantomData },
1716            LPTMR0: LPTMR0 { _marker: PhantomData },
1717            SIM: SIM { _marker: PhantomData },
1718            PORTA: PORTA { _marker: PhantomData },
1719            PORTB: PORTB { _marker: PhantomData },
1720            PORTC: PORTC { _marker: PhantomData },
1721            PORTD: PORTD { _marker: PhantomData },
1722            PORTE: PORTE { _marker: PhantomData },
1723            WDOG: WDOG { _marker: PhantomData },
1724            FLEXIO: FLEXIO { _marker: PhantomData },
1725            EWM: EWM { _marker: PhantomData },
1726            TRGMUX: TRGMUX { _marker: PhantomData },
1727            SCG: SCG { _marker: PhantomData },
1728            PCC: PCC { _marker: PhantomData },
1729            LPI2C0: LPI2C0 { _marker: PhantomData },
1730            LPUART0: LPUART0 { _marker: PhantomData },
1731            LPUART1: LPUART1 { _marker: PhantomData },
1732            LPUART2: LPUART2 { _marker: PhantomData },
1733            CMP0: CMP0 { _marker: PhantomData },
1734            PMC: PMC { _marker: PhantomData },
1735            SMC: SMC { _marker: PhantomData },
1736            RCM: RCM { _marker: PhantomData },
1737            PTA: PTA { _marker: PhantomData },
1738            PTB: PTB { _marker: PhantomData },
1739            PTC: PTC { _marker: PhantomData },
1740            PTD: PTD { _marker: PhantomData },
1741            PTE: PTE { _marker: PhantomData },
1742            MCM: MCM { _marker: PhantomData },
1743            LMEM: LMEM { _marker: PhantomData },
1744        }
1745    }
1746}