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