efm32wg995_pac/
lib.rs

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