efm32lg980_pac/
lib.rs

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