atsams70n19/
lib.rs

1#![doc = "Peripheral access API for ATSAMS70N19 microcontrollers (generated using svd2rust v0.21.0 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next]
2svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.21.0/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
3#![deny(const_err)]
4#![deny(dead_code)]
5#![deny(improper_ctypes)]
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(private_in_public)]
13#![deny(unconditional_recursion)]
14#![deny(unused_allocation)]
15#![deny(unused_comparisons)]
16#![deny(unused_parens)]
17#![deny(while_true)]
18#![allow(non_camel_case_types)]
19#![allow(non_snake_case)]
20#![no_std]
21use core::marker::PhantomData;
22use core::ops::Deref;
23#[doc = r"Number available in the NVIC for configuring priority"]
24pub const NVIC_PRIO_BITS: u8 = 3;
25#[cfg(feature = "rt")]
26pub use self::Interrupt as interrupt;
27pub use cortex_m::peripheral::Peripherals as CorePeripherals;
28pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, FPU, ITM, MPU, NVIC, SCB, SYST, TPIU};
29#[cfg(feature = "rt")]
30pub use cortex_m_rt::interrupt;
31#[allow(unused_imports)]
32use generic::*;
33#[doc = r"Common register and bit access and modify traits"]
34pub mod generic;
35#[cfg(feature = "rt")]
36extern "C" {
37    fn SUPC();
38    fn RSTC();
39    fn RTC();
40    fn RTT();
41    fn WDT();
42    fn PMC();
43    fn EFC();
44    fn UART0();
45    fn UART1();
46    fn PIOA();
47    fn PIOB();
48    fn USART0();
49    fn USART1();
50    fn USART2();
51    fn PIOD();
52    fn HSMCI();
53    fn TWIHS0();
54    fn TWIHS1();
55    fn SPI0();
56    fn SSC();
57    fn TC0();
58    fn TC1();
59    fn TC2();
60    fn TC3();
61    fn TC4();
62    fn TC5();
63    fn AFEC0();
64    fn DACC();
65    fn PWM0();
66    fn ICM();
67    fn ACC();
68    fn USBHS();
69    fn AFEC1();
70    fn TWIHS2();
71    fn QSPI();
72    fn UART2();
73    fn UART3();
74    fn UART4();
75    fn TC6();
76    fn TC7();
77    fn TC8();
78    fn TC9();
79    fn TC10();
80    fn TC11();
81    fn AES();
82    fn TRNG();
83    fn XDMAC();
84    fn ISI();
85    fn PWM1();
86    fn FPU();
87    fn RSWDT();
88    fn IXC();
89}
90#[doc(hidden)]
91pub union Vector {
92    _handler: unsafe extern "C" fn(),
93    _reserved: u32,
94}
95#[cfg(feature = "rt")]
96#[doc(hidden)]
97#[link_section = ".vector_table.interrupts"]
98#[no_mangle]
99pub static __INTERRUPTS: [Vector; 69] = [
100    Vector { _handler: SUPC },
101    Vector { _handler: RSTC },
102    Vector { _handler: RTC },
103    Vector { _handler: RTT },
104    Vector { _handler: WDT },
105    Vector { _handler: PMC },
106    Vector { _handler: EFC },
107    Vector { _handler: UART0 },
108    Vector { _handler: UART1 },
109    Vector { _reserved: 0 },
110    Vector { _handler: PIOA },
111    Vector { _handler: PIOB },
112    Vector { _reserved: 0 },
113    Vector { _handler: USART0 },
114    Vector { _handler: USART1 },
115    Vector { _handler: USART2 },
116    Vector { _handler: PIOD },
117    Vector { _reserved: 0 },
118    Vector { _handler: HSMCI },
119    Vector { _handler: TWIHS0 },
120    Vector { _handler: TWIHS1 },
121    Vector { _handler: SPI0 },
122    Vector { _handler: SSC },
123    Vector { _handler: TC0 },
124    Vector { _handler: TC1 },
125    Vector { _handler: TC2 },
126    Vector { _handler: TC3 },
127    Vector { _handler: TC4 },
128    Vector { _handler: TC5 },
129    Vector { _handler: AFEC0 },
130    Vector { _handler: DACC },
131    Vector { _handler: PWM0 },
132    Vector { _handler: ICM },
133    Vector { _handler: ACC },
134    Vector { _handler: USBHS },
135    Vector { _reserved: 0 },
136    Vector { _reserved: 0 },
137    Vector { _reserved: 0 },
138    Vector { _reserved: 0 },
139    Vector { _reserved: 0 },
140    Vector { _handler: AFEC1 },
141    Vector { _handler: TWIHS2 },
142    Vector { _reserved: 0 },
143    Vector { _handler: QSPI },
144    Vector { _handler: UART2 },
145    Vector { _handler: UART3 },
146    Vector { _handler: UART4 },
147    Vector { _handler: TC6 },
148    Vector { _handler: TC7 },
149    Vector { _handler: TC8 },
150    Vector { _handler: TC9 },
151    Vector { _handler: TC10 },
152    Vector { _handler: TC11 },
153    Vector { _reserved: 0 },
154    Vector { _reserved: 0 },
155    Vector { _reserved: 0 },
156    Vector { _handler: AES },
157    Vector { _handler: TRNG },
158    Vector { _handler: XDMAC },
159    Vector { _handler: ISI },
160    Vector { _handler: PWM1 },
161    Vector { _handler: FPU },
162    Vector { _reserved: 0 },
163    Vector { _handler: RSWDT },
164    Vector { _reserved: 0 },
165    Vector { _reserved: 0 },
166    Vector { _reserved: 0 },
167    Vector { _reserved: 0 },
168    Vector { _handler: IXC },
169];
170#[doc = r"Enumeration of all the interrupts."]
171#[derive(Copy, Clone, Debug, PartialEq, Eq)]
172#[repr(u16)]
173pub enum Interrupt {
174    #[doc = "0 - SUPC"]
175    SUPC = 0,
176    #[doc = "1 - RSTC"]
177    RSTC = 1,
178    #[doc = "2 - RTC"]
179    RTC = 2,
180    #[doc = "3 - RTT"]
181    RTT = 3,
182    #[doc = "4 - WDT"]
183    WDT = 4,
184    #[doc = "5 - PMC"]
185    PMC = 5,
186    #[doc = "6 - EFC"]
187    EFC = 6,
188    #[doc = "7 - UART0"]
189    UART0 = 7,
190    #[doc = "8 - UART1"]
191    UART1 = 8,
192    #[doc = "10 - PIOA"]
193    PIOA = 10,
194    #[doc = "11 - PIOB"]
195    PIOB = 11,
196    #[doc = "13 - USART0"]
197    USART0 = 13,
198    #[doc = "14 - USART1"]
199    USART1 = 14,
200    #[doc = "15 - USART2"]
201    USART2 = 15,
202    #[doc = "16 - PIOD"]
203    PIOD = 16,
204    #[doc = "18 - HSMCI"]
205    HSMCI = 18,
206    #[doc = "19 - TWIHS0"]
207    TWIHS0 = 19,
208    #[doc = "20 - TWIHS1"]
209    TWIHS1 = 20,
210    #[doc = "21 - SPI0"]
211    SPI0 = 21,
212    #[doc = "22 - SSC"]
213    SSC = 22,
214    #[doc = "23 - TC0"]
215    TC0 = 23,
216    #[doc = "24 - TC1"]
217    TC1 = 24,
218    #[doc = "25 - TC2"]
219    TC2 = 25,
220    #[doc = "26 - TC3"]
221    TC3 = 26,
222    #[doc = "27 - TC4"]
223    TC4 = 27,
224    #[doc = "28 - TC5"]
225    TC5 = 28,
226    #[doc = "29 - AFEC0"]
227    AFEC0 = 29,
228    #[doc = "30 - DACC"]
229    DACC = 30,
230    #[doc = "31 - PWM0"]
231    PWM0 = 31,
232    #[doc = "32 - ICM"]
233    ICM = 32,
234    #[doc = "33 - ACC"]
235    ACC = 33,
236    #[doc = "34 - USBHS"]
237    USBHS = 34,
238    #[doc = "40 - AFEC1"]
239    AFEC1 = 40,
240    #[doc = "41 - TWIHS2"]
241    TWIHS2 = 41,
242    #[doc = "43 - QSPI"]
243    QSPI = 43,
244    #[doc = "44 - UART2"]
245    UART2 = 44,
246    #[doc = "45 - UART3"]
247    UART3 = 45,
248    #[doc = "46 - UART4"]
249    UART4 = 46,
250    #[doc = "47 - TC6"]
251    TC6 = 47,
252    #[doc = "48 - TC7"]
253    TC7 = 48,
254    #[doc = "49 - TC8"]
255    TC8 = 49,
256    #[doc = "50 - TC9"]
257    TC9 = 50,
258    #[doc = "51 - TC10"]
259    TC10 = 51,
260    #[doc = "52 - TC11"]
261    TC11 = 52,
262    #[doc = "56 - AES"]
263    AES = 56,
264    #[doc = "57 - TRNG"]
265    TRNG = 57,
266    #[doc = "58 - XDMAC"]
267    XDMAC = 58,
268    #[doc = "59 - ISI"]
269    ISI = 59,
270    #[doc = "60 - PWM1"]
271    PWM1 = 60,
272    #[doc = "61 - FPU"]
273    FPU = 61,
274    #[doc = "63 - RSWDT"]
275    RSWDT = 63,
276    #[doc = "68 - IXC"]
277    IXC = 68,
278}
279unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
280    #[inline(always)]
281    fn number(self) -> u16 {
282        self as u16
283    }
284}
285#[doc = "Analog Comparator Controller"]
286pub struct ACC {
287    _marker: PhantomData<*const ()>,
288}
289unsafe impl Send for ACC {}
290impl ACC {
291    #[doc = r"Pointer to the register block"]
292    pub const PTR: *const acc::RegisterBlock = 0x4004_4000 as *const _;
293    #[doc = r"Return the pointer to the register block"]
294    #[inline(always)]
295    pub const fn ptr() -> *const acc::RegisterBlock {
296        Self::PTR
297    }
298}
299impl Deref for ACC {
300    type Target = acc::RegisterBlock;
301    #[inline(always)]
302    fn deref(&self) -> &Self::Target {
303        unsafe { &*Self::PTR }
304    }
305}
306impl core::fmt::Debug for ACC {
307    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
308        f.debug_struct("ACC").finish()
309    }
310}
311#[doc = "Analog Comparator Controller"]
312pub mod acc;
313#[doc = "Advanced Encryption Standard"]
314pub struct AES {
315    _marker: PhantomData<*const ()>,
316}
317unsafe impl Send for AES {}
318impl AES {
319    #[doc = r"Pointer to the register block"]
320    pub const PTR: *const aes::RegisterBlock = 0x4006_c000 as *const _;
321    #[doc = r"Return the pointer to the register block"]
322    #[inline(always)]
323    pub const fn ptr() -> *const aes::RegisterBlock {
324        Self::PTR
325    }
326}
327impl Deref for AES {
328    type Target = aes::RegisterBlock;
329    #[inline(always)]
330    fn deref(&self) -> &Self::Target {
331        unsafe { &*Self::PTR }
332    }
333}
334impl core::fmt::Debug for AES {
335    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
336        f.debug_struct("AES").finish()
337    }
338}
339#[doc = "Advanced Encryption Standard"]
340pub mod aes;
341#[doc = "Analog Front-End Controller"]
342pub struct AFEC0 {
343    _marker: PhantomData<*const ()>,
344}
345unsafe impl Send for AFEC0 {}
346impl AFEC0 {
347    #[doc = r"Pointer to the register block"]
348    pub const PTR: *const afec0::RegisterBlock = 0x4003_c000 as *const _;
349    #[doc = r"Return the pointer to the register block"]
350    #[inline(always)]
351    pub const fn ptr() -> *const afec0::RegisterBlock {
352        Self::PTR
353    }
354}
355impl Deref for AFEC0 {
356    type Target = afec0::RegisterBlock;
357    #[inline(always)]
358    fn deref(&self) -> &Self::Target {
359        unsafe { &*Self::PTR }
360    }
361}
362impl core::fmt::Debug for AFEC0 {
363    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
364        f.debug_struct("AFEC0").finish()
365    }
366}
367#[doc = "Analog Front-End Controller"]
368pub mod afec0;
369#[doc = "Analog Front-End Controller"]
370pub struct AFEC1 {
371    _marker: PhantomData<*const ()>,
372}
373unsafe impl Send for AFEC1 {}
374impl AFEC1 {
375    #[doc = r"Pointer to the register block"]
376    pub const PTR: *const afec0::RegisterBlock = 0x4006_4000 as *const _;
377    #[doc = r"Return the pointer to the register block"]
378    #[inline(always)]
379    pub const fn ptr() -> *const afec0::RegisterBlock {
380        Self::PTR
381    }
382}
383impl Deref for AFEC1 {
384    type Target = afec0::RegisterBlock;
385    #[inline(always)]
386    fn deref(&self) -> &Self::Target {
387        unsafe { &*Self::PTR }
388    }
389}
390impl core::fmt::Debug for AFEC1 {
391    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
392        f.debug_struct("AFEC1").finish()
393    }
394}
395#[doc = "Analog Front-End Controller"]
396pub use afec0 as afec1;
397#[doc = "Chip Identifier"]
398pub struct CHIPID {
399    _marker: PhantomData<*const ()>,
400}
401unsafe impl Send for CHIPID {}
402impl CHIPID {
403    #[doc = r"Pointer to the register block"]
404    pub const PTR: *const chipid::RegisterBlock = 0x400e_0940 as *const _;
405    #[doc = r"Return the pointer to the register block"]
406    #[inline(always)]
407    pub const fn ptr() -> *const chipid::RegisterBlock {
408        Self::PTR
409    }
410}
411impl Deref for CHIPID {
412    type Target = chipid::RegisterBlock;
413    #[inline(always)]
414    fn deref(&self) -> &Self::Target {
415        unsafe { &*Self::PTR }
416    }
417}
418impl core::fmt::Debug for CHIPID {
419    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
420        f.debug_struct("CHIPID").finish()
421    }
422}
423#[doc = "Chip Identifier"]
424pub mod chipid;
425#[doc = "Digital-to-Analog Converter Controller"]
426pub struct DACC {
427    _marker: PhantomData<*const ()>,
428}
429unsafe impl Send for DACC {}
430impl DACC {
431    #[doc = r"Pointer to the register block"]
432    pub const PTR: *const dacc::RegisterBlock = 0x4004_0000 as *const _;
433    #[doc = r"Return the pointer to the register block"]
434    #[inline(always)]
435    pub const fn ptr() -> *const dacc::RegisterBlock {
436        Self::PTR
437    }
438}
439impl Deref for DACC {
440    type Target = dacc::RegisterBlock;
441    #[inline(always)]
442    fn deref(&self) -> &Self::Target {
443        unsafe { &*Self::PTR }
444    }
445}
446impl core::fmt::Debug for DACC {
447    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
448        f.debug_struct("DACC").finish()
449    }
450}
451#[doc = "Digital-to-Analog Converter Controller"]
452pub mod dacc;
453#[doc = "Embedded Flash Controller"]
454pub struct EFC {
455    _marker: PhantomData<*const ()>,
456}
457unsafe impl Send for EFC {}
458impl EFC {
459    #[doc = r"Pointer to the register block"]
460    pub const PTR: *const efc::RegisterBlock = 0x400e_0c00 as *const _;
461    #[doc = r"Return the pointer to the register block"]
462    #[inline(always)]
463    pub const fn ptr() -> *const efc::RegisterBlock {
464        Self::PTR
465    }
466}
467impl Deref for EFC {
468    type Target = efc::RegisterBlock;
469    #[inline(always)]
470    fn deref(&self) -> &Self::Target {
471        unsafe { &*Self::PTR }
472    }
473}
474impl core::fmt::Debug for EFC {
475    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
476        f.debug_struct("EFC").finish()
477    }
478}
479#[doc = "Embedded Flash Controller"]
480pub mod efc;
481#[doc = "General Purpose Backup Registers"]
482pub struct GPBR {
483    _marker: PhantomData<*const ()>,
484}
485unsafe impl Send for GPBR {}
486impl GPBR {
487    #[doc = r"Pointer to the register block"]
488    pub const PTR: *const gpbr::RegisterBlock = 0x400e_1890 as *const _;
489    #[doc = r"Return the pointer to the register block"]
490    #[inline(always)]
491    pub const fn ptr() -> *const gpbr::RegisterBlock {
492        Self::PTR
493    }
494}
495impl Deref for GPBR {
496    type Target = gpbr::RegisterBlock;
497    #[inline(always)]
498    fn deref(&self) -> &Self::Target {
499        unsafe { &*Self::PTR }
500    }
501}
502impl core::fmt::Debug for GPBR {
503    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
504        f.debug_struct("GPBR").finish()
505    }
506}
507#[doc = "General Purpose Backup Registers"]
508pub mod gpbr;
509#[doc = "High Speed MultiMedia Card Interface"]
510pub struct HSMCI {
511    _marker: PhantomData<*const ()>,
512}
513unsafe impl Send for HSMCI {}
514impl HSMCI {
515    #[doc = r"Pointer to the register block"]
516    pub const PTR: *const hsmci::RegisterBlock = 0x4000_0000 as *const _;
517    #[doc = r"Return the pointer to the register block"]
518    #[inline(always)]
519    pub const fn ptr() -> *const hsmci::RegisterBlock {
520        Self::PTR
521    }
522}
523impl Deref for HSMCI {
524    type Target = hsmci::RegisterBlock;
525    #[inline(always)]
526    fn deref(&self) -> &Self::Target {
527        unsafe { &*Self::PTR }
528    }
529}
530impl core::fmt::Debug for HSMCI {
531    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
532        f.debug_struct("HSMCI").finish()
533    }
534}
535#[doc = "High Speed MultiMedia Card Interface"]
536pub mod hsmci;
537#[doc = "Integrity Check Monitor"]
538pub struct ICM {
539    _marker: PhantomData<*const ()>,
540}
541unsafe impl Send for ICM {}
542impl ICM {
543    #[doc = r"Pointer to the register block"]
544    pub const PTR: *const icm::RegisterBlock = 0x4004_8000 as *const _;
545    #[doc = r"Return the pointer to the register block"]
546    #[inline(always)]
547    pub const fn ptr() -> *const icm::RegisterBlock {
548        Self::PTR
549    }
550}
551impl Deref for ICM {
552    type Target = icm::RegisterBlock;
553    #[inline(always)]
554    fn deref(&self) -> &Self::Target {
555        unsafe { &*Self::PTR }
556    }
557}
558impl core::fmt::Debug for ICM {
559    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
560        f.debug_struct("ICM").finish()
561    }
562}
563#[doc = "Integrity Check Monitor"]
564pub mod icm;
565#[doc = "Image Sensor Interface"]
566pub struct ISI {
567    _marker: PhantomData<*const ()>,
568}
569unsafe impl Send for ISI {}
570impl ISI {
571    #[doc = r"Pointer to the register block"]
572    pub const PTR: *const isi::RegisterBlock = 0x4004_c000 as *const _;
573    #[doc = r"Return the pointer to the register block"]
574    #[inline(always)]
575    pub const fn ptr() -> *const isi::RegisterBlock {
576        Self::PTR
577    }
578}
579impl Deref for ISI {
580    type Target = isi::RegisterBlock;
581    #[inline(always)]
582    fn deref(&self) -> &Self::Target {
583        unsafe { &*Self::PTR }
584    }
585}
586impl core::fmt::Debug for ISI {
587    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
588        f.debug_struct("ISI").finish()
589    }
590}
591#[doc = "Image Sensor Interface"]
592pub mod isi;
593#[doc = "AHB Bus Matrix"]
594pub struct MATRIX {
595    _marker: PhantomData<*const ()>,
596}
597unsafe impl Send for MATRIX {}
598impl MATRIX {
599    #[doc = r"Pointer to the register block"]
600    pub const PTR: *const matrix::RegisterBlock = 0x4008_8000 as *const _;
601    #[doc = r"Return the pointer to the register block"]
602    #[inline(always)]
603    pub const fn ptr() -> *const matrix::RegisterBlock {
604        Self::PTR
605    }
606}
607impl Deref for MATRIX {
608    type Target = matrix::RegisterBlock;
609    #[inline(always)]
610    fn deref(&self) -> &Self::Target {
611        unsafe { &*Self::PTR }
612    }
613}
614impl core::fmt::Debug for MATRIX {
615    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
616        f.debug_struct("MATRIX").finish()
617    }
618}
619#[doc = "AHB Bus Matrix"]
620pub mod matrix;
621#[doc = "Parallel Input/Output Controller"]
622pub struct PIOA {
623    _marker: PhantomData<*const ()>,
624}
625unsafe impl Send for PIOA {}
626impl PIOA {
627    #[doc = r"Pointer to the register block"]
628    pub const PTR: *const pioa::RegisterBlock = 0x400e_0e00 as *const _;
629    #[doc = r"Return the pointer to the register block"]
630    #[inline(always)]
631    pub const fn ptr() -> *const pioa::RegisterBlock {
632        Self::PTR
633    }
634}
635impl Deref for PIOA {
636    type Target = pioa::RegisterBlock;
637    #[inline(always)]
638    fn deref(&self) -> &Self::Target {
639        unsafe { &*Self::PTR }
640    }
641}
642impl core::fmt::Debug for PIOA {
643    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
644        f.debug_struct("PIOA").finish()
645    }
646}
647#[doc = "Parallel Input/Output Controller"]
648pub mod pioa;
649#[doc = "Parallel Input/Output Controller"]
650pub struct PIOB {
651    _marker: PhantomData<*const ()>,
652}
653unsafe impl Send for PIOB {}
654impl PIOB {
655    #[doc = r"Pointer to the register block"]
656    pub const PTR: *const pioa::RegisterBlock = 0x400e_1000 as *const _;
657    #[doc = r"Return the pointer to the register block"]
658    #[inline(always)]
659    pub const fn ptr() -> *const pioa::RegisterBlock {
660        Self::PTR
661    }
662}
663impl Deref for PIOB {
664    type Target = pioa::RegisterBlock;
665    #[inline(always)]
666    fn deref(&self) -> &Self::Target {
667        unsafe { &*Self::PTR }
668    }
669}
670impl core::fmt::Debug for PIOB {
671    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
672        f.debug_struct("PIOB").finish()
673    }
674}
675#[doc = "Parallel Input/Output Controller"]
676pub use pioa as piob;
677#[doc = "Parallel Input/Output Controller"]
678pub struct PIOD {
679    _marker: PhantomData<*const ()>,
680}
681unsafe impl Send for PIOD {}
682impl PIOD {
683    #[doc = r"Pointer to the register block"]
684    pub const PTR: *const pioa::RegisterBlock = 0x400e_1400 as *const _;
685    #[doc = r"Return the pointer to the register block"]
686    #[inline(always)]
687    pub const fn ptr() -> *const pioa::RegisterBlock {
688        Self::PTR
689    }
690}
691impl Deref for PIOD {
692    type Target = pioa::RegisterBlock;
693    #[inline(always)]
694    fn deref(&self) -> &Self::Target {
695        unsafe { &*Self::PTR }
696    }
697}
698impl core::fmt::Debug for PIOD {
699    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
700        f.debug_struct("PIOD").finish()
701    }
702}
703#[doc = "Parallel Input/Output Controller"]
704pub use pioa as piod;
705#[doc = "Power Management Controller"]
706pub struct PMC {
707    _marker: PhantomData<*const ()>,
708}
709unsafe impl Send for PMC {}
710impl PMC {
711    #[doc = r"Pointer to the register block"]
712    pub const PTR: *const pmc::RegisterBlock = 0x400e_0600 as *const _;
713    #[doc = r"Return the pointer to the register block"]
714    #[inline(always)]
715    pub const fn ptr() -> *const pmc::RegisterBlock {
716        Self::PTR
717    }
718}
719impl Deref for PMC {
720    type Target = pmc::RegisterBlock;
721    #[inline(always)]
722    fn deref(&self) -> &Self::Target {
723        unsafe { &*Self::PTR }
724    }
725}
726impl core::fmt::Debug for PMC {
727    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
728        f.debug_struct("PMC").finish()
729    }
730}
731#[doc = "Power Management Controller"]
732pub mod pmc;
733#[doc = "Pulse Width Modulation Controller"]
734pub struct PWM0 {
735    _marker: PhantomData<*const ()>,
736}
737unsafe impl Send for PWM0 {}
738impl PWM0 {
739    #[doc = r"Pointer to the register block"]
740    pub const PTR: *const pwm0::RegisterBlock = 0x4002_0000 as *const _;
741    #[doc = r"Return the pointer to the register block"]
742    #[inline(always)]
743    pub const fn ptr() -> *const pwm0::RegisterBlock {
744        Self::PTR
745    }
746}
747impl Deref for PWM0 {
748    type Target = pwm0::RegisterBlock;
749    #[inline(always)]
750    fn deref(&self) -> &Self::Target {
751        unsafe { &*Self::PTR }
752    }
753}
754impl core::fmt::Debug for PWM0 {
755    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
756        f.debug_struct("PWM0").finish()
757    }
758}
759#[doc = "Pulse Width Modulation Controller"]
760pub mod pwm0;
761#[doc = "Pulse Width Modulation Controller"]
762pub struct PWM1 {
763    _marker: PhantomData<*const ()>,
764}
765unsafe impl Send for PWM1 {}
766impl PWM1 {
767    #[doc = r"Pointer to the register block"]
768    pub const PTR: *const pwm0::RegisterBlock = 0x4005_c000 as *const _;
769    #[doc = r"Return the pointer to the register block"]
770    #[inline(always)]
771    pub const fn ptr() -> *const pwm0::RegisterBlock {
772        Self::PTR
773    }
774}
775impl Deref for PWM1 {
776    type Target = pwm0::RegisterBlock;
777    #[inline(always)]
778    fn deref(&self) -> &Self::Target {
779        unsafe { &*Self::PTR }
780    }
781}
782impl core::fmt::Debug for PWM1 {
783    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
784        f.debug_struct("PWM1").finish()
785    }
786}
787#[doc = "Pulse Width Modulation Controller"]
788pub use pwm0 as pwm1;
789#[doc = "Quad Serial Peripheral Interface"]
790pub struct QSPI {
791    _marker: PhantomData<*const ()>,
792}
793unsafe impl Send for QSPI {}
794impl QSPI {
795    #[doc = r"Pointer to the register block"]
796    pub const PTR: *const qspi::RegisterBlock = 0x4007_c000 as *const _;
797    #[doc = r"Return the pointer to the register block"]
798    #[inline(always)]
799    pub const fn ptr() -> *const qspi::RegisterBlock {
800        Self::PTR
801    }
802}
803impl Deref for QSPI {
804    type Target = qspi::RegisterBlock;
805    #[inline(always)]
806    fn deref(&self) -> &Self::Target {
807        unsafe { &*Self::PTR }
808    }
809}
810impl core::fmt::Debug for QSPI {
811    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
812        f.debug_struct("QSPI").finish()
813    }
814}
815#[doc = "Quad Serial Peripheral Interface"]
816pub mod qspi;
817#[doc = "Reset Controller"]
818pub struct RSTC {
819    _marker: PhantomData<*const ()>,
820}
821unsafe impl Send for RSTC {}
822impl RSTC {
823    #[doc = r"Pointer to the register block"]
824    pub const PTR: *const rstc::RegisterBlock = 0x400e_1800 as *const _;
825    #[doc = r"Return the pointer to the register block"]
826    #[inline(always)]
827    pub const fn ptr() -> *const rstc::RegisterBlock {
828        Self::PTR
829    }
830}
831impl Deref for RSTC {
832    type Target = rstc::RegisterBlock;
833    #[inline(always)]
834    fn deref(&self) -> &Self::Target {
835        unsafe { &*Self::PTR }
836    }
837}
838impl core::fmt::Debug for RSTC {
839    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
840        f.debug_struct("RSTC").finish()
841    }
842}
843#[doc = "Reset Controller"]
844pub mod rstc;
845#[doc = "Reinforced Safety Watchdog Timer"]
846pub struct RSWDT {
847    _marker: PhantomData<*const ()>,
848}
849unsafe impl Send for RSWDT {}
850impl RSWDT {
851    #[doc = r"Pointer to the register block"]
852    pub const PTR: *const rswdt::RegisterBlock = 0x400e_1900 as *const _;
853    #[doc = r"Return the pointer to the register block"]
854    #[inline(always)]
855    pub const fn ptr() -> *const rswdt::RegisterBlock {
856        Self::PTR
857    }
858}
859impl Deref for RSWDT {
860    type Target = rswdt::RegisterBlock;
861    #[inline(always)]
862    fn deref(&self) -> &Self::Target {
863        unsafe { &*Self::PTR }
864    }
865}
866impl core::fmt::Debug for RSWDT {
867    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
868        f.debug_struct("RSWDT").finish()
869    }
870}
871#[doc = "Reinforced Safety Watchdog Timer"]
872pub mod rswdt;
873#[doc = "Real-time Clock"]
874pub struct RTC {
875    _marker: PhantomData<*const ()>,
876}
877unsafe impl Send for RTC {}
878impl RTC {
879    #[doc = r"Pointer to the register block"]
880    pub const PTR: *const rtc::RegisterBlock = 0x400e_1860 as *const _;
881    #[doc = r"Return the pointer to the register block"]
882    #[inline(always)]
883    pub const fn ptr() -> *const rtc::RegisterBlock {
884        Self::PTR
885    }
886}
887impl Deref for RTC {
888    type Target = rtc::RegisterBlock;
889    #[inline(always)]
890    fn deref(&self) -> &Self::Target {
891        unsafe { &*Self::PTR }
892    }
893}
894impl core::fmt::Debug for RTC {
895    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
896        f.debug_struct("RTC").finish()
897    }
898}
899#[doc = "Real-time Clock"]
900pub mod rtc;
901#[doc = "Real-time Timer"]
902pub struct RTT {
903    _marker: PhantomData<*const ()>,
904}
905unsafe impl Send for RTT {}
906impl RTT {
907    #[doc = r"Pointer to the register block"]
908    pub const PTR: *const rtt::RegisterBlock = 0x400e_1830 as *const _;
909    #[doc = r"Return the pointer to the register block"]
910    #[inline(always)]
911    pub const fn ptr() -> *const rtt::RegisterBlock {
912        Self::PTR
913    }
914}
915impl Deref for RTT {
916    type Target = rtt::RegisterBlock;
917    #[inline(always)]
918    fn deref(&self) -> &Self::Target {
919        unsafe { &*Self::PTR }
920    }
921}
922impl core::fmt::Debug for RTT {
923    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
924        f.debug_struct("RTT").finish()
925    }
926}
927#[doc = "Real-time Timer"]
928pub mod rtt;
929#[doc = "Serial Peripheral Interface"]
930pub struct SPI0 {
931    _marker: PhantomData<*const ()>,
932}
933unsafe impl Send for SPI0 {}
934impl SPI0 {
935    #[doc = r"Pointer to the register block"]
936    pub const PTR: *const spi0::RegisterBlock = 0x4000_8000 as *const _;
937    #[doc = r"Return the pointer to the register block"]
938    #[inline(always)]
939    pub const fn ptr() -> *const spi0::RegisterBlock {
940        Self::PTR
941    }
942}
943impl Deref for SPI0 {
944    type Target = spi0::RegisterBlock;
945    #[inline(always)]
946    fn deref(&self) -> &Self::Target {
947        unsafe { &*Self::PTR }
948    }
949}
950impl core::fmt::Debug for SPI0 {
951    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
952        f.debug_struct("SPI0").finish()
953    }
954}
955#[doc = "Serial Peripheral Interface"]
956pub mod spi0;
957#[doc = "Synchronous Serial Controller"]
958pub struct SSC {
959    _marker: PhantomData<*const ()>,
960}
961unsafe impl Send for SSC {}
962impl SSC {
963    #[doc = r"Pointer to the register block"]
964    pub const PTR: *const ssc::RegisterBlock = 0x4000_4000 as *const _;
965    #[doc = r"Return the pointer to the register block"]
966    #[inline(always)]
967    pub const fn ptr() -> *const ssc::RegisterBlock {
968        Self::PTR
969    }
970}
971impl Deref for SSC {
972    type Target = ssc::RegisterBlock;
973    #[inline(always)]
974    fn deref(&self) -> &Self::Target {
975        unsafe { &*Self::PTR }
976    }
977}
978impl core::fmt::Debug for SSC {
979    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
980        f.debug_struct("SSC").finish()
981    }
982}
983#[doc = "Synchronous Serial Controller"]
984pub mod ssc;
985#[doc = "Supply Controller"]
986pub struct SUPC {
987    _marker: PhantomData<*const ()>,
988}
989unsafe impl Send for SUPC {}
990impl SUPC {
991    #[doc = r"Pointer to the register block"]
992    pub const PTR: *const supc::RegisterBlock = 0x400e_1810 as *const _;
993    #[doc = r"Return the pointer to the register block"]
994    #[inline(always)]
995    pub const fn ptr() -> *const supc::RegisterBlock {
996        Self::PTR
997    }
998}
999impl Deref for SUPC {
1000    type Target = supc::RegisterBlock;
1001    #[inline(always)]
1002    fn deref(&self) -> &Self::Target {
1003        unsafe { &*Self::PTR }
1004    }
1005}
1006impl core::fmt::Debug for SUPC {
1007    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1008        f.debug_struct("SUPC").finish()
1009    }
1010}
1011#[doc = "Supply Controller"]
1012pub mod supc;
1013#[doc = "Timer Counter"]
1014pub struct TC0 {
1015    _marker: PhantomData<*const ()>,
1016}
1017unsafe impl Send for TC0 {}
1018impl TC0 {
1019    #[doc = r"Pointer to the register block"]
1020    pub const PTR: *const tc0::RegisterBlock = 0x4000_c000 as *const _;
1021    #[doc = r"Return the pointer to the register block"]
1022    #[inline(always)]
1023    pub const fn ptr() -> *const tc0::RegisterBlock {
1024        Self::PTR
1025    }
1026}
1027impl Deref for TC0 {
1028    type Target = tc0::RegisterBlock;
1029    #[inline(always)]
1030    fn deref(&self) -> &Self::Target {
1031        unsafe { &*Self::PTR }
1032    }
1033}
1034impl core::fmt::Debug for TC0 {
1035    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1036        f.debug_struct("TC0").finish()
1037    }
1038}
1039#[doc = "Timer Counter"]
1040pub mod tc0;
1041#[doc = "Timer Counter"]
1042pub struct TC1 {
1043    _marker: PhantomData<*const ()>,
1044}
1045unsafe impl Send for TC1 {}
1046impl TC1 {
1047    #[doc = r"Pointer to the register block"]
1048    pub const PTR: *const tc0::RegisterBlock = 0x4001_0000 as *const _;
1049    #[doc = r"Return the pointer to the register block"]
1050    #[inline(always)]
1051    pub const fn ptr() -> *const tc0::RegisterBlock {
1052        Self::PTR
1053    }
1054}
1055impl Deref for TC1 {
1056    type Target = tc0::RegisterBlock;
1057    #[inline(always)]
1058    fn deref(&self) -> &Self::Target {
1059        unsafe { &*Self::PTR }
1060    }
1061}
1062impl core::fmt::Debug for TC1 {
1063    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1064        f.debug_struct("TC1").finish()
1065    }
1066}
1067#[doc = "Timer Counter"]
1068pub use tc0 as tc1;
1069#[doc = "Timer Counter"]
1070pub struct TC2 {
1071    _marker: PhantomData<*const ()>,
1072}
1073unsafe impl Send for TC2 {}
1074impl TC2 {
1075    #[doc = r"Pointer to the register block"]
1076    pub const PTR: *const tc0::RegisterBlock = 0x4001_4000 as *const _;
1077    #[doc = r"Return the pointer to the register block"]
1078    #[inline(always)]
1079    pub const fn ptr() -> *const tc0::RegisterBlock {
1080        Self::PTR
1081    }
1082}
1083impl Deref for TC2 {
1084    type Target = tc0::RegisterBlock;
1085    #[inline(always)]
1086    fn deref(&self) -> &Self::Target {
1087        unsafe { &*Self::PTR }
1088    }
1089}
1090impl core::fmt::Debug for TC2 {
1091    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1092        f.debug_struct("TC2").finish()
1093    }
1094}
1095#[doc = "Timer Counter"]
1096pub use tc0 as tc2;
1097#[doc = "Timer Counter"]
1098pub struct TC3 {
1099    _marker: PhantomData<*const ()>,
1100}
1101unsafe impl Send for TC3 {}
1102impl TC3 {
1103    #[doc = r"Pointer to the register block"]
1104    pub const PTR: *const tc0::RegisterBlock = 0x4005_4000 as *const _;
1105    #[doc = r"Return the pointer to the register block"]
1106    #[inline(always)]
1107    pub const fn ptr() -> *const tc0::RegisterBlock {
1108        Self::PTR
1109    }
1110}
1111impl Deref for TC3 {
1112    type Target = tc0::RegisterBlock;
1113    #[inline(always)]
1114    fn deref(&self) -> &Self::Target {
1115        unsafe { &*Self::PTR }
1116    }
1117}
1118impl core::fmt::Debug for TC3 {
1119    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1120        f.debug_struct("TC3").finish()
1121    }
1122}
1123#[doc = "Timer Counter"]
1124pub use tc0 as tc3;
1125#[doc = "True Random Number Generator"]
1126pub struct TRNG {
1127    _marker: PhantomData<*const ()>,
1128}
1129unsafe impl Send for TRNG {}
1130impl TRNG {
1131    #[doc = r"Pointer to the register block"]
1132    pub const PTR: *const trng::RegisterBlock = 0x4007_0000 as *const _;
1133    #[doc = r"Return the pointer to the register block"]
1134    #[inline(always)]
1135    pub const fn ptr() -> *const trng::RegisterBlock {
1136        Self::PTR
1137    }
1138}
1139impl Deref for TRNG {
1140    type Target = trng::RegisterBlock;
1141    #[inline(always)]
1142    fn deref(&self) -> &Self::Target {
1143        unsafe { &*Self::PTR }
1144    }
1145}
1146impl core::fmt::Debug for TRNG {
1147    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1148        f.debug_struct("TRNG").finish()
1149    }
1150}
1151#[doc = "True Random Number Generator"]
1152pub mod trng;
1153#[doc = "Two-wire Interface High Speed"]
1154pub struct TWIHS0 {
1155    _marker: PhantomData<*const ()>,
1156}
1157unsafe impl Send for TWIHS0 {}
1158impl TWIHS0 {
1159    #[doc = r"Pointer to the register block"]
1160    pub const PTR: *const twihs0::RegisterBlock = 0x4001_8000 as *const _;
1161    #[doc = r"Return the pointer to the register block"]
1162    #[inline(always)]
1163    pub const fn ptr() -> *const twihs0::RegisterBlock {
1164        Self::PTR
1165    }
1166}
1167impl Deref for TWIHS0 {
1168    type Target = twihs0::RegisterBlock;
1169    #[inline(always)]
1170    fn deref(&self) -> &Self::Target {
1171        unsafe { &*Self::PTR }
1172    }
1173}
1174impl core::fmt::Debug for TWIHS0 {
1175    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1176        f.debug_struct("TWIHS0").finish()
1177    }
1178}
1179#[doc = "Two-wire Interface High Speed"]
1180pub mod twihs0;
1181#[doc = "Two-wire Interface High Speed"]
1182pub struct TWIHS1 {
1183    _marker: PhantomData<*const ()>,
1184}
1185unsafe impl Send for TWIHS1 {}
1186impl TWIHS1 {
1187    #[doc = r"Pointer to the register block"]
1188    pub const PTR: *const twihs0::RegisterBlock = 0x4001_c000 as *const _;
1189    #[doc = r"Return the pointer to the register block"]
1190    #[inline(always)]
1191    pub const fn ptr() -> *const twihs0::RegisterBlock {
1192        Self::PTR
1193    }
1194}
1195impl Deref for TWIHS1 {
1196    type Target = twihs0::RegisterBlock;
1197    #[inline(always)]
1198    fn deref(&self) -> &Self::Target {
1199        unsafe { &*Self::PTR }
1200    }
1201}
1202impl core::fmt::Debug for TWIHS1 {
1203    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1204        f.debug_struct("TWIHS1").finish()
1205    }
1206}
1207#[doc = "Two-wire Interface High Speed"]
1208pub use twihs0 as twihs1;
1209#[doc = "Two-wire Interface High Speed"]
1210pub struct TWIHS2 {
1211    _marker: PhantomData<*const ()>,
1212}
1213unsafe impl Send for TWIHS2 {}
1214impl TWIHS2 {
1215    #[doc = r"Pointer to the register block"]
1216    pub const PTR: *const twihs0::RegisterBlock = 0x4006_0000 as *const _;
1217    #[doc = r"Return the pointer to the register block"]
1218    #[inline(always)]
1219    pub const fn ptr() -> *const twihs0::RegisterBlock {
1220        Self::PTR
1221    }
1222}
1223impl Deref for TWIHS2 {
1224    type Target = twihs0::RegisterBlock;
1225    #[inline(always)]
1226    fn deref(&self) -> &Self::Target {
1227        unsafe { &*Self::PTR }
1228    }
1229}
1230impl core::fmt::Debug for TWIHS2 {
1231    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1232        f.debug_struct("TWIHS2").finish()
1233    }
1234}
1235#[doc = "Two-wire Interface High Speed"]
1236pub use twihs0 as twihs2;
1237#[doc = "Universal Asynchronous Receiver Transmitter"]
1238pub struct UART0 {
1239    _marker: PhantomData<*const ()>,
1240}
1241unsafe impl Send for UART0 {}
1242impl UART0 {
1243    #[doc = r"Pointer to the register block"]
1244    pub const PTR: *const uart0::RegisterBlock = 0x400e_0800 as *const _;
1245    #[doc = r"Return the pointer to the register block"]
1246    #[inline(always)]
1247    pub const fn ptr() -> *const uart0::RegisterBlock {
1248        Self::PTR
1249    }
1250}
1251impl Deref for UART0 {
1252    type Target = uart0::RegisterBlock;
1253    #[inline(always)]
1254    fn deref(&self) -> &Self::Target {
1255        unsafe { &*Self::PTR }
1256    }
1257}
1258impl core::fmt::Debug for UART0 {
1259    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1260        f.debug_struct("UART0").finish()
1261    }
1262}
1263#[doc = "Universal Asynchronous Receiver Transmitter"]
1264pub mod uart0;
1265#[doc = "Universal Asynchronous Receiver Transmitter"]
1266pub struct UART1 {
1267    _marker: PhantomData<*const ()>,
1268}
1269unsafe impl Send for UART1 {}
1270impl UART1 {
1271    #[doc = r"Pointer to the register block"]
1272    pub const PTR: *const uart0::RegisterBlock = 0x400e_0a00 as *const _;
1273    #[doc = r"Return the pointer to the register block"]
1274    #[inline(always)]
1275    pub const fn ptr() -> *const uart0::RegisterBlock {
1276        Self::PTR
1277    }
1278}
1279impl Deref for UART1 {
1280    type Target = uart0::RegisterBlock;
1281    #[inline(always)]
1282    fn deref(&self) -> &Self::Target {
1283        unsafe { &*Self::PTR }
1284    }
1285}
1286impl core::fmt::Debug for UART1 {
1287    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1288        f.debug_struct("UART1").finish()
1289    }
1290}
1291#[doc = "Universal Asynchronous Receiver Transmitter"]
1292pub use uart0 as uart1;
1293#[doc = "Universal Asynchronous Receiver Transmitter"]
1294pub struct UART2 {
1295    _marker: PhantomData<*const ()>,
1296}
1297unsafe impl Send for UART2 {}
1298impl UART2 {
1299    #[doc = r"Pointer to the register block"]
1300    pub const PTR: *const uart0::RegisterBlock = 0x400e_1a00 as *const _;
1301    #[doc = r"Return the pointer to the register block"]
1302    #[inline(always)]
1303    pub const fn ptr() -> *const uart0::RegisterBlock {
1304        Self::PTR
1305    }
1306}
1307impl Deref for UART2 {
1308    type Target = uart0::RegisterBlock;
1309    #[inline(always)]
1310    fn deref(&self) -> &Self::Target {
1311        unsafe { &*Self::PTR }
1312    }
1313}
1314impl core::fmt::Debug for UART2 {
1315    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1316        f.debug_struct("UART2").finish()
1317    }
1318}
1319#[doc = "Universal Asynchronous Receiver Transmitter"]
1320pub use uart0 as uart2;
1321#[doc = "Universal Asynchronous Receiver Transmitter"]
1322pub struct UART3 {
1323    _marker: PhantomData<*const ()>,
1324}
1325unsafe impl Send for UART3 {}
1326impl UART3 {
1327    #[doc = r"Pointer to the register block"]
1328    pub const PTR: *const uart0::RegisterBlock = 0x400e_1c00 as *const _;
1329    #[doc = r"Return the pointer to the register block"]
1330    #[inline(always)]
1331    pub const fn ptr() -> *const uart0::RegisterBlock {
1332        Self::PTR
1333    }
1334}
1335impl Deref for UART3 {
1336    type Target = uart0::RegisterBlock;
1337    #[inline(always)]
1338    fn deref(&self) -> &Self::Target {
1339        unsafe { &*Self::PTR }
1340    }
1341}
1342impl core::fmt::Debug for UART3 {
1343    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1344        f.debug_struct("UART3").finish()
1345    }
1346}
1347#[doc = "Universal Asynchronous Receiver Transmitter"]
1348pub use uart0 as uart3;
1349#[doc = "Universal Asynchronous Receiver Transmitter"]
1350pub struct UART4 {
1351    _marker: PhantomData<*const ()>,
1352}
1353unsafe impl Send for UART4 {}
1354impl UART4 {
1355    #[doc = r"Pointer to the register block"]
1356    pub const PTR: *const uart0::RegisterBlock = 0x400e_1e00 as *const _;
1357    #[doc = r"Return the pointer to the register block"]
1358    #[inline(always)]
1359    pub const fn ptr() -> *const uart0::RegisterBlock {
1360        Self::PTR
1361    }
1362}
1363impl Deref for UART4 {
1364    type Target = uart0::RegisterBlock;
1365    #[inline(always)]
1366    fn deref(&self) -> &Self::Target {
1367        unsafe { &*Self::PTR }
1368    }
1369}
1370impl core::fmt::Debug for UART4 {
1371    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1372        f.debug_struct("UART4").finish()
1373    }
1374}
1375#[doc = "Universal Asynchronous Receiver Transmitter"]
1376pub use uart0 as uart4;
1377#[doc = "Universal Synchronous Asynchronous Receiver Transmitter"]
1378pub struct USART0 {
1379    _marker: PhantomData<*const ()>,
1380}
1381unsafe impl Send for USART0 {}
1382impl USART0 {
1383    #[doc = r"Pointer to the register block"]
1384    pub const PTR: *const usart0::RegisterBlock = 0x4002_4000 as *const _;
1385    #[doc = r"Return the pointer to the register block"]
1386    #[inline(always)]
1387    pub const fn ptr() -> *const usart0::RegisterBlock {
1388        Self::PTR
1389    }
1390}
1391impl Deref for USART0 {
1392    type Target = usart0::RegisterBlock;
1393    #[inline(always)]
1394    fn deref(&self) -> &Self::Target {
1395        unsafe { &*Self::PTR }
1396    }
1397}
1398impl core::fmt::Debug for USART0 {
1399    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1400        f.debug_struct("USART0").finish()
1401    }
1402}
1403#[doc = "Universal Synchronous Asynchronous Receiver Transmitter"]
1404pub mod usart0;
1405#[doc = "Universal Synchronous Asynchronous Receiver Transmitter"]
1406pub struct USART1 {
1407    _marker: PhantomData<*const ()>,
1408}
1409unsafe impl Send for USART1 {}
1410impl USART1 {
1411    #[doc = r"Pointer to the register block"]
1412    pub const PTR: *const usart0::RegisterBlock = 0x4002_8000 as *const _;
1413    #[doc = r"Return the pointer to the register block"]
1414    #[inline(always)]
1415    pub const fn ptr() -> *const usart0::RegisterBlock {
1416        Self::PTR
1417    }
1418}
1419impl Deref for USART1 {
1420    type Target = usart0::RegisterBlock;
1421    #[inline(always)]
1422    fn deref(&self) -> &Self::Target {
1423        unsafe { &*Self::PTR }
1424    }
1425}
1426impl core::fmt::Debug for USART1 {
1427    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1428        f.debug_struct("USART1").finish()
1429    }
1430}
1431#[doc = "Universal Synchronous Asynchronous Receiver Transmitter"]
1432pub use usart0 as usart1;
1433#[doc = "Universal Synchronous Asynchronous Receiver Transmitter"]
1434pub struct USART2 {
1435    _marker: PhantomData<*const ()>,
1436}
1437unsafe impl Send for USART2 {}
1438impl USART2 {
1439    #[doc = r"Pointer to the register block"]
1440    pub const PTR: *const usart0::RegisterBlock = 0x4002_c000 as *const _;
1441    #[doc = r"Return the pointer to the register block"]
1442    #[inline(always)]
1443    pub const fn ptr() -> *const usart0::RegisterBlock {
1444        Self::PTR
1445    }
1446}
1447impl Deref for USART2 {
1448    type Target = usart0::RegisterBlock;
1449    #[inline(always)]
1450    fn deref(&self) -> &Self::Target {
1451        unsafe { &*Self::PTR }
1452    }
1453}
1454impl core::fmt::Debug for USART2 {
1455    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1456        f.debug_struct("USART2").finish()
1457    }
1458}
1459#[doc = "Universal Synchronous Asynchronous Receiver Transmitter"]
1460pub use usart0 as usart2;
1461#[doc = "USB High-Speed Interface"]
1462pub struct USBHS {
1463    _marker: PhantomData<*const ()>,
1464}
1465unsafe impl Send for USBHS {}
1466impl USBHS {
1467    #[doc = r"Pointer to the register block"]
1468    pub const PTR: *const usbhs::RegisterBlock = 0x4003_8000 as *const _;
1469    #[doc = r"Return the pointer to the register block"]
1470    #[inline(always)]
1471    pub const fn ptr() -> *const usbhs::RegisterBlock {
1472        Self::PTR
1473    }
1474}
1475impl Deref for USBHS {
1476    type Target = usbhs::RegisterBlock;
1477    #[inline(always)]
1478    fn deref(&self) -> &Self::Target {
1479        unsafe { &*Self::PTR }
1480    }
1481}
1482impl core::fmt::Debug for USBHS {
1483    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1484        f.debug_struct("USBHS").finish()
1485    }
1486}
1487#[doc = "USB High-Speed Interface"]
1488pub mod usbhs;
1489#[doc = "USB Transmitter Interface Macrocell"]
1490pub struct UTMI {
1491    _marker: PhantomData<*const ()>,
1492}
1493unsafe impl Send for UTMI {}
1494impl UTMI {
1495    #[doc = r"Pointer to the register block"]
1496    pub const PTR: *const utmi::RegisterBlock = 0x400e_0400 as *const _;
1497    #[doc = r"Return the pointer to the register block"]
1498    #[inline(always)]
1499    pub const fn ptr() -> *const utmi::RegisterBlock {
1500        Self::PTR
1501    }
1502}
1503impl Deref for UTMI {
1504    type Target = utmi::RegisterBlock;
1505    #[inline(always)]
1506    fn deref(&self) -> &Self::Target {
1507        unsafe { &*Self::PTR }
1508    }
1509}
1510impl core::fmt::Debug for UTMI {
1511    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1512        f.debug_struct("UTMI").finish()
1513    }
1514}
1515#[doc = "USB Transmitter Interface Macrocell"]
1516pub mod utmi;
1517#[doc = "Watchdog Timer"]
1518pub struct WDT {
1519    _marker: PhantomData<*const ()>,
1520}
1521unsafe impl Send for WDT {}
1522impl WDT {
1523    #[doc = r"Pointer to the register block"]
1524    pub const PTR: *const wdt::RegisterBlock = 0x400e_1850 as *const _;
1525    #[doc = r"Return the pointer to the register block"]
1526    #[inline(always)]
1527    pub const fn ptr() -> *const wdt::RegisterBlock {
1528        Self::PTR
1529    }
1530}
1531impl Deref for WDT {
1532    type Target = wdt::RegisterBlock;
1533    #[inline(always)]
1534    fn deref(&self) -> &Self::Target {
1535        unsafe { &*Self::PTR }
1536    }
1537}
1538impl core::fmt::Debug for WDT {
1539    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1540        f.debug_struct("WDT").finish()
1541    }
1542}
1543#[doc = "Watchdog Timer"]
1544pub mod wdt;
1545#[doc = "Extensible DMA Controller"]
1546pub struct XDMAC {
1547    _marker: PhantomData<*const ()>,
1548}
1549unsafe impl Send for XDMAC {}
1550impl XDMAC {
1551    #[doc = r"Pointer to the register block"]
1552    pub const PTR: *const xdmac::RegisterBlock = 0x4007_8000 as *const _;
1553    #[doc = r"Return the pointer to the register block"]
1554    #[inline(always)]
1555    pub const fn ptr() -> *const xdmac::RegisterBlock {
1556        Self::PTR
1557    }
1558}
1559impl Deref for XDMAC {
1560    type Target = xdmac::RegisterBlock;
1561    #[inline(always)]
1562    fn deref(&self) -> &Self::Target {
1563        unsafe { &*Self::PTR }
1564    }
1565}
1566impl core::fmt::Debug for XDMAC {
1567    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1568        f.debug_struct("XDMAC").finish()
1569    }
1570}
1571#[doc = "Extensible DMA Controller"]
1572pub mod xdmac;
1573#[doc = "LOCKBIT"]
1574pub struct LOCKBIT {
1575    _marker: PhantomData<*const ()>,
1576}
1577unsafe impl Send for LOCKBIT {}
1578impl LOCKBIT {
1579    #[doc = r"Pointer to the register block"]
1580    pub const PTR: *const lockbit::RegisterBlock = 0 as *const _;
1581    #[doc = r"Return the pointer to the register block"]
1582    #[inline(always)]
1583    pub const fn ptr() -> *const lockbit::RegisterBlock {
1584        Self::PTR
1585    }
1586}
1587impl Deref for LOCKBIT {
1588    type Target = lockbit::RegisterBlock;
1589    #[inline(always)]
1590    fn deref(&self) -> &Self::Target {
1591        unsafe { &*Self::PTR }
1592    }
1593}
1594impl core::fmt::Debug for LOCKBIT {
1595    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1596        f.debug_struct("LOCKBIT").finish()
1597    }
1598}
1599#[doc = "LOCKBIT"]
1600pub mod lockbit;
1601#[doc = "System control not in SCB"]
1602pub struct SCNSCB {
1603    _marker: PhantomData<*const ()>,
1604}
1605unsafe impl Send for SCNSCB {}
1606impl SCNSCB {
1607    #[doc = r"Pointer to the register block"]
1608    pub const PTR: *const scn_scb::RegisterBlock = 0xe000_e000 as *const _;
1609    #[doc = r"Return the pointer to the register block"]
1610    #[inline(always)]
1611    pub const fn ptr() -> *const scn_scb::RegisterBlock {
1612        Self::PTR
1613    }
1614}
1615impl Deref for SCNSCB {
1616    type Target = scn_scb::RegisterBlock;
1617    #[inline(always)]
1618    fn deref(&self) -> &Self::Target {
1619        unsafe { &*Self::PTR }
1620    }
1621}
1622impl core::fmt::Debug for SCNSCB {
1623    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1624        f.debug_struct("SCNSCB").finish()
1625    }
1626}
1627#[doc = "System control not in SCB"]
1628pub mod scn_scb;
1629#[doc = "System timer"]
1630pub struct SYSTICK {
1631    _marker: PhantomData<*const ()>,
1632}
1633unsafe impl Send for SYSTICK {}
1634impl SYSTICK {
1635    #[doc = r"Pointer to the register block"]
1636    pub const PTR: *const sys_tick::RegisterBlock = 0xe000_e010 as *const _;
1637    #[doc = r"Return the pointer to the register block"]
1638    #[inline(always)]
1639    pub const fn ptr() -> *const sys_tick::RegisterBlock {
1640        Self::PTR
1641    }
1642}
1643impl Deref for SYSTICK {
1644    type Target = sys_tick::RegisterBlock;
1645    #[inline(always)]
1646    fn deref(&self) -> &Self::Target {
1647        unsafe { &*Self::PTR }
1648    }
1649}
1650impl core::fmt::Debug for SYSTICK {
1651    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1652        f.debug_struct("SYSTICK").finish()
1653    }
1654}
1655#[doc = "System timer"]
1656pub mod sys_tick;
1657#[no_mangle]
1658static mut DEVICE_PERIPHERALS: bool = false;
1659#[doc = r"All the peripherals"]
1660#[allow(non_snake_case)]
1661pub struct Peripherals {
1662    #[doc = "ACC"]
1663    pub ACC: ACC,
1664    #[doc = "AES"]
1665    pub AES: AES,
1666    #[doc = "AFEC0"]
1667    pub AFEC0: AFEC0,
1668    #[doc = "AFEC1"]
1669    pub AFEC1: AFEC1,
1670    #[doc = "CHIPID"]
1671    pub CHIPID: CHIPID,
1672    #[doc = "DACC"]
1673    pub DACC: DACC,
1674    #[doc = "EFC"]
1675    pub EFC: EFC,
1676    #[doc = "GPBR"]
1677    pub GPBR: GPBR,
1678    #[doc = "HSMCI"]
1679    pub HSMCI: HSMCI,
1680    #[doc = "ICM"]
1681    pub ICM: ICM,
1682    #[doc = "ISI"]
1683    pub ISI: ISI,
1684    #[doc = "MATRIX"]
1685    pub MATRIX: MATRIX,
1686    #[doc = "PIOA"]
1687    pub PIOA: PIOA,
1688    #[doc = "PIOB"]
1689    pub PIOB: PIOB,
1690    #[doc = "PIOD"]
1691    pub PIOD: PIOD,
1692    #[doc = "PMC"]
1693    pub PMC: PMC,
1694    #[doc = "PWM0"]
1695    pub PWM0: PWM0,
1696    #[doc = "PWM1"]
1697    pub PWM1: PWM1,
1698    #[doc = "QSPI"]
1699    pub QSPI: QSPI,
1700    #[doc = "RSTC"]
1701    pub RSTC: RSTC,
1702    #[doc = "RSWDT"]
1703    pub RSWDT: RSWDT,
1704    #[doc = "RTC"]
1705    pub RTC: RTC,
1706    #[doc = "RTT"]
1707    pub RTT: RTT,
1708    #[doc = "SPI0"]
1709    pub SPI0: SPI0,
1710    #[doc = "SSC"]
1711    pub SSC: SSC,
1712    #[doc = "SUPC"]
1713    pub SUPC: SUPC,
1714    #[doc = "TC0"]
1715    pub TC0: TC0,
1716    #[doc = "TC1"]
1717    pub TC1: TC1,
1718    #[doc = "TC2"]
1719    pub TC2: TC2,
1720    #[doc = "TC3"]
1721    pub TC3: TC3,
1722    #[doc = "TRNG"]
1723    pub TRNG: TRNG,
1724    #[doc = "TWIHS0"]
1725    pub TWIHS0: TWIHS0,
1726    #[doc = "TWIHS1"]
1727    pub TWIHS1: TWIHS1,
1728    #[doc = "TWIHS2"]
1729    pub TWIHS2: TWIHS2,
1730    #[doc = "UART0"]
1731    pub UART0: UART0,
1732    #[doc = "UART1"]
1733    pub UART1: UART1,
1734    #[doc = "UART2"]
1735    pub UART2: UART2,
1736    #[doc = "UART3"]
1737    pub UART3: UART3,
1738    #[doc = "UART4"]
1739    pub UART4: UART4,
1740    #[doc = "USART0"]
1741    pub USART0: USART0,
1742    #[doc = "USART1"]
1743    pub USART1: USART1,
1744    #[doc = "USART2"]
1745    pub USART2: USART2,
1746    #[doc = "USBHS"]
1747    pub USBHS: USBHS,
1748    #[doc = "UTMI"]
1749    pub UTMI: UTMI,
1750    #[doc = "WDT"]
1751    pub WDT: WDT,
1752    #[doc = "XDMAC"]
1753    pub XDMAC: XDMAC,
1754    #[doc = "LOCKBIT"]
1755    pub LOCKBIT: LOCKBIT,
1756    #[doc = "SCNSCB"]
1757    pub SCNSCB: SCNSCB,
1758    #[doc = "SYSTICK"]
1759    pub SYSTICK: SYSTICK,
1760}
1761impl Peripherals {
1762    #[doc = r"Returns all the peripherals *once*"]
1763    #[inline]
1764    pub fn take() -> Option<Self> {
1765        cortex_m::interrupt::free(|_| {
1766            if unsafe { DEVICE_PERIPHERALS } {
1767                None
1768            } else {
1769                Some(unsafe { Peripherals::steal() })
1770            }
1771        })
1772    }
1773    #[doc = r"Unchecked version of `Peripherals::take`"]
1774    #[inline]
1775    pub unsafe fn steal() -> Self {
1776        DEVICE_PERIPHERALS = true;
1777        Peripherals {
1778            ACC: ACC {
1779                _marker: PhantomData,
1780            },
1781            AES: AES {
1782                _marker: PhantomData,
1783            },
1784            AFEC0: AFEC0 {
1785                _marker: PhantomData,
1786            },
1787            AFEC1: AFEC1 {
1788                _marker: PhantomData,
1789            },
1790            CHIPID: CHIPID {
1791                _marker: PhantomData,
1792            },
1793            DACC: DACC {
1794                _marker: PhantomData,
1795            },
1796            EFC: EFC {
1797                _marker: PhantomData,
1798            },
1799            GPBR: GPBR {
1800                _marker: PhantomData,
1801            },
1802            HSMCI: HSMCI {
1803                _marker: PhantomData,
1804            },
1805            ICM: ICM {
1806                _marker: PhantomData,
1807            },
1808            ISI: ISI {
1809                _marker: PhantomData,
1810            },
1811            MATRIX: MATRIX {
1812                _marker: PhantomData,
1813            },
1814            PIOA: PIOA {
1815                _marker: PhantomData,
1816            },
1817            PIOB: PIOB {
1818                _marker: PhantomData,
1819            },
1820            PIOD: PIOD {
1821                _marker: PhantomData,
1822            },
1823            PMC: PMC {
1824                _marker: PhantomData,
1825            },
1826            PWM0: PWM0 {
1827                _marker: PhantomData,
1828            },
1829            PWM1: PWM1 {
1830                _marker: PhantomData,
1831            },
1832            QSPI: QSPI {
1833                _marker: PhantomData,
1834            },
1835            RSTC: RSTC {
1836                _marker: PhantomData,
1837            },
1838            RSWDT: RSWDT {
1839                _marker: PhantomData,
1840            },
1841            RTC: RTC {
1842                _marker: PhantomData,
1843            },
1844            RTT: RTT {
1845                _marker: PhantomData,
1846            },
1847            SPI0: SPI0 {
1848                _marker: PhantomData,
1849            },
1850            SSC: SSC {
1851                _marker: PhantomData,
1852            },
1853            SUPC: SUPC {
1854                _marker: PhantomData,
1855            },
1856            TC0: TC0 {
1857                _marker: PhantomData,
1858            },
1859            TC1: TC1 {
1860                _marker: PhantomData,
1861            },
1862            TC2: TC2 {
1863                _marker: PhantomData,
1864            },
1865            TC3: TC3 {
1866                _marker: PhantomData,
1867            },
1868            TRNG: TRNG {
1869                _marker: PhantomData,
1870            },
1871            TWIHS0: TWIHS0 {
1872                _marker: PhantomData,
1873            },
1874            TWIHS1: TWIHS1 {
1875                _marker: PhantomData,
1876            },
1877            TWIHS2: TWIHS2 {
1878                _marker: PhantomData,
1879            },
1880            UART0: UART0 {
1881                _marker: PhantomData,
1882            },
1883            UART1: UART1 {
1884                _marker: PhantomData,
1885            },
1886            UART2: UART2 {
1887                _marker: PhantomData,
1888            },
1889            UART3: UART3 {
1890                _marker: PhantomData,
1891            },
1892            UART4: UART4 {
1893                _marker: PhantomData,
1894            },
1895            USART0: USART0 {
1896                _marker: PhantomData,
1897            },
1898            USART1: USART1 {
1899                _marker: PhantomData,
1900            },
1901            USART2: USART2 {
1902                _marker: PhantomData,
1903            },
1904            USBHS: USBHS {
1905                _marker: PhantomData,
1906            },
1907            UTMI: UTMI {
1908                _marker: PhantomData,
1909            },
1910            WDT: WDT {
1911                _marker: PhantomData,
1912            },
1913            XDMAC: XDMAC {
1914                _marker: PhantomData,
1915            },
1916            LOCKBIT: LOCKBIT {
1917                _marker: PhantomData,
1918            },
1919            SCNSCB: SCNSCB {
1920                _marker: PhantomData,
1921            },
1922            SYSTICK: SYSTICK {
1923                _marker: PhantomData,
1924            },
1925        }
1926    }
1927}