atsam4e8e_pac/
lib.rs

1#![doc = "Peripheral access API for ATSAM4E8E microcontrollers (generated using svd2rust v0.27.2 ( ))\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.27.2/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(dead_code)]
4#![deny(improper_ctypes)]
5#![deny(missing_docs)]
6#![deny(no_mangle_generic_items)]
7#![deny(non_shorthand_field_patterns)]
8#![deny(overflowing_literals)]
9#![deny(path_statements)]
10#![deny(patterns_in_fns_without_body)]
11#![deny(private_in_public)]
12#![deny(unconditional_recursion)]
13#![deny(unused_allocation)]
14#![deny(unused_comparisons)]
15#![deny(unused_parens)]
16#![deny(while_true)]
17#![allow(non_camel_case_types)]
18#![allow(non_snake_case)]
19#![no_std]
20use core::marker::PhantomData;
21use core::ops::Deref;
22#[doc = r"Number available in the NVIC for configuring priority"]
23pub const NVIC_PRIO_BITS: u8 = 4;
24#[cfg(feature = "rt")]
25pub use self::Interrupt as interrupt;
26pub use cortex_m::peripheral::Peripherals as CorePeripherals;
27pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, FPU, ITM, MPU, NVIC, SCB, SYST, TPIU};
28#[cfg(feature = "rt")]
29pub use cortex_m_rt::interrupt;
30#[allow(unused_imports)]
31use generic::*;
32#[doc = r"Common register and bit access and modify traits"]
33pub mod generic;
34#[cfg(feature = "rt")]
35extern "C" {
36    fn SUPC();
37    fn RSTC();
38    fn RTC();
39    fn RTT();
40    fn WDT();
41    fn PMC();
42    fn EFC();
43    fn UART0();
44    fn PIOA();
45    fn PIOB();
46    fn PIOC();
47    fn PIOD();
48    fn PIOE();
49    fn USART0();
50    fn USART1();
51    fn HSMCI();
52    fn TWI0();
53    fn TWI1();
54    fn SPI();
55    fn DMAC();
56    fn TC0();
57    fn TC1();
58    fn TC2();
59    fn TC3();
60    fn TC4();
61    fn TC5();
62    fn TC6();
63    fn TC7();
64    fn TC8();
65    fn AFEC0();
66    fn AFEC1();
67    fn DACC();
68    fn ACC();
69    fn UDP();
70    fn PWM();
71    fn CAN0();
72    fn CAN1();
73    fn AES();
74    fn GMAC();
75    fn UART1();
76}
77#[doc(hidden)]
78pub union Vector {
79    _handler: unsafe extern "C" fn(),
80    _reserved: u32,
81}
82#[cfg(feature = "rt")]
83#[doc(hidden)]
84#[link_section = ".vector_table.interrupts"]
85#[no_mangle]
86pub static __INTERRUPTS: [Vector; 46] = [
87    Vector { _handler: SUPC },
88    Vector { _handler: RSTC },
89    Vector { _handler: RTC },
90    Vector { _handler: RTT },
91    Vector { _handler: WDT },
92    Vector { _handler: PMC },
93    Vector { _handler: EFC },
94    Vector { _handler: UART0 },
95    Vector { _reserved: 0 },
96    Vector { _handler: PIOA },
97    Vector { _handler: PIOB },
98    Vector { _handler: PIOC },
99    Vector { _handler: PIOD },
100    Vector { _handler: PIOE },
101    Vector { _handler: USART0 },
102    Vector { _handler: USART1 },
103    Vector { _handler: HSMCI },
104    Vector { _handler: TWI0 },
105    Vector { _handler: TWI1 },
106    Vector { _handler: SPI },
107    Vector { _handler: DMAC },
108    Vector { _handler: TC0 },
109    Vector { _handler: TC1 },
110    Vector { _handler: TC2 },
111    Vector { _handler: TC3 },
112    Vector { _handler: TC4 },
113    Vector { _handler: TC5 },
114    Vector { _handler: TC6 },
115    Vector { _handler: TC7 },
116    Vector { _handler: TC8 },
117    Vector { _handler: AFEC0 },
118    Vector { _handler: AFEC1 },
119    Vector { _handler: DACC },
120    Vector { _handler: ACC },
121    Vector { _reserved: 0 },
122    Vector { _handler: UDP },
123    Vector { _handler: PWM },
124    Vector { _handler: CAN0 },
125    Vector { _handler: CAN1 },
126    Vector { _handler: AES },
127    Vector { _reserved: 0 },
128    Vector { _reserved: 0 },
129    Vector { _reserved: 0 },
130    Vector { _reserved: 0 },
131    Vector { _handler: GMAC },
132    Vector { _handler: UART1 },
133];
134#[doc = r"Enumeration of all the interrupts."]
135#[derive(Copy, Clone, Debug, PartialEq, Eq)]
136#[repr(u16)]
137pub enum Interrupt {
138    #[doc = "0 - SUPC"]
139    SUPC = 0,
140    #[doc = "1 - RSTC"]
141    RSTC = 1,
142    #[doc = "2 - RTC"]
143    RTC = 2,
144    #[doc = "3 - RTT"]
145    RTT = 3,
146    #[doc = "4 - WDT"]
147    WDT = 4,
148    #[doc = "5 - PMC"]
149    PMC = 5,
150    #[doc = "6 - EFC"]
151    EFC = 6,
152    #[doc = "7 - UART0"]
153    UART0 = 7,
154    #[doc = "9 - PIOA"]
155    PIOA = 9,
156    #[doc = "10 - PIOB"]
157    PIOB = 10,
158    #[doc = "11 - PIOC"]
159    PIOC = 11,
160    #[doc = "12 - PIOD"]
161    PIOD = 12,
162    #[doc = "13 - PIOE"]
163    PIOE = 13,
164    #[doc = "14 - USART0"]
165    USART0 = 14,
166    #[doc = "15 - USART1"]
167    USART1 = 15,
168    #[doc = "16 - HSMCI"]
169    HSMCI = 16,
170    #[doc = "17 - TWI0"]
171    TWI0 = 17,
172    #[doc = "18 - TWI1"]
173    TWI1 = 18,
174    #[doc = "19 - SPI"]
175    SPI = 19,
176    #[doc = "20 - DMAC"]
177    DMAC = 20,
178    #[doc = "21 - TC0"]
179    TC0 = 21,
180    #[doc = "22 - TC1"]
181    TC1 = 22,
182    #[doc = "23 - TC2"]
183    TC2 = 23,
184    #[doc = "24 - TC3"]
185    TC3 = 24,
186    #[doc = "25 - TC4"]
187    TC4 = 25,
188    #[doc = "26 - TC5"]
189    TC5 = 26,
190    #[doc = "27 - TC6"]
191    TC6 = 27,
192    #[doc = "28 - TC7"]
193    TC7 = 28,
194    #[doc = "29 - TC8"]
195    TC8 = 29,
196    #[doc = "30 - AFEC0"]
197    AFEC0 = 30,
198    #[doc = "31 - AFEC1"]
199    AFEC1 = 31,
200    #[doc = "32 - DACC"]
201    DACC = 32,
202    #[doc = "33 - ACC"]
203    ACC = 33,
204    #[doc = "35 - UDP"]
205    UDP = 35,
206    #[doc = "36 - PWM"]
207    PWM = 36,
208    #[doc = "37 - CAN0"]
209    CAN0 = 37,
210    #[doc = "38 - CAN1"]
211    CAN1 = 38,
212    #[doc = "39 - AES"]
213    AES = 39,
214    #[doc = "44 - GMAC"]
215    GMAC = 44,
216    #[doc = "45 - UART1"]
217    UART1 = 45,
218}
219unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
220    #[inline(always)]
221    fn number(self) -> u16 {
222        self as u16
223    }
224}
225#[doc = "Pulse Width Modulation Controller"]
226pub struct PWM {
227    _marker: PhantomData<*const ()>,
228}
229unsafe impl Send for PWM {}
230impl PWM {
231    #[doc = r"Pointer to the register block"]
232    pub const PTR: *const pwm::RegisterBlock = 0x4000_0000 as *const _;
233    #[doc = r"Return the pointer to the register block"]
234    #[inline(always)]
235    pub const fn ptr() -> *const pwm::RegisterBlock {
236        Self::PTR
237    }
238}
239impl Deref for PWM {
240    type Target = pwm::RegisterBlock;
241    #[inline(always)]
242    fn deref(&self) -> &Self::Target {
243        unsafe { &*Self::PTR }
244    }
245}
246impl core::fmt::Debug for PWM {
247    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
248        f.debug_struct("PWM").finish()
249    }
250}
251#[doc = "Pulse Width Modulation Controller"]
252pub mod pwm;
253#[doc = "Advanced Encryption Standard"]
254pub struct AES {
255    _marker: PhantomData<*const ()>,
256}
257unsafe impl Send for AES {}
258impl AES {
259    #[doc = r"Pointer to the register block"]
260    pub const PTR: *const aes::RegisterBlock = 0x4000_4000 as *const _;
261    #[doc = r"Return the pointer to the register block"]
262    #[inline(always)]
263    pub const fn ptr() -> *const aes::RegisterBlock {
264        Self::PTR
265    }
266}
267impl Deref for AES {
268    type Target = aes::RegisterBlock;
269    #[inline(always)]
270    fn deref(&self) -> &Self::Target {
271        unsafe { &*Self::PTR }
272    }
273}
274impl core::fmt::Debug for AES {
275    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
276        f.debug_struct("AES").finish()
277    }
278}
279#[doc = "Advanced Encryption Standard"]
280pub mod aes;
281#[doc = "Controller Area Network 0"]
282pub struct CAN0 {
283    _marker: PhantomData<*const ()>,
284}
285unsafe impl Send for CAN0 {}
286impl CAN0 {
287    #[doc = r"Pointer to the register block"]
288    pub const PTR: *const can0::RegisterBlock = 0x4001_0000 as *const _;
289    #[doc = r"Return the pointer to the register block"]
290    #[inline(always)]
291    pub const fn ptr() -> *const can0::RegisterBlock {
292        Self::PTR
293    }
294}
295impl Deref for CAN0 {
296    type Target = can0::RegisterBlock;
297    #[inline(always)]
298    fn deref(&self) -> &Self::Target {
299        unsafe { &*Self::PTR }
300    }
301}
302impl core::fmt::Debug for CAN0 {
303    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
304        f.debug_struct("CAN0").finish()
305    }
306}
307#[doc = "Controller Area Network 0"]
308pub mod can0;
309#[doc = "Controller Area Network 1"]
310pub struct CAN1 {
311    _marker: PhantomData<*const ()>,
312}
313unsafe impl Send for CAN1 {}
314impl CAN1 {
315    #[doc = r"Pointer to the register block"]
316    pub const PTR: *const can1::RegisterBlock = 0x4001_4000 as *const _;
317    #[doc = r"Return the pointer to the register block"]
318    #[inline(always)]
319    pub const fn ptr() -> *const can1::RegisterBlock {
320        Self::PTR
321    }
322}
323impl Deref for CAN1 {
324    type Target = can1::RegisterBlock;
325    #[inline(always)]
326    fn deref(&self) -> &Self::Target {
327        unsafe { &*Self::PTR }
328    }
329}
330impl core::fmt::Debug for CAN1 {
331    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
332        f.debug_struct("CAN1").finish()
333    }
334}
335#[doc = "Controller Area Network 1"]
336pub mod can1;
337#[doc = "Gigabit Ethernet MAC"]
338pub struct GMAC {
339    _marker: PhantomData<*const ()>,
340}
341unsafe impl Send for GMAC {}
342impl GMAC {
343    #[doc = r"Pointer to the register block"]
344    pub const PTR: *const gmac::RegisterBlock = 0x4003_4000 as *const _;
345    #[doc = r"Return the pointer to the register block"]
346    #[inline(always)]
347    pub const fn ptr() -> *const gmac::RegisterBlock {
348        Self::PTR
349    }
350}
351impl Deref for GMAC {
352    type Target = gmac::RegisterBlock;
353    #[inline(always)]
354    fn deref(&self) -> &Self::Target {
355        unsafe { &*Self::PTR }
356    }
357}
358impl core::fmt::Debug for GMAC {
359    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
360        f.debug_struct("GMAC").finish()
361    }
362}
363#[doc = "Gigabit Ethernet MAC"]
364pub mod gmac;
365#[doc = "Static Memory Controller"]
366pub struct SMC {
367    _marker: PhantomData<*const ()>,
368}
369unsafe impl Send for SMC {}
370impl SMC {
371    #[doc = r"Pointer to the register block"]
372    pub const PTR: *const smc::RegisterBlock = 0x4006_0000 as *const _;
373    #[doc = r"Return the pointer to the register block"]
374    #[inline(always)]
375    pub const fn ptr() -> *const smc::RegisterBlock {
376        Self::PTR
377    }
378}
379impl Deref for SMC {
380    type Target = smc::RegisterBlock;
381    #[inline(always)]
382    fn deref(&self) -> &Self::Target {
383        unsafe { &*Self::PTR }
384    }
385}
386impl core::fmt::Debug for SMC {
387    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
388        f.debug_struct("SMC").finish()
389    }
390}
391#[doc = "Static Memory Controller"]
392pub mod smc;
393#[doc = "Universal Asynchronous Receiver Transmitter 1"]
394pub struct UART1 {
395    _marker: PhantomData<*const ()>,
396}
397unsafe impl Send for UART1 {}
398impl UART1 {
399    #[doc = r"Pointer to the register block"]
400    pub const PTR: *const uart1::RegisterBlock = 0x4006_0600 as *const _;
401    #[doc = r"Return the pointer to the register block"]
402    #[inline(always)]
403    pub const fn ptr() -> *const uart1::RegisterBlock {
404        Self::PTR
405    }
406}
407impl Deref for UART1 {
408    type Target = uart1::RegisterBlock;
409    #[inline(always)]
410    fn deref(&self) -> &Self::Target {
411        unsafe { &*Self::PTR }
412    }
413}
414impl core::fmt::Debug for UART1 {
415    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
416        f.debug_struct("UART1").finish()
417    }
418}
419#[doc = "Universal Asynchronous Receiver Transmitter 1"]
420pub mod uart1;
421#[doc = "High Speed MultiMedia Card Interface"]
422pub struct HSMCI {
423    _marker: PhantomData<*const ()>,
424}
425unsafe impl Send for HSMCI {}
426impl HSMCI {
427    #[doc = r"Pointer to the register block"]
428    pub const PTR: *const hsmci::RegisterBlock = 0x4008_0000 as *const _;
429    #[doc = r"Return the pointer to the register block"]
430    #[inline(always)]
431    pub const fn ptr() -> *const hsmci::RegisterBlock {
432        Self::PTR
433    }
434}
435impl Deref for HSMCI {
436    type Target = hsmci::RegisterBlock;
437    #[inline(always)]
438    fn deref(&self) -> &Self::Target {
439        unsafe { &*Self::PTR }
440    }
441}
442impl core::fmt::Debug for HSMCI {
443    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
444        f.debug_struct("HSMCI").finish()
445    }
446}
447#[doc = "High Speed MultiMedia Card Interface"]
448pub mod hsmci;
449#[doc = "USB Device Port"]
450pub struct UDP {
451    _marker: PhantomData<*const ()>,
452}
453unsafe impl Send for UDP {}
454impl UDP {
455    #[doc = r"Pointer to the register block"]
456    pub const PTR: *const udp::RegisterBlock = 0x4008_4000 as *const _;
457    #[doc = r"Return the pointer to the register block"]
458    #[inline(always)]
459    pub const fn ptr() -> *const udp::RegisterBlock {
460        Self::PTR
461    }
462}
463impl Deref for UDP {
464    type Target = udp::RegisterBlock;
465    #[inline(always)]
466    fn deref(&self) -> &Self::Target {
467        unsafe { &*Self::PTR }
468    }
469}
470impl core::fmt::Debug for UDP {
471    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
472        f.debug_struct("UDP").finish()
473    }
474}
475#[doc = "USB Device Port"]
476pub mod udp;
477#[doc = "Serial Peripheral Interface"]
478pub struct SPI {
479    _marker: PhantomData<*const ()>,
480}
481unsafe impl Send for SPI {}
482impl SPI {
483    #[doc = r"Pointer to the register block"]
484    pub const PTR: *const spi::RegisterBlock = 0x4008_8000 as *const _;
485    #[doc = r"Return the pointer to the register block"]
486    #[inline(always)]
487    pub const fn ptr() -> *const spi::RegisterBlock {
488        Self::PTR
489    }
490}
491impl Deref for SPI {
492    type Target = spi::RegisterBlock;
493    #[inline(always)]
494    fn deref(&self) -> &Self::Target {
495        unsafe { &*Self::PTR }
496    }
497}
498impl core::fmt::Debug for SPI {
499    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
500        f.debug_struct("SPI").finish()
501    }
502}
503#[doc = "Serial Peripheral Interface"]
504pub mod spi;
505#[doc = "Timer Counter 0"]
506pub struct TC0 {
507    _marker: PhantomData<*const ()>,
508}
509unsafe impl Send for TC0 {}
510impl TC0 {
511    #[doc = r"Pointer to the register block"]
512    pub const PTR: *const tc0::RegisterBlock = 0x4009_0000 as *const _;
513    #[doc = r"Return the pointer to the register block"]
514    #[inline(always)]
515    pub const fn ptr() -> *const tc0::RegisterBlock {
516        Self::PTR
517    }
518}
519impl Deref for TC0 {
520    type Target = tc0::RegisterBlock;
521    #[inline(always)]
522    fn deref(&self) -> &Self::Target {
523        unsafe { &*Self::PTR }
524    }
525}
526impl core::fmt::Debug for TC0 {
527    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
528        f.debug_struct("TC0").finish()
529    }
530}
531#[doc = "Timer Counter 0"]
532pub mod tc0;
533#[doc = "Timer Counter 1"]
534pub struct TC1 {
535    _marker: PhantomData<*const ()>,
536}
537unsafe impl Send for TC1 {}
538impl TC1 {
539    #[doc = r"Pointer to the register block"]
540    pub const PTR: *const tc1::RegisterBlock = 0x4009_4000 as *const _;
541    #[doc = r"Return the pointer to the register block"]
542    #[inline(always)]
543    pub const fn ptr() -> *const tc1::RegisterBlock {
544        Self::PTR
545    }
546}
547impl Deref for TC1 {
548    type Target = tc1::RegisterBlock;
549    #[inline(always)]
550    fn deref(&self) -> &Self::Target {
551        unsafe { &*Self::PTR }
552    }
553}
554impl core::fmt::Debug for TC1 {
555    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
556        f.debug_struct("TC1").finish()
557    }
558}
559#[doc = "Timer Counter 1"]
560pub mod tc1;
561#[doc = "Timer Counter 2"]
562pub struct TC2 {
563    _marker: PhantomData<*const ()>,
564}
565unsafe impl Send for TC2 {}
566impl TC2 {
567    #[doc = r"Pointer to the register block"]
568    pub const PTR: *const tc2::RegisterBlock = 0x4009_8000 as *const _;
569    #[doc = r"Return the pointer to the register block"]
570    #[inline(always)]
571    pub const fn ptr() -> *const tc2::RegisterBlock {
572        Self::PTR
573    }
574}
575impl Deref for TC2 {
576    type Target = tc2::RegisterBlock;
577    #[inline(always)]
578    fn deref(&self) -> &Self::Target {
579        unsafe { &*Self::PTR }
580    }
581}
582impl core::fmt::Debug for TC2 {
583    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
584        f.debug_struct("TC2").finish()
585    }
586}
587#[doc = "Timer Counter 2"]
588pub mod tc2;
589#[doc = "Universal Synchronous Asynchronous Receiver Transmitter 0"]
590pub struct USART0 {
591    _marker: PhantomData<*const ()>,
592}
593unsafe impl Send for USART0 {}
594impl USART0 {
595    #[doc = r"Pointer to the register block"]
596    pub const PTR: *const usart0::RegisterBlock = 0x400a_0000 as *const _;
597    #[doc = r"Return the pointer to the register block"]
598    #[inline(always)]
599    pub const fn ptr() -> *const usart0::RegisterBlock {
600        Self::PTR
601    }
602}
603impl Deref for USART0 {
604    type Target = usart0::RegisterBlock;
605    #[inline(always)]
606    fn deref(&self) -> &Self::Target {
607        unsafe { &*Self::PTR }
608    }
609}
610impl core::fmt::Debug for USART0 {
611    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
612        f.debug_struct("USART0").finish()
613    }
614}
615#[doc = "Universal Synchronous Asynchronous Receiver Transmitter 0"]
616pub mod usart0;
617#[doc = "Universal Synchronous Asynchronous Receiver Transmitter 1"]
618pub struct USART1 {
619    _marker: PhantomData<*const ()>,
620}
621unsafe impl Send for USART1 {}
622impl USART1 {
623    #[doc = r"Pointer to the register block"]
624    pub const PTR: *const usart1::RegisterBlock = 0x400a_4000 as *const _;
625    #[doc = r"Return the pointer to the register block"]
626    #[inline(always)]
627    pub const fn ptr() -> *const usart1::RegisterBlock {
628        Self::PTR
629    }
630}
631impl Deref for USART1 {
632    type Target = usart1::RegisterBlock;
633    #[inline(always)]
634    fn deref(&self) -> &Self::Target {
635        unsafe { &*Self::PTR }
636    }
637}
638impl core::fmt::Debug for USART1 {
639    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
640        f.debug_struct("USART1").finish()
641    }
642}
643#[doc = "Universal Synchronous Asynchronous Receiver Transmitter 1"]
644pub mod usart1;
645#[doc = "Two-wire Interface 0"]
646pub struct TWI0 {
647    _marker: PhantomData<*const ()>,
648}
649unsafe impl Send for TWI0 {}
650impl TWI0 {
651    #[doc = r"Pointer to the register block"]
652    pub const PTR: *const twi0::RegisterBlock = 0x400a_8000 as *const _;
653    #[doc = r"Return the pointer to the register block"]
654    #[inline(always)]
655    pub const fn ptr() -> *const twi0::RegisterBlock {
656        Self::PTR
657    }
658}
659impl Deref for TWI0 {
660    type Target = twi0::RegisterBlock;
661    #[inline(always)]
662    fn deref(&self) -> &Self::Target {
663        unsafe { &*Self::PTR }
664    }
665}
666impl core::fmt::Debug for TWI0 {
667    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
668        f.debug_struct("TWI0").finish()
669    }
670}
671#[doc = "Two-wire Interface 0"]
672pub mod twi0;
673#[doc = "Two-wire Interface 1"]
674pub struct TWI1 {
675    _marker: PhantomData<*const ()>,
676}
677unsafe impl Send for TWI1 {}
678impl TWI1 {
679    #[doc = r"Pointer to the register block"]
680    pub const PTR: *const twi1::RegisterBlock = 0x400a_c000 as *const _;
681    #[doc = r"Return the pointer to the register block"]
682    #[inline(always)]
683    pub const fn ptr() -> *const twi1::RegisterBlock {
684        Self::PTR
685    }
686}
687impl Deref for TWI1 {
688    type Target = twi1::RegisterBlock;
689    #[inline(always)]
690    fn deref(&self) -> &Self::Target {
691        unsafe { &*Self::PTR }
692    }
693}
694impl core::fmt::Debug for TWI1 {
695    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
696        f.debug_struct("TWI1").finish()
697    }
698}
699#[doc = "Two-wire Interface 1"]
700pub mod twi1;
701#[doc = "Analog-Front-End Controller 0"]
702pub struct AFEC0 {
703    _marker: PhantomData<*const ()>,
704}
705unsafe impl Send for AFEC0 {}
706impl AFEC0 {
707    #[doc = r"Pointer to the register block"]
708    pub const PTR: *const afec0::RegisterBlock = 0x400b_0000 as *const _;
709    #[doc = r"Return the pointer to the register block"]
710    #[inline(always)]
711    pub const fn ptr() -> *const afec0::RegisterBlock {
712        Self::PTR
713    }
714}
715impl Deref for AFEC0 {
716    type Target = afec0::RegisterBlock;
717    #[inline(always)]
718    fn deref(&self) -> &Self::Target {
719        unsafe { &*Self::PTR }
720    }
721}
722impl core::fmt::Debug for AFEC0 {
723    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
724        f.debug_struct("AFEC0").finish()
725    }
726}
727#[doc = "Analog-Front-End Controller 0"]
728pub mod afec0;
729#[doc = "Analog-Front-End Controller 1"]
730pub struct AFEC1 {
731    _marker: PhantomData<*const ()>,
732}
733unsafe impl Send for AFEC1 {}
734impl AFEC1 {
735    #[doc = r"Pointer to the register block"]
736    pub const PTR: *const afec1::RegisterBlock = 0x400b_4000 as *const _;
737    #[doc = r"Return the pointer to the register block"]
738    #[inline(always)]
739    pub const fn ptr() -> *const afec1::RegisterBlock {
740        Self::PTR
741    }
742}
743impl Deref for AFEC1 {
744    type Target = afec1::RegisterBlock;
745    #[inline(always)]
746    fn deref(&self) -> &Self::Target {
747        unsafe { &*Self::PTR }
748    }
749}
750impl core::fmt::Debug for AFEC1 {
751    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
752        f.debug_struct("AFEC1").finish()
753    }
754}
755#[doc = "Analog-Front-End Controller 1"]
756pub mod afec1;
757#[doc = "Digital-to-Analog Converter Controller"]
758pub struct DACC {
759    _marker: PhantomData<*const ()>,
760}
761unsafe impl Send for DACC {}
762impl DACC {
763    #[doc = r"Pointer to the register block"]
764    pub const PTR: *const dacc::RegisterBlock = 0x400b_8000 as *const _;
765    #[doc = r"Return the pointer to the register block"]
766    #[inline(always)]
767    pub const fn ptr() -> *const dacc::RegisterBlock {
768        Self::PTR
769    }
770}
771impl Deref for DACC {
772    type Target = dacc::RegisterBlock;
773    #[inline(always)]
774    fn deref(&self) -> &Self::Target {
775        unsafe { &*Self::PTR }
776    }
777}
778impl core::fmt::Debug for DACC {
779    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
780        f.debug_struct("DACC").finish()
781    }
782}
783#[doc = "Digital-to-Analog Converter Controller"]
784pub mod dacc;
785#[doc = "Analog Comparator Controller"]
786pub struct ACC {
787    _marker: PhantomData<*const ()>,
788}
789unsafe impl Send for ACC {}
790impl ACC {
791    #[doc = r"Pointer to the register block"]
792    pub const PTR: *const acc::RegisterBlock = 0x400b_c000 as *const _;
793    #[doc = r"Return the pointer to the register block"]
794    #[inline(always)]
795    pub const fn ptr() -> *const acc::RegisterBlock {
796        Self::PTR
797    }
798}
799impl Deref for ACC {
800    type Target = acc::RegisterBlock;
801    #[inline(always)]
802    fn deref(&self) -> &Self::Target {
803        unsafe { &*Self::PTR }
804    }
805}
806impl core::fmt::Debug for ACC {
807    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
808        f.debug_struct("ACC").finish()
809    }
810}
811#[doc = "Analog Comparator Controller"]
812pub mod acc;
813#[doc = "DMA Controller"]
814pub struct DMAC {
815    _marker: PhantomData<*const ()>,
816}
817unsafe impl Send for DMAC {}
818impl DMAC {
819    #[doc = r"Pointer to the register block"]
820    pub const PTR: *const dmac::RegisterBlock = 0x400c_0000 as *const _;
821    #[doc = r"Return the pointer to the register block"]
822    #[inline(always)]
823    pub const fn ptr() -> *const dmac::RegisterBlock {
824        Self::PTR
825    }
826}
827impl Deref for DMAC {
828    type Target = dmac::RegisterBlock;
829    #[inline(always)]
830    fn deref(&self) -> &Self::Target {
831        unsafe { &*Self::PTR }
832    }
833}
834impl core::fmt::Debug for DMAC {
835    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
836        f.debug_struct("DMAC").finish()
837    }
838}
839#[doc = "DMA Controller"]
840pub mod dmac;
841#[doc = "Cortex M Cache Controller"]
842pub struct CMCC {
843    _marker: PhantomData<*const ()>,
844}
845unsafe impl Send for CMCC {}
846impl CMCC {
847    #[doc = r"Pointer to the register block"]
848    pub const PTR: *const cmcc::RegisterBlock = 0x400c_4000 as *const _;
849    #[doc = r"Return the pointer to the register block"]
850    #[inline(always)]
851    pub const fn ptr() -> *const cmcc::RegisterBlock {
852        Self::PTR
853    }
854}
855impl Deref for CMCC {
856    type Target = cmcc::RegisterBlock;
857    #[inline(always)]
858    fn deref(&self) -> &Self::Target {
859        unsafe { &*Self::PTR }
860    }
861}
862impl core::fmt::Debug for CMCC {
863    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
864        f.debug_struct("CMCC").finish()
865    }
866}
867#[doc = "Cortex M Cache Controller"]
868pub mod cmcc;
869#[doc = "AHB Bus Matrix"]
870pub struct MATRIX {
871    _marker: PhantomData<*const ()>,
872}
873unsafe impl Send for MATRIX {}
874impl MATRIX {
875    #[doc = r"Pointer to the register block"]
876    pub const PTR: *const matrix::RegisterBlock = 0x400e_0200 as *const _;
877    #[doc = r"Return the pointer to the register block"]
878    #[inline(always)]
879    pub const fn ptr() -> *const matrix::RegisterBlock {
880        Self::PTR
881    }
882}
883impl Deref for MATRIX {
884    type Target = matrix::RegisterBlock;
885    #[inline(always)]
886    fn deref(&self) -> &Self::Target {
887        unsafe { &*Self::PTR }
888    }
889}
890impl core::fmt::Debug for MATRIX {
891    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
892        f.debug_struct("MATRIX").finish()
893    }
894}
895#[doc = "AHB Bus Matrix"]
896pub mod matrix;
897#[doc = "Power Management Controller"]
898pub struct PMC {
899    _marker: PhantomData<*const ()>,
900}
901unsafe impl Send for PMC {}
902impl PMC {
903    #[doc = r"Pointer to the register block"]
904    pub const PTR: *const pmc::RegisterBlock = 0x400e_0400 as *const _;
905    #[doc = r"Return the pointer to the register block"]
906    #[inline(always)]
907    pub const fn ptr() -> *const pmc::RegisterBlock {
908        Self::PTR
909    }
910}
911impl Deref for PMC {
912    type Target = pmc::RegisterBlock;
913    #[inline(always)]
914    fn deref(&self) -> &Self::Target {
915        unsafe { &*Self::PTR }
916    }
917}
918impl core::fmt::Debug for PMC {
919    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
920        f.debug_struct("PMC").finish()
921    }
922}
923#[doc = "Power Management Controller"]
924pub mod pmc;
925#[doc = "Universal Asynchronous Receiver Transmitter 0"]
926pub struct UART0 {
927    _marker: PhantomData<*const ()>,
928}
929unsafe impl Send for UART0 {}
930impl UART0 {
931    #[doc = r"Pointer to the register block"]
932    pub const PTR: *const uart0::RegisterBlock = 0x400e_0600 as *const _;
933    #[doc = r"Return the pointer to the register block"]
934    #[inline(always)]
935    pub const fn ptr() -> *const uart0::RegisterBlock {
936        Self::PTR
937    }
938}
939impl Deref for UART0 {
940    type Target = uart0::RegisterBlock;
941    #[inline(always)]
942    fn deref(&self) -> &Self::Target {
943        unsafe { &*Self::PTR }
944    }
945}
946impl core::fmt::Debug for UART0 {
947    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
948        f.debug_struct("UART0").finish()
949    }
950}
951#[doc = "Universal Asynchronous Receiver Transmitter 0"]
952pub mod uart0;
953#[doc = "Chip Identifier"]
954pub struct CHIPID {
955    _marker: PhantomData<*const ()>,
956}
957unsafe impl Send for CHIPID {}
958impl CHIPID {
959    #[doc = r"Pointer to the register block"]
960    pub const PTR: *const chipid::RegisterBlock = 0x400e_0740 as *const _;
961    #[doc = r"Return the pointer to the register block"]
962    #[inline(always)]
963    pub const fn ptr() -> *const chipid::RegisterBlock {
964        Self::PTR
965    }
966}
967impl Deref for CHIPID {
968    type Target = chipid::RegisterBlock;
969    #[inline(always)]
970    fn deref(&self) -> &Self::Target {
971        unsafe { &*Self::PTR }
972    }
973}
974impl core::fmt::Debug for CHIPID {
975    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
976        f.debug_struct("CHIPID").finish()
977    }
978}
979#[doc = "Chip Identifier"]
980pub mod chipid;
981#[doc = "Embedded Flash Controller"]
982pub struct EFC {
983    _marker: PhantomData<*const ()>,
984}
985unsafe impl Send for EFC {}
986impl EFC {
987    #[doc = r"Pointer to the register block"]
988    pub const PTR: *const efc::RegisterBlock = 0x400e_0a00 as *const _;
989    #[doc = r"Return the pointer to the register block"]
990    #[inline(always)]
991    pub const fn ptr() -> *const efc::RegisterBlock {
992        Self::PTR
993    }
994}
995impl Deref for EFC {
996    type Target = efc::RegisterBlock;
997    #[inline(always)]
998    fn deref(&self) -> &Self::Target {
999        unsafe { &*Self::PTR }
1000    }
1001}
1002impl core::fmt::Debug for EFC {
1003    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1004        f.debug_struct("EFC").finish()
1005    }
1006}
1007#[doc = "Embedded Flash Controller"]
1008pub mod efc;
1009#[doc = "Parallel Input/Output Controller A"]
1010pub struct PIOA {
1011    _marker: PhantomData<*const ()>,
1012}
1013unsafe impl Send for PIOA {}
1014impl PIOA {
1015    #[doc = r"Pointer to the register block"]
1016    pub const PTR: *const pioa::RegisterBlock = 0x400e_0e00 as *const _;
1017    #[doc = r"Return the pointer to the register block"]
1018    #[inline(always)]
1019    pub const fn ptr() -> *const pioa::RegisterBlock {
1020        Self::PTR
1021    }
1022}
1023impl Deref for PIOA {
1024    type Target = pioa::RegisterBlock;
1025    #[inline(always)]
1026    fn deref(&self) -> &Self::Target {
1027        unsafe { &*Self::PTR }
1028    }
1029}
1030impl core::fmt::Debug for PIOA {
1031    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1032        f.debug_struct("PIOA").finish()
1033    }
1034}
1035#[doc = "Parallel Input/Output Controller A"]
1036pub mod pioa;
1037#[doc = "Parallel Input/Output Controller B"]
1038pub struct PIOB {
1039    _marker: PhantomData<*const ()>,
1040}
1041unsafe impl Send for PIOB {}
1042impl PIOB {
1043    #[doc = r"Pointer to the register block"]
1044    pub const PTR: *const piob::RegisterBlock = 0x400e_1000 as *const _;
1045    #[doc = r"Return the pointer to the register block"]
1046    #[inline(always)]
1047    pub const fn ptr() -> *const piob::RegisterBlock {
1048        Self::PTR
1049    }
1050}
1051impl Deref for PIOB {
1052    type Target = piob::RegisterBlock;
1053    #[inline(always)]
1054    fn deref(&self) -> &Self::Target {
1055        unsafe { &*Self::PTR }
1056    }
1057}
1058impl core::fmt::Debug for PIOB {
1059    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1060        f.debug_struct("PIOB").finish()
1061    }
1062}
1063#[doc = "Parallel Input/Output Controller B"]
1064pub mod piob;
1065#[doc = "Parallel Input/Output Controller C"]
1066pub struct PIOC {
1067    _marker: PhantomData<*const ()>,
1068}
1069unsafe impl Send for PIOC {}
1070impl PIOC {
1071    #[doc = r"Pointer to the register block"]
1072    pub const PTR: *const pioc::RegisterBlock = 0x400e_1200 as *const _;
1073    #[doc = r"Return the pointer to the register block"]
1074    #[inline(always)]
1075    pub const fn ptr() -> *const pioc::RegisterBlock {
1076        Self::PTR
1077    }
1078}
1079impl Deref for PIOC {
1080    type Target = pioc::RegisterBlock;
1081    #[inline(always)]
1082    fn deref(&self) -> &Self::Target {
1083        unsafe { &*Self::PTR }
1084    }
1085}
1086impl core::fmt::Debug for PIOC {
1087    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1088        f.debug_struct("PIOC").finish()
1089    }
1090}
1091#[doc = "Parallel Input/Output Controller C"]
1092pub mod pioc;
1093#[doc = "Parallel Input/Output Controller D"]
1094pub struct PIOD {
1095    _marker: PhantomData<*const ()>,
1096}
1097unsafe impl Send for PIOD {}
1098impl PIOD {
1099    #[doc = r"Pointer to the register block"]
1100    pub const PTR: *const piod::RegisterBlock = 0x400e_1400 as *const _;
1101    #[doc = r"Return the pointer to the register block"]
1102    #[inline(always)]
1103    pub const fn ptr() -> *const piod::RegisterBlock {
1104        Self::PTR
1105    }
1106}
1107impl Deref for PIOD {
1108    type Target = piod::RegisterBlock;
1109    #[inline(always)]
1110    fn deref(&self) -> &Self::Target {
1111        unsafe { &*Self::PTR }
1112    }
1113}
1114impl core::fmt::Debug for PIOD {
1115    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1116        f.debug_struct("PIOD").finish()
1117    }
1118}
1119#[doc = "Parallel Input/Output Controller D"]
1120pub mod piod;
1121#[doc = "Parallel Input/Output Controller E"]
1122pub struct PIOE {
1123    _marker: PhantomData<*const ()>,
1124}
1125unsafe impl Send for PIOE {}
1126impl PIOE {
1127    #[doc = r"Pointer to the register block"]
1128    pub const PTR: *const pioe::RegisterBlock = 0x400e_1600 as *const _;
1129    #[doc = r"Return the pointer to the register block"]
1130    #[inline(always)]
1131    pub const fn ptr() -> *const pioe::RegisterBlock {
1132        Self::PTR
1133    }
1134}
1135impl Deref for PIOE {
1136    type Target = pioe::RegisterBlock;
1137    #[inline(always)]
1138    fn deref(&self) -> &Self::Target {
1139        unsafe { &*Self::PTR }
1140    }
1141}
1142impl core::fmt::Debug for PIOE {
1143    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1144        f.debug_struct("PIOE").finish()
1145    }
1146}
1147#[doc = "Parallel Input/Output Controller E"]
1148pub mod pioe;
1149#[doc = "Reset Controller"]
1150pub struct RSTC {
1151    _marker: PhantomData<*const ()>,
1152}
1153unsafe impl Send for RSTC {}
1154impl RSTC {
1155    #[doc = r"Pointer to the register block"]
1156    pub const PTR: *const rstc::RegisterBlock = 0x400e_1800 as *const _;
1157    #[doc = r"Return the pointer to the register block"]
1158    #[inline(always)]
1159    pub const fn ptr() -> *const rstc::RegisterBlock {
1160        Self::PTR
1161    }
1162}
1163impl Deref for RSTC {
1164    type Target = rstc::RegisterBlock;
1165    #[inline(always)]
1166    fn deref(&self) -> &Self::Target {
1167        unsafe { &*Self::PTR }
1168    }
1169}
1170impl core::fmt::Debug for RSTC {
1171    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1172        f.debug_struct("RSTC").finish()
1173    }
1174}
1175#[doc = "Reset Controller"]
1176pub mod rstc;
1177#[doc = "Supply Controller"]
1178pub struct SUPC {
1179    _marker: PhantomData<*const ()>,
1180}
1181unsafe impl Send for SUPC {}
1182impl SUPC {
1183    #[doc = r"Pointer to the register block"]
1184    pub const PTR: *const supc::RegisterBlock = 0x400e_1810 as *const _;
1185    #[doc = r"Return the pointer to the register block"]
1186    #[inline(always)]
1187    pub const fn ptr() -> *const supc::RegisterBlock {
1188        Self::PTR
1189    }
1190}
1191impl Deref for SUPC {
1192    type Target = supc::RegisterBlock;
1193    #[inline(always)]
1194    fn deref(&self) -> &Self::Target {
1195        unsafe { &*Self::PTR }
1196    }
1197}
1198impl core::fmt::Debug for SUPC {
1199    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1200        f.debug_struct("SUPC").finish()
1201    }
1202}
1203#[doc = "Supply Controller"]
1204pub mod supc;
1205#[doc = "Real-time Timer"]
1206pub struct RTT {
1207    _marker: PhantomData<*const ()>,
1208}
1209unsafe impl Send for RTT {}
1210impl RTT {
1211    #[doc = r"Pointer to the register block"]
1212    pub const PTR: *const rtt::RegisterBlock = 0x400e_1830 as *const _;
1213    #[doc = r"Return the pointer to the register block"]
1214    #[inline(always)]
1215    pub const fn ptr() -> *const rtt::RegisterBlock {
1216        Self::PTR
1217    }
1218}
1219impl Deref for RTT {
1220    type Target = rtt::RegisterBlock;
1221    #[inline(always)]
1222    fn deref(&self) -> &Self::Target {
1223        unsafe { &*Self::PTR }
1224    }
1225}
1226impl core::fmt::Debug for RTT {
1227    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1228        f.debug_struct("RTT").finish()
1229    }
1230}
1231#[doc = "Real-time Timer"]
1232pub mod rtt;
1233#[doc = "Watchdog Timer"]
1234pub struct WDT {
1235    _marker: PhantomData<*const ()>,
1236}
1237unsafe impl Send for WDT {}
1238impl WDT {
1239    #[doc = r"Pointer to the register block"]
1240    pub const PTR: *const wdt::RegisterBlock = 0x400e_1850 as *const _;
1241    #[doc = r"Return the pointer to the register block"]
1242    #[inline(always)]
1243    pub const fn ptr() -> *const wdt::RegisterBlock {
1244        Self::PTR
1245    }
1246}
1247impl Deref for WDT {
1248    type Target = wdt::RegisterBlock;
1249    #[inline(always)]
1250    fn deref(&self) -> &Self::Target {
1251        unsafe { &*Self::PTR }
1252    }
1253}
1254impl core::fmt::Debug for WDT {
1255    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1256        f.debug_struct("WDT").finish()
1257    }
1258}
1259#[doc = "Watchdog Timer"]
1260pub mod wdt;
1261#[doc = "Real-time Clock"]
1262pub struct RTC {
1263    _marker: PhantomData<*const ()>,
1264}
1265unsafe impl Send for RTC {}
1266impl RTC {
1267    #[doc = r"Pointer to the register block"]
1268    pub const PTR: *const rtc::RegisterBlock = 0x400e_1860 as *const _;
1269    #[doc = r"Return the pointer to the register block"]
1270    #[inline(always)]
1271    pub const fn ptr() -> *const rtc::RegisterBlock {
1272        Self::PTR
1273    }
1274}
1275impl Deref for RTC {
1276    type Target = rtc::RegisterBlock;
1277    #[inline(always)]
1278    fn deref(&self) -> &Self::Target {
1279        unsafe { &*Self::PTR }
1280    }
1281}
1282impl core::fmt::Debug for RTC {
1283    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1284        f.debug_struct("RTC").finish()
1285    }
1286}
1287#[doc = "Real-time Clock"]
1288pub mod rtc;
1289#[doc = "General Purpose Backup Registers"]
1290pub struct GPBR {
1291    _marker: PhantomData<*const ()>,
1292}
1293unsafe impl Send for GPBR {}
1294impl GPBR {
1295    #[doc = r"Pointer to the register block"]
1296    pub const PTR: *const gpbr::RegisterBlock = 0x400e_1890 as *const _;
1297    #[doc = r"Return the pointer to the register block"]
1298    #[inline(always)]
1299    pub const fn ptr() -> *const gpbr::RegisterBlock {
1300        Self::PTR
1301    }
1302}
1303impl Deref for GPBR {
1304    type Target = gpbr::RegisterBlock;
1305    #[inline(always)]
1306    fn deref(&self) -> &Self::Target {
1307        unsafe { &*Self::PTR }
1308    }
1309}
1310impl core::fmt::Debug for GPBR {
1311    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1312        f.debug_struct("GPBR").finish()
1313    }
1314}
1315#[doc = "General Purpose Backup Registers"]
1316pub mod gpbr;
1317#[doc = "Reinforced Safety Watchdog Timer"]
1318pub struct RSWDT {
1319    _marker: PhantomData<*const ()>,
1320}
1321unsafe impl Send for RSWDT {}
1322impl RSWDT {
1323    #[doc = r"Pointer to the register block"]
1324    pub const PTR: *const rswdt::RegisterBlock = 0x400e_1900 as *const _;
1325    #[doc = r"Return the pointer to the register block"]
1326    #[inline(always)]
1327    pub const fn ptr() -> *const rswdt::RegisterBlock {
1328        Self::PTR
1329    }
1330}
1331impl Deref for RSWDT {
1332    type Target = rswdt::RegisterBlock;
1333    #[inline(always)]
1334    fn deref(&self) -> &Self::Target {
1335        unsafe { &*Self::PTR }
1336    }
1337}
1338impl core::fmt::Debug for RSWDT {
1339    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1340        f.debug_struct("RSWDT").finish()
1341    }
1342}
1343#[doc = "Reinforced Safety Watchdog Timer"]
1344pub mod rswdt;
1345#[no_mangle]
1346static mut DEVICE_PERIPHERALS: bool = false;
1347#[doc = r" All the peripherals."]
1348#[allow(non_snake_case)]
1349pub struct Peripherals {
1350    #[doc = "PWM"]
1351    pub PWM: PWM,
1352    #[doc = "AES"]
1353    pub AES: AES,
1354    #[doc = "CAN0"]
1355    pub CAN0: CAN0,
1356    #[doc = "CAN1"]
1357    pub CAN1: CAN1,
1358    #[doc = "GMAC"]
1359    pub GMAC: GMAC,
1360    #[doc = "SMC"]
1361    pub SMC: SMC,
1362    #[doc = "UART1"]
1363    pub UART1: UART1,
1364    #[doc = "HSMCI"]
1365    pub HSMCI: HSMCI,
1366    #[doc = "UDP"]
1367    pub UDP: UDP,
1368    #[doc = "SPI"]
1369    pub SPI: SPI,
1370    #[doc = "TC0"]
1371    pub TC0: TC0,
1372    #[doc = "TC1"]
1373    pub TC1: TC1,
1374    #[doc = "TC2"]
1375    pub TC2: TC2,
1376    #[doc = "USART0"]
1377    pub USART0: USART0,
1378    #[doc = "USART1"]
1379    pub USART1: USART1,
1380    #[doc = "TWI0"]
1381    pub TWI0: TWI0,
1382    #[doc = "TWI1"]
1383    pub TWI1: TWI1,
1384    #[doc = "AFEC0"]
1385    pub AFEC0: AFEC0,
1386    #[doc = "AFEC1"]
1387    pub AFEC1: AFEC1,
1388    #[doc = "DACC"]
1389    pub DACC: DACC,
1390    #[doc = "ACC"]
1391    pub ACC: ACC,
1392    #[doc = "DMAC"]
1393    pub DMAC: DMAC,
1394    #[doc = "CMCC"]
1395    pub CMCC: CMCC,
1396    #[doc = "MATRIX"]
1397    pub MATRIX: MATRIX,
1398    #[doc = "PMC"]
1399    pub PMC: PMC,
1400    #[doc = "UART0"]
1401    pub UART0: UART0,
1402    #[doc = "CHIPID"]
1403    pub CHIPID: CHIPID,
1404    #[doc = "EFC"]
1405    pub EFC: EFC,
1406    #[doc = "PIOA"]
1407    pub PIOA: PIOA,
1408    #[doc = "PIOB"]
1409    pub PIOB: PIOB,
1410    #[doc = "PIOC"]
1411    pub PIOC: PIOC,
1412    #[doc = "PIOD"]
1413    pub PIOD: PIOD,
1414    #[doc = "PIOE"]
1415    pub PIOE: PIOE,
1416    #[doc = "RSTC"]
1417    pub RSTC: RSTC,
1418    #[doc = "SUPC"]
1419    pub SUPC: SUPC,
1420    #[doc = "RTT"]
1421    pub RTT: RTT,
1422    #[doc = "WDT"]
1423    pub WDT: WDT,
1424    #[doc = "RTC"]
1425    pub RTC: RTC,
1426    #[doc = "GPBR"]
1427    pub GPBR: GPBR,
1428    #[doc = "RSWDT"]
1429    pub RSWDT: RSWDT,
1430}
1431impl Peripherals {
1432    #[doc = r" Returns all the peripherals *once*."]
1433    #[cfg(feature = "critical-section")]
1434    #[inline]
1435    pub fn take() -> Option<Self> {
1436        critical_section::with(|_| {
1437            if unsafe { DEVICE_PERIPHERALS } {
1438                return None;
1439            }
1440            Some(unsafe { Peripherals::steal() })
1441        })
1442    }
1443    #[doc = r" Unchecked version of `Peripherals::take`."]
1444    #[doc = r""]
1445    #[doc = r" # Safety"]
1446    #[doc = r""]
1447    #[doc = r" Each of the returned peripherals must be used at most once."]
1448    #[inline]
1449    pub unsafe fn steal() -> Self {
1450        DEVICE_PERIPHERALS = true;
1451        Peripherals {
1452            PWM: PWM {
1453                _marker: PhantomData,
1454            },
1455            AES: AES {
1456                _marker: PhantomData,
1457            },
1458            CAN0: CAN0 {
1459                _marker: PhantomData,
1460            },
1461            CAN1: CAN1 {
1462                _marker: PhantomData,
1463            },
1464            GMAC: GMAC {
1465                _marker: PhantomData,
1466            },
1467            SMC: SMC {
1468                _marker: PhantomData,
1469            },
1470            UART1: UART1 {
1471                _marker: PhantomData,
1472            },
1473            HSMCI: HSMCI {
1474                _marker: PhantomData,
1475            },
1476            UDP: UDP {
1477                _marker: PhantomData,
1478            },
1479            SPI: SPI {
1480                _marker: PhantomData,
1481            },
1482            TC0: TC0 {
1483                _marker: PhantomData,
1484            },
1485            TC1: TC1 {
1486                _marker: PhantomData,
1487            },
1488            TC2: TC2 {
1489                _marker: PhantomData,
1490            },
1491            USART0: USART0 {
1492                _marker: PhantomData,
1493            },
1494            USART1: USART1 {
1495                _marker: PhantomData,
1496            },
1497            TWI0: TWI0 {
1498                _marker: PhantomData,
1499            },
1500            TWI1: TWI1 {
1501                _marker: PhantomData,
1502            },
1503            AFEC0: AFEC0 {
1504                _marker: PhantomData,
1505            },
1506            AFEC1: AFEC1 {
1507                _marker: PhantomData,
1508            },
1509            DACC: DACC {
1510                _marker: PhantomData,
1511            },
1512            ACC: ACC {
1513                _marker: PhantomData,
1514            },
1515            DMAC: DMAC {
1516                _marker: PhantomData,
1517            },
1518            CMCC: CMCC {
1519                _marker: PhantomData,
1520            },
1521            MATRIX: MATRIX {
1522                _marker: PhantomData,
1523            },
1524            PMC: PMC {
1525                _marker: PhantomData,
1526            },
1527            UART0: UART0 {
1528                _marker: PhantomData,
1529            },
1530            CHIPID: CHIPID {
1531                _marker: PhantomData,
1532            },
1533            EFC: EFC {
1534                _marker: PhantomData,
1535            },
1536            PIOA: PIOA {
1537                _marker: PhantomData,
1538            },
1539            PIOB: PIOB {
1540                _marker: PhantomData,
1541            },
1542            PIOC: PIOC {
1543                _marker: PhantomData,
1544            },
1545            PIOD: PIOD {
1546                _marker: PhantomData,
1547            },
1548            PIOE: PIOE {
1549                _marker: PhantomData,
1550            },
1551            RSTC: RSTC {
1552                _marker: PhantomData,
1553            },
1554            SUPC: SUPC {
1555                _marker: PhantomData,
1556            },
1557            RTT: RTT {
1558                _marker: PhantomData,
1559            },
1560            WDT: WDT {
1561                _marker: PhantomData,
1562            },
1563            RTC: RTC {
1564                _marker: PhantomData,
1565            },
1566            GPBR: GPBR {
1567                _marker: PhantomData,
1568            },
1569            RSWDT: RSWDT {
1570                _marker: PhantomData,
1571            },
1572        }
1573    }
1574}