efm32wg380_pac/
lib.rs

1#![doc = "Peripheral access API for EFM32WG380F128 microcontrollers (generated using svd2rust v0.24.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.24.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 DMA();
38    fn GPIO_EVEN();
39    fn TIMER0();
40    fn USART0_RX();
41    fn USART0_TX();
42    fn USB();
43    fn ACMP0();
44    fn ADC0();
45    fn DAC0();
46    fn I2C0();
47    fn I2C1();
48    fn GPIO_ODD();
49    fn TIMER1();
50    fn TIMER2();
51    fn TIMER3();
52    fn USART1_RX();
53    fn USART1_TX();
54    fn LESENSE();
55    fn USART2_RX();
56    fn USART2_TX();
57    fn UART0_RX();
58    fn UART0_TX();
59    fn UART1_RX();
60    fn UART1_TX();
61    fn LEUART0();
62    fn LEUART1();
63    fn LETIMER0();
64    fn PCNT0();
65    fn PCNT1();
66    fn PCNT2();
67    fn RTC();
68    fn BURTC();
69    fn CMU();
70    fn VCMP();
71    fn MSC();
72    fn AES();
73    fn EBI();
74    fn EMU();
75    fn FPUEH();
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; 40] = [
87    Vector { _handler: DMA },
88    Vector {
89        _handler: GPIO_EVEN,
90    },
91    Vector { _handler: TIMER0 },
92    Vector {
93        _handler: USART0_RX,
94    },
95    Vector {
96        _handler: USART0_TX,
97    },
98    Vector { _handler: USB },
99    Vector { _handler: ACMP0 },
100    Vector { _handler: ADC0 },
101    Vector { _handler: DAC0 },
102    Vector { _handler: I2C0 },
103    Vector { _handler: I2C1 },
104    Vector { _handler: GPIO_ODD },
105    Vector { _handler: TIMER1 },
106    Vector { _handler: TIMER2 },
107    Vector { _handler: TIMER3 },
108    Vector {
109        _handler: USART1_RX,
110    },
111    Vector {
112        _handler: USART1_TX,
113    },
114    Vector { _handler: LESENSE },
115    Vector {
116        _handler: USART2_RX,
117    },
118    Vector {
119        _handler: USART2_TX,
120    },
121    Vector { _handler: UART0_RX },
122    Vector { _handler: UART0_TX },
123    Vector { _handler: UART1_RX },
124    Vector { _handler: UART1_TX },
125    Vector { _handler: LEUART0 },
126    Vector { _handler: LEUART1 },
127    Vector { _handler: LETIMER0 },
128    Vector { _handler: PCNT0 },
129    Vector { _handler: PCNT1 },
130    Vector { _handler: PCNT2 },
131    Vector { _handler: RTC },
132    Vector { _handler: BURTC },
133    Vector { _handler: CMU },
134    Vector { _handler: VCMP },
135    Vector { _reserved: 0 },
136    Vector { _handler: MSC },
137    Vector { _handler: AES },
138    Vector { _handler: EBI },
139    Vector { _handler: EMU },
140    Vector { _handler: FPUEH },
141];
142#[doc = r"Enumeration of all the interrupts."]
143#[derive(Copy, Clone, Debug, PartialEq, Eq)]
144#[repr(u16)]
145pub enum Interrupt {
146    #[doc = "0 - DMA"]
147    DMA = 0,
148    #[doc = "1 - GPIO_EVEN"]
149    GPIO_EVEN = 1,
150    #[doc = "2 - TIMER0"]
151    TIMER0 = 2,
152    #[doc = "3 - USART0_RX"]
153    USART0_RX = 3,
154    #[doc = "4 - USART0_TX"]
155    USART0_TX = 4,
156    #[doc = "5 - USB"]
157    USB = 5,
158    #[doc = "6 - ACMP0"]
159    ACMP0 = 6,
160    #[doc = "7 - ADC0"]
161    ADC0 = 7,
162    #[doc = "8 - DAC0"]
163    DAC0 = 8,
164    #[doc = "9 - I2C0"]
165    I2C0 = 9,
166    #[doc = "10 - I2C1"]
167    I2C1 = 10,
168    #[doc = "11 - GPIO_ODD"]
169    GPIO_ODD = 11,
170    #[doc = "12 - TIMER1"]
171    TIMER1 = 12,
172    #[doc = "13 - TIMER2"]
173    TIMER2 = 13,
174    #[doc = "14 - TIMER3"]
175    TIMER3 = 14,
176    #[doc = "15 - USART1_RX"]
177    USART1_RX = 15,
178    #[doc = "16 - USART1_TX"]
179    USART1_TX = 16,
180    #[doc = "17 - LESENSE"]
181    LESENSE = 17,
182    #[doc = "18 - USART2_RX"]
183    USART2_RX = 18,
184    #[doc = "19 - USART2_TX"]
185    USART2_TX = 19,
186    #[doc = "20 - UART0_RX"]
187    UART0_RX = 20,
188    #[doc = "21 - UART0_TX"]
189    UART0_TX = 21,
190    #[doc = "22 - UART1_RX"]
191    UART1_RX = 22,
192    #[doc = "23 - UART1_TX"]
193    UART1_TX = 23,
194    #[doc = "24 - LEUART0"]
195    LEUART0 = 24,
196    #[doc = "25 - LEUART1"]
197    LEUART1 = 25,
198    #[doc = "26 - LETIMER0"]
199    LETIMER0 = 26,
200    #[doc = "27 - PCNT0"]
201    PCNT0 = 27,
202    #[doc = "28 - PCNT1"]
203    PCNT1 = 28,
204    #[doc = "29 - PCNT2"]
205    PCNT2 = 29,
206    #[doc = "30 - RTC"]
207    RTC = 30,
208    #[doc = "31 - BURTC"]
209    BURTC = 31,
210    #[doc = "32 - CMU"]
211    CMU = 32,
212    #[doc = "33 - VCMP"]
213    VCMP = 33,
214    #[doc = "35 - MSC"]
215    MSC = 35,
216    #[doc = "36 - AES"]
217    AES = 36,
218    #[doc = "37 - EBI"]
219    EBI = 37,
220    #[doc = "38 - EMU"]
221    EMU = 38,
222    #[doc = "39 - FPUEH"]
223    FPUEH = 39,
224}
225unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
226    #[inline(always)]
227    fn number(self) -> u16 {
228        self as u16
229    }
230}
231#[doc = "DMA"]
232pub struct DMA {
233    _marker: PhantomData<*const ()>,
234}
235unsafe impl Send for DMA {}
236impl DMA {
237    #[doc = r"Pointer to the register block"]
238    pub const PTR: *const dma::RegisterBlock = 0x400c_2000 as *const _;
239    #[doc = r"Return the pointer to the register block"]
240    #[inline(always)]
241    pub const fn ptr() -> *const dma::RegisterBlock {
242        Self::PTR
243    }
244}
245impl Deref for DMA {
246    type Target = dma::RegisterBlock;
247    #[inline(always)]
248    fn deref(&self) -> &Self::Target {
249        unsafe { &*Self::PTR }
250    }
251}
252impl core::fmt::Debug for DMA {
253    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
254        f.debug_struct("DMA").finish()
255    }
256}
257#[doc = "DMA"]
258pub mod dma;
259#[doc = "AES"]
260pub struct AES {
261    _marker: PhantomData<*const ()>,
262}
263unsafe impl Send for AES {}
264impl AES {
265    #[doc = r"Pointer to the register block"]
266    pub const PTR: *const aes::RegisterBlock = 0x400e_0000 as *const _;
267    #[doc = r"Return the pointer to the register block"]
268    #[inline(always)]
269    pub const fn ptr() -> *const aes::RegisterBlock {
270        Self::PTR
271    }
272}
273impl Deref for AES {
274    type Target = aes::RegisterBlock;
275    #[inline(always)]
276    fn deref(&self) -> &Self::Target {
277        unsafe { &*Self::PTR }
278    }
279}
280impl core::fmt::Debug for AES {
281    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
282        f.debug_struct("AES").finish()
283    }
284}
285#[doc = "AES"]
286pub mod aes;
287#[doc = "USB"]
288pub struct USB {
289    _marker: PhantomData<*const ()>,
290}
291unsafe impl Send for USB {}
292impl USB {
293    #[doc = r"Pointer to the register block"]
294    pub const PTR: *const usb::RegisterBlock = 0x400c_4000 as *const _;
295    #[doc = r"Return the pointer to the register block"]
296    #[inline(always)]
297    pub const fn ptr() -> *const usb::RegisterBlock {
298        Self::PTR
299    }
300}
301impl Deref for USB {
302    type Target = usb::RegisterBlock;
303    #[inline(always)]
304    fn deref(&self) -> &Self::Target {
305        unsafe { &*Self::PTR }
306    }
307}
308impl core::fmt::Debug for USB {
309    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
310        f.debug_struct("USB").finish()
311    }
312}
313#[doc = "USB"]
314pub mod usb;
315#[doc = "MSC"]
316pub struct MSC {
317    _marker: PhantomData<*const ()>,
318}
319unsafe impl Send for MSC {}
320impl MSC {
321    #[doc = r"Pointer to the register block"]
322    pub const PTR: *const msc::RegisterBlock = 0x400c_0000 as *const _;
323    #[doc = r"Return the pointer to the register block"]
324    #[inline(always)]
325    pub const fn ptr() -> *const msc::RegisterBlock {
326        Self::PTR
327    }
328}
329impl Deref for MSC {
330    type Target = msc::RegisterBlock;
331    #[inline(always)]
332    fn deref(&self) -> &Self::Target {
333        unsafe { &*Self::PTR }
334    }
335}
336impl core::fmt::Debug for MSC {
337    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
338        f.debug_struct("MSC").finish()
339    }
340}
341#[doc = "MSC"]
342pub mod msc;
343#[doc = "EMU"]
344pub struct EMU {
345    _marker: PhantomData<*const ()>,
346}
347unsafe impl Send for EMU {}
348impl EMU {
349    #[doc = r"Pointer to the register block"]
350    pub const PTR: *const emu::RegisterBlock = 0x400c_6000 as *const _;
351    #[doc = r"Return the pointer to the register block"]
352    #[inline(always)]
353    pub const fn ptr() -> *const emu::RegisterBlock {
354        Self::PTR
355    }
356}
357impl Deref for EMU {
358    type Target = emu::RegisterBlock;
359    #[inline(always)]
360    fn deref(&self) -> &Self::Target {
361        unsafe { &*Self::PTR }
362    }
363}
364impl core::fmt::Debug for EMU {
365    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
366        f.debug_struct("EMU").finish()
367    }
368}
369#[doc = "EMU"]
370pub mod emu;
371#[doc = "RMU"]
372pub struct RMU {
373    _marker: PhantomData<*const ()>,
374}
375unsafe impl Send for RMU {}
376impl RMU {
377    #[doc = r"Pointer to the register block"]
378    pub const PTR: *const rmu::RegisterBlock = 0x400c_a000 as *const _;
379    #[doc = r"Return the pointer to the register block"]
380    #[inline(always)]
381    pub const fn ptr() -> *const rmu::RegisterBlock {
382        Self::PTR
383    }
384}
385impl Deref for RMU {
386    type Target = rmu::RegisterBlock;
387    #[inline(always)]
388    fn deref(&self) -> &Self::Target {
389        unsafe { &*Self::PTR }
390    }
391}
392impl core::fmt::Debug for RMU {
393    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
394        f.debug_struct("RMU").finish()
395    }
396}
397#[doc = "RMU"]
398pub mod rmu;
399#[doc = "CMU"]
400pub struct CMU {
401    _marker: PhantomData<*const ()>,
402}
403unsafe impl Send for CMU {}
404impl CMU {
405    #[doc = r"Pointer to the register block"]
406    pub const PTR: *const cmu::RegisterBlock = 0x400c_8000 as *const _;
407    #[doc = r"Return the pointer to the register block"]
408    #[inline(always)]
409    pub const fn ptr() -> *const cmu::RegisterBlock {
410        Self::PTR
411    }
412}
413impl Deref for CMU {
414    type Target = cmu::RegisterBlock;
415    #[inline(always)]
416    fn deref(&self) -> &Self::Target {
417        unsafe { &*Self::PTR }
418    }
419}
420impl core::fmt::Debug for CMU {
421    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
422        f.debug_struct("CMU").finish()
423    }
424}
425#[doc = "CMU"]
426pub mod cmu;
427#[doc = "LESENSE"]
428pub struct LESENSE {
429    _marker: PhantomData<*const ()>,
430}
431unsafe impl Send for LESENSE {}
432impl LESENSE {
433    #[doc = r"Pointer to the register block"]
434    pub const PTR: *const lesense::RegisterBlock = 0x4008_c000 as *const _;
435    #[doc = r"Return the pointer to the register block"]
436    #[inline(always)]
437    pub const fn ptr() -> *const lesense::RegisterBlock {
438        Self::PTR
439    }
440}
441impl Deref for LESENSE {
442    type Target = lesense::RegisterBlock;
443    #[inline(always)]
444    fn deref(&self) -> &Self::Target {
445        unsafe { &*Self::PTR }
446    }
447}
448impl core::fmt::Debug for LESENSE {
449    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
450        f.debug_struct("LESENSE").finish()
451    }
452}
453#[doc = "LESENSE"]
454pub mod lesense;
455#[doc = "EBI"]
456pub struct EBI {
457    _marker: PhantomData<*const ()>,
458}
459unsafe impl Send for EBI {}
460impl EBI {
461    #[doc = r"Pointer to the register block"]
462    pub const PTR: *const ebi::RegisterBlock = 0x4000_8000 as *const _;
463    #[doc = r"Return the pointer to the register block"]
464    #[inline(always)]
465    pub const fn ptr() -> *const ebi::RegisterBlock {
466        Self::PTR
467    }
468}
469impl Deref for EBI {
470    type Target = ebi::RegisterBlock;
471    #[inline(always)]
472    fn deref(&self) -> &Self::Target {
473        unsafe { &*Self::PTR }
474    }
475}
476impl core::fmt::Debug for EBI {
477    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
478        f.debug_struct("EBI").finish()
479    }
480}
481#[doc = "EBI"]
482pub mod ebi;
483#[doc = "FPUEH"]
484pub struct FPUEH {
485    _marker: PhantomData<*const ()>,
486}
487unsafe impl Send for FPUEH {}
488impl FPUEH {
489    #[doc = r"Pointer to the register block"]
490    pub const PTR: *const fpueh::RegisterBlock = 0x400c_1c00 as *const _;
491    #[doc = r"Return the pointer to the register block"]
492    #[inline(always)]
493    pub const fn ptr() -> *const fpueh::RegisterBlock {
494        Self::PTR
495    }
496}
497impl Deref for FPUEH {
498    type Target = fpueh::RegisterBlock;
499    #[inline(always)]
500    fn deref(&self) -> &Self::Target {
501        unsafe { &*Self::PTR }
502    }
503}
504impl core::fmt::Debug for FPUEH {
505    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
506        f.debug_struct("FPUEH").finish()
507    }
508}
509#[doc = "FPUEH"]
510pub mod fpueh;
511#[doc = "USART0"]
512pub struct USART0 {
513    _marker: PhantomData<*const ()>,
514}
515unsafe impl Send for USART0 {}
516impl USART0 {
517    #[doc = r"Pointer to the register block"]
518    pub const PTR: *const usart0::RegisterBlock = 0x4000_c000 as *const _;
519    #[doc = r"Return the pointer to the register block"]
520    #[inline(always)]
521    pub const fn ptr() -> *const usart0::RegisterBlock {
522        Self::PTR
523    }
524}
525impl Deref for USART0 {
526    type Target = usart0::RegisterBlock;
527    #[inline(always)]
528    fn deref(&self) -> &Self::Target {
529        unsafe { &*Self::PTR }
530    }
531}
532impl core::fmt::Debug for USART0 {
533    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
534        f.debug_struct("USART0").finish()
535    }
536}
537#[doc = "USART0"]
538pub mod usart0;
539#[doc = "USART1"]
540pub struct USART1 {
541    _marker: PhantomData<*const ()>,
542}
543unsafe impl Send for USART1 {}
544impl USART1 {
545    #[doc = r"Pointer to the register block"]
546    pub const PTR: *const usart1::RegisterBlock = 0x4000_c400 as *const _;
547    #[doc = r"Return the pointer to the register block"]
548    #[inline(always)]
549    pub const fn ptr() -> *const usart1::RegisterBlock {
550        Self::PTR
551    }
552}
553impl Deref for USART1 {
554    type Target = usart1::RegisterBlock;
555    #[inline(always)]
556    fn deref(&self) -> &Self::Target {
557        unsafe { &*Self::PTR }
558    }
559}
560impl core::fmt::Debug for USART1 {
561    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
562        f.debug_struct("USART1").finish()
563    }
564}
565#[doc = "USART1"]
566pub mod usart1;
567#[doc = "USART2"]
568pub struct USART2 {
569    _marker: PhantomData<*const ()>,
570}
571unsafe impl Send for USART2 {}
572impl USART2 {
573    #[doc = r"Pointer to the register block"]
574    pub const PTR: *const usart2::RegisterBlock = 0x4000_c800 as *const _;
575    #[doc = r"Return the pointer to the register block"]
576    #[inline(always)]
577    pub const fn ptr() -> *const usart2::RegisterBlock {
578        Self::PTR
579    }
580}
581impl Deref for USART2 {
582    type Target = usart2::RegisterBlock;
583    #[inline(always)]
584    fn deref(&self) -> &Self::Target {
585        unsafe { &*Self::PTR }
586    }
587}
588impl core::fmt::Debug for USART2 {
589    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
590        f.debug_struct("USART2").finish()
591    }
592}
593#[doc = "USART2"]
594pub mod usart2;
595#[doc = "UART0"]
596pub struct UART0 {
597    _marker: PhantomData<*const ()>,
598}
599unsafe impl Send for UART0 {}
600impl UART0 {
601    #[doc = r"Pointer to the register block"]
602    pub const PTR: *const uart0::RegisterBlock = 0x4000_e000 as *const _;
603    #[doc = r"Return the pointer to the register block"]
604    #[inline(always)]
605    pub const fn ptr() -> *const uart0::RegisterBlock {
606        Self::PTR
607    }
608}
609impl Deref for UART0 {
610    type Target = uart0::RegisterBlock;
611    #[inline(always)]
612    fn deref(&self) -> &Self::Target {
613        unsafe { &*Self::PTR }
614    }
615}
616impl core::fmt::Debug for UART0 {
617    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
618        f.debug_struct("UART0").finish()
619    }
620}
621#[doc = "UART0"]
622pub mod uart0;
623#[doc = "UART1"]
624pub struct UART1 {
625    _marker: PhantomData<*const ()>,
626}
627unsafe impl Send for UART1 {}
628impl UART1 {
629    #[doc = r"Pointer to the register block"]
630    pub const PTR: *const uart1::RegisterBlock = 0x4000_e400 as *const _;
631    #[doc = r"Return the pointer to the register block"]
632    #[inline(always)]
633    pub const fn ptr() -> *const uart1::RegisterBlock {
634        Self::PTR
635    }
636}
637impl Deref for UART1 {
638    type Target = uart1::RegisterBlock;
639    #[inline(always)]
640    fn deref(&self) -> &Self::Target {
641        unsafe { &*Self::PTR }
642    }
643}
644impl core::fmt::Debug for UART1 {
645    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
646        f.debug_struct("UART1").finish()
647    }
648}
649#[doc = "UART1"]
650pub mod uart1;
651#[doc = "TIMER0"]
652pub struct TIMER0 {
653    _marker: PhantomData<*const ()>,
654}
655unsafe impl Send for TIMER0 {}
656impl TIMER0 {
657    #[doc = r"Pointer to the register block"]
658    pub const PTR: *const timer0::RegisterBlock = 0x4001_0000 as *const _;
659    #[doc = r"Return the pointer to the register block"]
660    #[inline(always)]
661    pub const fn ptr() -> *const timer0::RegisterBlock {
662        Self::PTR
663    }
664}
665impl Deref for TIMER0 {
666    type Target = timer0::RegisterBlock;
667    #[inline(always)]
668    fn deref(&self) -> &Self::Target {
669        unsafe { &*Self::PTR }
670    }
671}
672impl core::fmt::Debug for TIMER0 {
673    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
674        f.debug_struct("TIMER0").finish()
675    }
676}
677#[doc = "TIMER0"]
678pub mod timer0;
679#[doc = "TIMER1"]
680pub struct TIMER1 {
681    _marker: PhantomData<*const ()>,
682}
683unsafe impl Send for TIMER1 {}
684impl TIMER1 {
685    #[doc = r"Pointer to the register block"]
686    pub const PTR: *const timer1::RegisterBlock = 0x4001_0400 as *const _;
687    #[doc = r"Return the pointer to the register block"]
688    #[inline(always)]
689    pub const fn ptr() -> *const timer1::RegisterBlock {
690        Self::PTR
691    }
692}
693impl Deref for TIMER1 {
694    type Target = timer1::RegisterBlock;
695    #[inline(always)]
696    fn deref(&self) -> &Self::Target {
697        unsafe { &*Self::PTR }
698    }
699}
700impl core::fmt::Debug for TIMER1 {
701    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
702        f.debug_struct("TIMER1").finish()
703    }
704}
705#[doc = "TIMER1"]
706pub mod timer1;
707#[doc = "TIMER2"]
708pub struct TIMER2 {
709    _marker: PhantomData<*const ()>,
710}
711unsafe impl Send for TIMER2 {}
712impl TIMER2 {
713    #[doc = r"Pointer to the register block"]
714    pub const PTR: *const timer2::RegisterBlock = 0x4001_0800 as *const _;
715    #[doc = r"Return the pointer to the register block"]
716    #[inline(always)]
717    pub const fn ptr() -> *const timer2::RegisterBlock {
718        Self::PTR
719    }
720}
721impl Deref for TIMER2 {
722    type Target = timer2::RegisterBlock;
723    #[inline(always)]
724    fn deref(&self) -> &Self::Target {
725        unsafe { &*Self::PTR }
726    }
727}
728impl core::fmt::Debug for TIMER2 {
729    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
730        f.debug_struct("TIMER2").finish()
731    }
732}
733#[doc = "TIMER2"]
734pub mod timer2;
735#[doc = "TIMER3"]
736pub struct TIMER3 {
737    _marker: PhantomData<*const ()>,
738}
739unsafe impl Send for TIMER3 {}
740impl TIMER3 {
741    #[doc = r"Pointer to the register block"]
742    pub const PTR: *const timer3::RegisterBlock = 0x4001_0c00 as *const _;
743    #[doc = r"Return the pointer to the register block"]
744    #[inline(always)]
745    pub const fn ptr() -> *const timer3::RegisterBlock {
746        Self::PTR
747    }
748}
749impl Deref for TIMER3 {
750    type Target = timer3::RegisterBlock;
751    #[inline(always)]
752    fn deref(&self) -> &Self::Target {
753        unsafe { &*Self::PTR }
754    }
755}
756impl core::fmt::Debug for TIMER3 {
757    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
758        f.debug_struct("TIMER3").finish()
759    }
760}
761#[doc = "TIMER3"]
762pub mod timer3;
763#[doc = "ACMP0"]
764pub struct ACMP0 {
765    _marker: PhantomData<*const ()>,
766}
767unsafe impl Send for ACMP0 {}
768impl ACMP0 {
769    #[doc = r"Pointer to the register block"]
770    pub const PTR: *const acmp0::RegisterBlock = 0x4000_1000 as *const _;
771    #[doc = r"Return the pointer to the register block"]
772    #[inline(always)]
773    pub const fn ptr() -> *const acmp0::RegisterBlock {
774        Self::PTR
775    }
776}
777impl Deref for ACMP0 {
778    type Target = acmp0::RegisterBlock;
779    #[inline(always)]
780    fn deref(&self) -> &Self::Target {
781        unsafe { &*Self::PTR }
782    }
783}
784impl core::fmt::Debug for ACMP0 {
785    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
786        f.debug_struct("ACMP0").finish()
787    }
788}
789#[doc = "ACMP0"]
790pub mod acmp0;
791#[doc = "ACMP1"]
792pub struct ACMP1 {
793    _marker: PhantomData<*const ()>,
794}
795unsafe impl Send for ACMP1 {}
796impl ACMP1 {
797    #[doc = r"Pointer to the register block"]
798    pub const PTR: *const acmp1::RegisterBlock = 0x4000_1400 as *const _;
799    #[doc = r"Return the pointer to the register block"]
800    #[inline(always)]
801    pub const fn ptr() -> *const acmp1::RegisterBlock {
802        Self::PTR
803    }
804}
805impl Deref for ACMP1 {
806    type Target = acmp1::RegisterBlock;
807    #[inline(always)]
808    fn deref(&self) -> &Self::Target {
809        unsafe { &*Self::PTR }
810    }
811}
812impl core::fmt::Debug for ACMP1 {
813    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
814        f.debug_struct("ACMP1").finish()
815    }
816}
817#[doc = "ACMP1"]
818pub mod acmp1;
819#[doc = "LEUART0"]
820pub struct LEUART0 {
821    _marker: PhantomData<*const ()>,
822}
823unsafe impl Send for LEUART0 {}
824impl LEUART0 {
825    #[doc = r"Pointer to the register block"]
826    pub const PTR: *const leuart0::RegisterBlock = 0x4008_4000 as *const _;
827    #[doc = r"Return the pointer to the register block"]
828    #[inline(always)]
829    pub const fn ptr() -> *const leuart0::RegisterBlock {
830        Self::PTR
831    }
832}
833impl Deref for LEUART0 {
834    type Target = leuart0::RegisterBlock;
835    #[inline(always)]
836    fn deref(&self) -> &Self::Target {
837        unsafe { &*Self::PTR }
838    }
839}
840impl core::fmt::Debug for LEUART0 {
841    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
842        f.debug_struct("LEUART0").finish()
843    }
844}
845#[doc = "LEUART0"]
846pub mod leuart0;
847#[doc = "LEUART1"]
848pub struct LEUART1 {
849    _marker: PhantomData<*const ()>,
850}
851unsafe impl Send for LEUART1 {}
852impl LEUART1 {
853    #[doc = r"Pointer to the register block"]
854    pub const PTR: *const leuart1::RegisterBlock = 0x4008_4400 as *const _;
855    #[doc = r"Return the pointer to the register block"]
856    #[inline(always)]
857    pub const fn ptr() -> *const leuart1::RegisterBlock {
858        Self::PTR
859    }
860}
861impl Deref for LEUART1 {
862    type Target = leuart1::RegisterBlock;
863    #[inline(always)]
864    fn deref(&self) -> &Self::Target {
865        unsafe { &*Self::PTR }
866    }
867}
868impl core::fmt::Debug for LEUART1 {
869    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
870        f.debug_struct("LEUART1").finish()
871    }
872}
873#[doc = "LEUART1"]
874pub mod leuart1;
875#[doc = "RTC"]
876pub struct RTC {
877    _marker: PhantomData<*const ()>,
878}
879unsafe impl Send for RTC {}
880impl RTC {
881    #[doc = r"Pointer to the register block"]
882    pub const PTR: *const rtc::RegisterBlock = 0x4008_0000 as *const _;
883    #[doc = r"Return the pointer to the register block"]
884    #[inline(always)]
885    pub const fn ptr() -> *const rtc::RegisterBlock {
886        Self::PTR
887    }
888}
889impl Deref for RTC {
890    type Target = rtc::RegisterBlock;
891    #[inline(always)]
892    fn deref(&self) -> &Self::Target {
893        unsafe { &*Self::PTR }
894    }
895}
896impl core::fmt::Debug for RTC {
897    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
898        f.debug_struct("RTC").finish()
899    }
900}
901#[doc = "RTC"]
902pub mod rtc;
903#[doc = "LETIMER0"]
904pub struct LETIMER0 {
905    _marker: PhantomData<*const ()>,
906}
907unsafe impl Send for LETIMER0 {}
908impl LETIMER0 {
909    #[doc = r"Pointer to the register block"]
910    pub const PTR: *const letimer0::RegisterBlock = 0x4008_2000 as *const _;
911    #[doc = r"Return the pointer to the register block"]
912    #[inline(always)]
913    pub const fn ptr() -> *const letimer0::RegisterBlock {
914        Self::PTR
915    }
916}
917impl Deref for LETIMER0 {
918    type Target = letimer0::RegisterBlock;
919    #[inline(always)]
920    fn deref(&self) -> &Self::Target {
921        unsafe { &*Self::PTR }
922    }
923}
924impl core::fmt::Debug for LETIMER0 {
925    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
926        f.debug_struct("LETIMER0").finish()
927    }
928}
929#[doc = "LETIMER0"]
930pub mod letimer0;
931#[doc = "PCNT0"]
932pub struct PCNT0 {
933    _marker: PhantomData<*const ()>,
934}
935unsafe impl Send for PCNT0 {}
936impl PCNT0 {
937    #[doc = r"Pointer to the register block"]
938    pub const PTR: *const pcnt0::RegisterBlock = 0x4008_6000 as *const _;
939    #[doc = r"Return the pointer to the register block"]
940    #[inline(always)]
941    pub const fn ptr() -> *const pcnt0::RegisterBlock {
942        Self::PTR
943    }
944}
945impl Deref for PCNT0 {
946    type Target = pcnt0::RegisterBlock;
947    #[inline(always)]
948    fn deref(&self) -> &Self::Target {
949        unsafe { &*Self::PTR }
950    }
951}
952impl core::fmt::Debug for PCNT0 {
953    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
954        f.debug_struct("PCNT0").finish()
955    }
956}
957#[doc = "PCNT0"]
958pub mod pcnt0;
959#[doc = "PCNT1"]
960pub struct PCNT1 {
961    _marker: PhantomData<*const ()>,
962}
963unsafe impl Send for PCNT1 {}
964impl PCNT1 {
965    #[doc = r"Pointer to the register block"]
966    pub const PTR: *const pcnt1::RegisterBlock = 0x4008_6400 as *const _;
967    #[doc = r"Return the pointer to the register block"]
968    #[inline(always)]
969    pub const fn ptr() -> *const pcnt1::RegisterBlock {
970        Self::PTR
971    }
972}
973impl Deref for PCNT1 {
974    type Target = pcnt1::RegisterBlock;
975    #[inline(always)]
976    fn deref(&self) -> &Self::Target {
977        unsafe { &*Self::PTR }
978    }
979}
980impl core::fmt::Debug for PCNT1 {
981    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
982        f.debug_struct("PCNT1").finish()
983    }
984}
985#[doc = "PCNT1"]
986pub mod pcnt1;
987#[doc = "PCNT2"]
988pub struct PCNT2 {
989    _marker: PhantomData<*const ()>,
990}
991unsafe impl Send for PCNT2 {}
992impl PCNT2 {
993    #[doc = r"Pointer to the register block"]
994    pub const PTR: *const pcnt2::RegisterBlock = 0x4008_6800 as *const _;
995    #[doc = r"Return the pointer to the register block"]
996    #[inline(always)]
997    pub const fn ptr() -> *const pcnt2::RegisterBlock {
998        Self::PTR
999    }
1000}
1001impl Deref for PCNT2 {
1002    type Target = pcnt2::RegisterBlock;
1003    #[inline(always)]
1004    fn deref(&self) -> &Self::Target {
1005        unsafe { &*Self::PTR }
1006    }
1007}
1008impl core::fmt::Debug for PCNT2 {
1009    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1010        f.debug_struct("PCNT2").finish()
1011    }
1012}
1013#[doc = "PCNT2"]
1014pub mod pcnt2;
1015#[doc = "I2C0"]
1016pub struct I2C0 {
1017    _marker: PhantomData<*const ()>,
1018}
1019unsafe impl Send for I2C0 {}
1020impl I2C0 {
1021    #[doc = r"Pointer to the register block"]
1022    pub const PTR: *const i2c0::RegisterBlock = 0x4000_a000 as *const _;
1023    #[doc = r"Return the pointer to the register block"]
1024    #[inline(always)]
1025    pub const fn ptr() -> *const i2c0::RegisterBlock {
1026        Self::PTR
1027    }
1028}
1029impl Deref for I2C0 {
1030    type Target = i2c0::RegisterBlock;
1031    #[inline(always)]
1032    fn deref(&self) -> &Self::Target {
1033        unsafe { &*Self::PTR }
1034    }
1035}
1036impl core::fmt::Debug for I2C0 {
1037    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1038        f.debug_struct("I2C0").finish()
1039    }
1040}
1041#[doc = "I2C0"]
1042pub mod i2c0;
1043#[doc = "I2C1"]
1044pub struct I2C1 {
1045    _marker: PhantomData<*const ()>,
1046}
1047unsafe impl Send for I2C1 {}
1048impl I2C1 {
1049    #[doc = r"Pointer to the register block"]
1050    pub const PTR: *const i2c1::RegisterBlock = 0x4000_a400 as *const _;
1051    #[doc = r"Return the pointer to the register block"]
1052    #[inline(always)]
1053    pub const fn ptr() -> *const i2c1::RegisterBlock {
1054        Self::PTR
1055    }
1056}
1057impl Deref for I2C1 {
1058    type Target = i2c1::RegisterBlock;
1059    #[inline(always)]
1060    fn deref(&self) -> &Self::Target {
1061        unsafe { &*Self::PTR }
1062    }
1063}
1064impl core::fmt::Debug for I2C1 {
1065    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1066        f.debug_struct("I2C1").finish()
1067    }
1068}
1069#[doc = "I2C1"]
1070pub mod i2c1;
1071#[doc = "GPIO"]
1072pub struct GPIO {
1073    _marker: PhantomData<*const ()>,
1074}
1075unsafe impl Send for GPIO {}
1076impl GPIO {
1077    #[doc = r"Pointer to the register block"]
1078    pub const PTR: *const gpio::RegisterBlock = 0x4000_6000 as *const _;
1079    #[doc = r"Return the pointer to the register block"]
1080    #[inline(always)]
1081    pub const fn ptr() -> *const gpio::RegisterBlock {
1082        Self::PTR
1083    }
1084}
1085impl Deref for GPIO {
1086    type Target = gpio::RegisterBlock;
1087    #[inline(always)]
1088    fn deref(&self) -> &Self::Target {
1089        unsafe { &*Self::PTR }
1090    }
1091}
1092impl core::fmt::Debug for GPIO {
1093    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1094        f.debug_struct("GPIO").finish()
1095    }
1096}
1097#[doc = "GPIO"]
1098pub mod gpio;
1099#[doc = "VCMP"]
1100pub struct VCMP {
1101    _marker: PhantomData<*const ()>,
1102}
1103unsafe impl Send for VCMP {}
1104impl VCMP {
1105    #[doc = r"Pointer to the register block"]
1106    pub const PTR: *const vcmp::RegisterBlock = 0x4000_0000 as *const _;
1107    #[doc = r"Return the pointer to the register block"]
1108    #[inline(always)]
1109    pub const fn ptr() -> *const vcmp::RegisterBlock {
1110        Self::PTR
1111    }
1112}
1113impl Deref for VCMP {
1114    type Target = vcmp::RegisterBlock;
1115    #[inline(always)]
1116    fn deref(&self) -> &Self::Target {
1117        unsafe { &*Self::PTR }
1118    }
1119}
1120impl core::fmt::Debug for VCMP {
1121    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1122        f.debug_struct("VCMP").finish()
1123    }
1124}
1125#[doc = "VCMP"]
1126pub mod vcmp;
1127#[doc = "PRS"]
1128pub struct PRS {
1129    _marker: PhantomData<*const ()>,
1130}
1131unsafe impl Send for PRS {}
1132impl PRS {
1133    #[doc = r"Pointer to the register block"]
1134    pub const PTR: *const prs::RegisterBlock = 0x400c_c000 as *const _;
1135    #[doc = r"Return the pointer to the register block"]
1136    #[inline(always)]
1137    pub const fn ptr() -> *const prs::RegisterBlock {
1138        Self::PTR
1139    }
1140}
1141impl Deref for PRS {
1142    type Target = prs::RegisterBlock;
1143    #[inline(always)]
1144    fn deref(&self) -> &Self::Target {
1145        unsafe { &*Self::PTR }
1146    }
1147}
1148impl core::fmt::Debug for PRS {
1149    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1150        f.debug_struct("PRS").finish()
1151    }
1152}
1153#[doc = "PRS"]
1154pub mod prs;
1155#[doc = "ADC0"]
1156pub struct ADC0 {
1157    _marker: PhantomData<*const ()>,
1158}
1159unsafe impl Send for ADC0 {}
1160impl ADC0 {
1161    #[doc = r"Pointer to the register block"]
1162    pub const PTR: *const adc0::RegisterBlock = 0x4000_2000 as *const _;
1163    #[doc = r"Return the pointer to the register block"]
1164    #[inline(always)]
1165    pub const fn ptr() -> *const adc0::RegisterBlock {
1166        Self::PTR
1167    }
1168}
1169impl Deref for ADC0 {
1170    type Target = adc0::RegisterBlock;
1171    #[inline(always)]
1172    fn deref(&self) -> &Self::Target {
1173        unsafe { &*Self::PTR }
1174    }
1175}
1176impl core::fmt::Debug for ADC0 {
1177    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1178        f.debug_struct("ADC0").finish()
1179    }
1180}
1181#[doc = "ADC0"]
1182pub mod adc0;
1183#[doc = "DAC0"]
1184pub struct DAC0 {
1185    _marker: PhantomData<*const ()>,
1186}
1187unsafe impl Send for DAC0 {}
1188impl DAC0 {
1189    #[doc = r"Pointer to the register block"]
1190    pub const PTR: *const dac0::RegisterBlock = 0x4000_4000 as *const _;
1191    #[doc = r"Return the pointer to the register block"]
1192    #[inline(always)]
1193    pub const fn ptr() -> *const dac0::RegisterBlock {
1194        Self::PTR
1195    }
1196}
1197impl Deref for DAC0 {
1198    type Target = dac0::RegisterBlock;
1199    #[inline(always)]
1200    fn deref(&self) -> &Self::Target {
1201        unsafe { &*Self::PTR }
1202    }
1203}
1204impl core::fmt::Debug for DAC0 {
1205    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1206        f.debug_struct("DAC0").finish()
1207    }
1208}
1209#[doc = "DAC0"]
1210pub mod dac0;
1211#[doc = "BURTC"]
1212pub struct BURTC {
1213    _marker: PhantomData<*const ()>,
1214}
1215unsafe impl Send for BURTC {}
1216impl BURTC {
1217    #[doc = r"Pointer to the register block"]
1218    pub const PTR: *const burtc::RegisterBlock = 0x4008_1000 as *const _;
1219    #[doc = r"Return the pointer to the register block"]
1220    #[inline(always)]
1221    pub const fn ptr() -> *const burtc::RegisterBlock {
1222        Self::PTR
1223    }
1224}
1225impl Deref for BURTC {
1226    type Target = burtc::RegisterBlock;
1227    #[inline(always)]
1228    fn deref(&self) -> &Self::Target {
1229        unsafe { &*Self::PTR }
1230    }
1231}
1232impl core::fmt::Debug for BURTC {
1233    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1234        f.debug_struct("BURTC").finish()
1235    }
1236}
1237#[doc = "BURTC"]
1238pub mod burtc;
1239#[doc = "WDOG"]
1240pub struct WDOG {
1241    _marker: PhantomData<*const ()>,
1242}
1243unsafe impl Send for WDOG {}
1244impl WDOG {
1245    #[doc = r"Pointer to the register block"]
1246    pub const PTR: *const wdog::RegisterBlock = 0x4008_8000 as *const _;
1247    #[doc = r"Return the pointer to the register block"]
1248    #[inline(always)]
1249    pub const fn ptr() -> *const wdog::RegisterBlock {
1250        Self::PTR
1251    }
1252}
1253impl Deref for WDOG {
1254    type Target = wdog::RegisterBlock;
1255    #[inline(always)]
1256    fn deref(&self) -> &Self::Target {
1257        unsafe { &*Self::PTR }
1258    }
1259}
1260impl core::fmt::Debug for WDOG {
1261    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1262        f.debug_struct("WDOG").finish()
1263    }
1264}
1265#[doc = "WDOG"]
1266pub mod wdog;
1267#[doc = "ETM"]
1268pub struct ETM {
1269    _marker: PhantomData<*const ()>,
1270}
1271unsafe impl Send for ETM {}
1272impl ETM {
1273    #[doc = r"Pointer to the register block"]
1274    pub const PTR: *const etm::RegisterBlock = 0xe004_1000 as *const _;
1275    #[doc = r"Return the pointer to the register block"]
1276    #[inline(always)]
1277    pub const fn ptr() -> *const etm::RegisterBlock {
1278        Self::PTR
1279    }
1280}
1281impl Deref for ETM {
1282    type Target = etm::RegisterBlock;
1283    #[inline(always)]
1284    fn deref(&self) -> &Self::Target {
1285        unsafe { &*Self::PTR }
1286    }
1287}
1288impl core::fmt::Debug for ETM {
1289    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1290        f.debug_struct("ETM").finish()
1291    }
1292}
1293#[doc = "ETM"]
1294pub mod etm;
1295#[no_mangle]
1296static mut DEVICE_PERIPHERALS: bool = false;
1297#[doc = r"All the peripherals"]
1298#[allow(non_snake_case)]
1299pub struct Peripherals {
1300    #[doc = "DMA"]
1301    pub DMA: DMA,
1302    #[doc = "AES"]
1303    pub AES: AES,
1304    #[doc = "USB"]
1305    pub USB: USB,
1306    #[doc = "MSC"]
1307    pub MSC: MSC,
1308    #[doc = "EMU"]
1309    pub EMU: EMU,
1310    #[doc = "RMU"]
1311    pub RMU: RMU,
1312    #[doc = "CMU"]
1313    pub CMU: CMU,
1314    #[doc = "LESENSE"]
1315    pub LESENSE: LESENSE,
1316    #[doc = "EBI"]
1317    pub EBI: EBI,
1318    #[doc = "FPUEH"]
1319    pub FPUEH: FPUEH,
1320    #[doc = "USART0"]
1321    pub USART0: USART0,
1322    #[doc = "USART1"]
1323    pub USART1: USART1,
1324    #[doc = "USART2"]
1325    pub USART2: USART2,
1326    #[doc = "UART0"]
1327    pub UART0: UART0,
1328    #[doc = "UART1"]
1329    pub UART1: UART1,
1330    #[doc = "TIMER0"]
1331    pub TIMER0: TIMER0,
1332    #[doc = "TIMER1"]
1333    pub TIMER1: TIMER1,
1334    #[doc = "TIMER2"]
1335    pub TIMER2: TIMER2,
1336    #[doc = "TIMER3"]
1337    pub TIMER3: TIMER3,
1338    #[doc = "ACMP0"]
1339    pub ACMP0: ACMP0,
1340    #[doc = "ACMP1"]
1341    pub ACMP1: ACMP1,
1342    #[doc = "LEUART0"]
1343    pub LEUART0: LEUART0,
1344    #[doc = "LEUART1"]
1345    pub LEUART1: LEUART1,
1346    #[doc = "RTC"]
1347    pub RTC: RTC,
1348    #[doc = "LETIMER0"]
1349    pub LETIMER0: LETIMER0,
1350    #[doc = "PCNT0"]
1351    pub PCNT0: PCNT0,
1352    #[doc = "PCNT1"]
1353    pub PCNT1: PCNT1,
1354    #[doc = "PCNT2"]
1355    pub PCNT2: PCNT2,
1356    #[doc = "I2C0"]
1357    pub I2C0: I2C0,
1358    #[doc = "I2C1"]
1359    pub I2C1: I2C1,
1360    #[doc = "GPIO"]
1361    pub GPIO: GPIO,
1362    #[doc = "VCMP"]
1363    pub VCMP: VCMP,
1364    #[doc = "PRS"]
1365    pub PRS: PRS,
1366    #[doc = "ADC0"]
1367    pub ADC0: ADC0,
1368    #[doc = "DAC0"]
1369    pub DAC0: DAC0,
1370    #[doc = "BURTC"]
1371    pub BURTC: BURTC,
1372    #[doc = "WDOG"]
1373    pub WDOG: WDOG,
1374    #[doc = "ETM"]
1375    pub ETM: ETM,
1376}
1377impl Peripherals {
1378    #[doc = r"Returns all the peripherals *once*"]
1379    #[inline]
1380    pub fn take() -> Option<Self> {
1381        cortex_m::interrupt::free(|_| {
1382            if unsafe { DEVICE_PERIPHERALS } {
1383                None
1384            } else {
1385                Some(unsafe { Peripherals::steal() })
1386            }
1387        })
1388    }
1389    #[doc = r"Unchecked version of `Peripherals::take`"]
1390    #[inline]
1391    pub unsafe fn steal() -> Self {
1392        DEVICE_PERIPHERALS = true;
1393        Peripherals {
1394            DMA: DMA {
1395                _marker: PhantomData,
1396            },
1397            AES: AES {
1398                _marker: PhantomData,
1399            },
1400            USB: USB {
1401                _marker: PhantomData,
1402            },
1403            MSC: MSC {
1404                _marker: PhantomData,
1405            },
1406            EMU: EMU {
1407                _marker: PhantomData,
1408            },
1409            RMU: RMU {
1410                _marker: PhantomData,
1411            },
1412            CMU: CMU {
1413                _marker: PhantomData,
1414            },
1415            LESENSE: LESENSE {
1416                _marker: PhantomData,
1417            },
1418            EBI: EBI {
1419                _marker: PhantomData,
1420            },
1421            FPUEH: FPUEH {
1422                _marker: PhantomData,
1423            },
1424            USART0: USART0 {
1425                _marker: PhantomData,
1426            },
1427            USART1: USART1 {
1428                _marker: PhantomData,
1429            },
1430            USART2: USART2 {
1431                _marker: PhantomData,
1432            },
1433            UART0: UART0 {
1434                _marker: PhantomData,
1435            },
1436            UART1: UART1 {
1437                _marker: PhantomData,
1438            },
1439            TIMER0: TIMER0 {
1440                _marker: PhantomData,
1441            },
1442            TIMER1: TIMER1 {
1443                _marker: PhantomData,
1444            },
1445            TIMER2: TIMER2 {
1446                _marker: PhantomData,
1447            },
1448            TIMER3: TIMER3 {
1449                _marker: PhantomData,
1450            },
1451            ACMP0: ACMP0 {
1452                _marker: PhantomData,
1453            },
1454            ACMP1: ACMP1 {
1455                _marker: PhantomData,
1456            },
1457            LEUART0: LEUART0 {
1458                _marker: PhantomData,
1459            },
1460            LEUART1: LEUART1 {
1461                _marker: PhantomData,
1462            },
1463            RTC: RTC {
1464                _marker: PhantomData,
1465            },
1466            LETIMER0: LETIMER0 {
1467                _marker: PhantomData,
1468            },
1469            PCNT0: PCNT0 {
1470                _marker: PhantomData,
1471            },
1472            PCNT1: PCNT1 {
1473                _marker: PhantomData,
1474            },
1475            PCNT2: PCNT2 {
1476                _marker: PhantomData,
1477            },
1478            I2C0: I2C0 {
1479                _marker: PhantomData,
1480            },
1481            I2C1: I2C1 {
1482                _marker: PhantomData,
1483            },
1484            GPIO: GPIO {
1485                _marker: PhantomData,
1486            },
1487            VCMP: VCMP {
1488                _marker: PhantomData,
1489            },
1490            PRS: PRS {
1491                _marker: PhantomData,
1492            },
1493            ADC0: ADC0 {
1494                _marker: PhantomData,
1495            },
1496            DAC0: DAC0 {
1497                _marker: PhantomData,
1498            },
1499            BURTC: BURTC {
1500                _marker: PhantomData,
1501            },
1502            WDOG: WDOG {
1503                _marker: PhantomData,
1504            },
1505            ETM: ETM {
1506                _marker: PhantomData,
1507            },
1508        }
1509    }
1510}