1#![doc = "Peripheral access API for APOLLO4P microcontrollers (generated using svd2rust v0.33.4 ( ))\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.33.4/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#![allow(non_camel_case_types)]
4#![allow(non_snake_case)]
5#![no_std]
6use core::marker::PhantomData;
7use core::ops::Deref;
8#[doc = r"Number available in the NVIC for configuring priority"]
9pub const NVIC_PRIO_BITS: u8 = 3;
10#[allow(unused_imports)]
11use generic::*;
12#[doc = r"Common register and bit access and modify traits"]
13pub mod generic;
14#[cfg(feature = "rt")]
15extern "C" {
16 fn BROWNOUT();
17 fn WDT();
18 fn RTC();
19 fn VCOMP();
20 fn IOSLAVE();
21 fn IOSLAVEACC();
22 fn IOMSTR0();
23 fn IOMSTR1();
24 fn IOMSTR2();
25 fn IOMSTR3();
26 fn IOMSTR4();
27 fn IOMSTR5();
28 fn IOMSTR6();
29 fn IOMSTR7();
30 fn TIMER();
31 fn UART0();
32 fn UART1();
33 fn UART2();
34 fn UART3();
35 fn ADC();
36 fn MSPI0();
37 fn MSPI1();
38 fn MSPI2();
39 fn CLKGEN();
40 fn CRYPTOSEC();
41 fn SDIO();
42 fn USB0();
43 fn GPU();
44 fn DC();
45 fn DSI();
46 fn STIMER_CMPR0();
47 fn STIMER_CMPR1();
48 fn STIMER_CMPR2();
49 fn STIMER_CMPR3();
50 fn STIMER_CMPR4();
51 fn STIMER_CMPR5();
52 fn STIMER_CMPR6();
53 fn STIMER_CMPR7();
54 fn STIMER_OVF();
55 fn AUDADC0();
56 fn I2S0();
57 fn I2S1();
58 fn PDM0();
59 fn PDM1();
60 fn PDM2();
61 fn PDM3();
62 fn GPIO0_001F();
63 fn GPIO0_203F();
64 fn GPIO0_405F();
65 fn GPIO0_607F();
66 fn GPIO1_001F();
67 fn GPIO1_203F();
68 fn GPIO1_405F();
69 fn GPIO1_607F();
70 fn TIMER0();
71 fn TIMER1();
72 fn TIMER2();
73 fn TIMER3();
74 fn TIMER4();
75 fn TIMER5();
76 fn TIMER6();
77 fn TIMER7();
78 fn TIMER8();
79 fn TIMER9();
80 fn TIMER10();
81 fn TIMER11();
82 fn TIMER12();
83 fn TIMER13();
84 fn TIMER14();
85 fn TIMER15();
86 fn CACHE();
87 fn MAX();
88}
89#[doc(hidden)]
90#[repr(C)]
91pub union Vector {
92 _handler: unsafe extern "C" fn(),
93 _reserved: u32,
94}
95#[cfg(feature = "rt")]
96#[doc(hidden)]
97#[link_section = ".vector_table.interrupts"]
98#[no_mangle]
99pub static __INTERRUPTS: [Vector; 85] = [
100 Vector { _handler: BROWNOUT },
101 Vector { _handler: WDT },
102 Vector { _handler: RTC },
103 Vector { _handler: VCOMP },
104 Vector { _handler: IOSLAVE },
105 Vector {
106 _handler: IOSLAVEACC,
107 },
108 Vector { _handler: IOMSTR0 },
109 Vector { _handler: IOMSTR1 },
110 Vector { _handler: IOMSTR2 },
111 Vector { _handler: IOMSTR3 },
112 Vector { _handler: IOMSTR4 },
113 Vector { _handler: IOMSTR5 },
114 Vector { _handler: IOMSTR6 },
115 Vector { _handler: IOMSTR7 },
116 Vector { _handler: TIMER },
117 Vector { _handler: UART0 },
118 Vector { _handler: UART1 },
119 Vector { _handler: UART2 },
120 Vector { _handler: UART3 },
121 Vector { _handler: ADC },
122 Vector { _handler: MSPI0 },
123 Vector { _handler: MSPI1 },
124 Vector { _handler: MSPI2 },
125 Vector { _handler: CLKGEN },
126 Vector {
127 _handler: CRYPTOSEC,
128 },
129 Vector { _reserved: 0 },
130 Vector { _handler: SDIO },
131 Vector { _handler: USB0 },
132 Vector { _handler: GPU },
133 Vector { _handler: DC },
134 Vector { _handler: DSI },
135 Vector { _reserved: 0 },
136 Vector {
137 _handler: STIMER_CMPR0,
138 },
139 Vector {
140 _handler: STIMER_CMPR1,
141 },
142 Vector {
143 _handler: STIMER_CMPR2,
144 },
145 Vector {
146 _handler: STIMER_CMPR3,
147 },
148 Vector {
149 _handler: STIMER_CMPR4,
150 },
151 Vector {
152 _handler: STIMER_CMPR5,
153 },
154 Vector {
155 _handler: STIMER_CMPR6,
156 },
157 Vector {
158 _handler: STIMER_CMPR7,
159 },
160 Vector {
161 _handler: STIMER_OVF,
162 },
163 Vector { _reserved: 0 },
164 Vector { _handler: AUDADC0 },
165 Vector { _reserved: 0 },
166 Vector { _handler: I2S0 },
167 Vector { _handler: I2S1 },
168 Vector { _reserved: 0 },
169 Vector { _reserved: 0 },
170 Vector { _handler: PDM0 },
171 Vector { _handler: PDM1 },
172 Vector { _handler: PDM2 },
173 Vector { _handler: PDM3 },
174 Vector { _reserved: 0 },
175 Vector { _reserved: 0 },
176 Vector { _reserved: 0 },
177 Vector { _reserved: 0 },
178 Vector {
179 _handler: GPIO0_001F,
180 },
181 Vector {
182 _handler: GPIO0_203F,
183 },
184 Vector {
185 _handler: GPIO0_405F,
186 },
187 Vector {
188 _handler: GPIO0_607F,
189 },
190 Vector {
191 _handler: GPIO1_001F,
192 },
193 Vector {
194 _handler: GPIO1_203F,
195 },
196 Vector {
197 _handler: GPIO1_405F,
198 },
199 Vector {
200 _handler: GPIO1_607F,
201 },
202 Vector { _reserved: 0 },
203 Vector { _reserved: 0 },
204 Vector { _reserved: 0 },
205 Vector { _handler: TIMER0 },
206 Vector { _handler: TIMER1 },
207 Vector { _handler: TIMER2 },
208 Vector { _handler: TIMER3 },
209 Vector { _handler: TIMER4 },
210 Vector { _handler: TIMER5 },
211 Vector { _handler: TIMER6 },
212 Vector { _handler: TIMER7 },
213 Vector { _handler: TIMER8 },
214 Vector { _handler: TIMER9 },
215 Vector { _handler: TIMER10 },
216 Vector { _handler: TIMER11 },
217 Vector { _handler: TIMER12 },
218 Vector { _handler: TIMER13 },
219 Vector { _handler: TIMER14 },
220 Vector { _handler: TIMER15 },
221 Vector { _handler: CACHE },
222 Vector { _handler: MAX },
223];
224#[doc = r"Enumeration of all the interrupts."]
225#[derive(Copy, Clone, Debug, PartialEq, Eq)]
226#[repr(u16)]
227pub enum Interrupt {
228 #[doc = "0 - BROWNOUT_IRQ"]
229 BROWNOUT = 0,
230 #[doc = "1 - WDT_IRQ"]
231 WDT = 1,
232 #[doc = "2 - RTC_IRQ"]
233 RTC = 2,
234 #[doc = "3 - VCOMP_IRQ"]
235 VCOMP = 3,
236 #[doc = "4 - IOSLAVE_IRQ"]
237 IOSLAVE = 4,
238 #[doc = "5 - IOSLAVEACC_IRQ"]
239 IOSLAVEACC = 5,
240 #[doc = "6 - IOMSTR0_IRQ"]
241 IOMSTR0 = 6,
242 #[doc = "7 - IOMSTR1_IRQ"]
243 IOMSTR1 = 7,
244 #[doc = "8 - IOMSTR2_IRQ"]
245 IOMSTR2 = 8,
246 #[doc = "9 - IOMSTR3_IRQ"]
247 IOMSTR3 = 9,
248 #[doc = "10 - IOMSTR4_IRQ"]
249 IOMSTR4 = 10,
250 #[doc = "11 - IOMSTR5_IRQ"]
251 IOMSTR5 = 11,
252 #[doc = "12 - IOMSTR6_IRQ"]
253 IOMSTR6 = 12,
254 #[doc = "13 - IOMSTR7_IRQ"]
255 IOMSTR7 = 13,
256 #[doc = "14 - TIMER_IRQ"]
257 TIMER = 14,
258 #[doc = "15 - UART0_IRQ"]
259 UART0 = 15,
260 #[doc = "16 - UART1_IRQ"]
261 UART1 = 16,
262 #[doc = "17 - UART2_IRQ"]
263 UART2 = 17,
264 #[doc = "18 - UART3_IRQ"]
265 UART3 = 18,
266 #[doc = "19 - ADC_IRQ"]
267 ADC = 19,
268 #[doc = "20 - MSPI0_IRQ"]
269 MSPI0 = 20,
270 #[doc = "21 - MSPI1_IRQ"]
271 MSPI1 = 21,
272 #[doc = "22 - MSPI2_IRQ"]
273 MSPI2 = 22,
274 #[doc = "23 - CLKGEN_IRQ"]
275 CLKGEN = 23,
276 #[doc = "24 - CRYPTOSEC_IRQ"]
277 CRYPTOSEC = 24,
278 #[doc = "26 - SDIO_IRQ"]
279 SDIO = 26,
280 #[doc = "27 - USB0_IRQ"]
281 USB0 = 27,
282 #[doc = "28 - GPU_IRQ"]
283 GPU = 28,
284 #[doc = "29 - DC_IRQ"]
285 DC = 29,
286 #[doc = "30 - DSI_IRQ"]
287 DSI = 30,
288 #[doc = "32 - STIMER_CMPR0_IRQ"]
289 STIMER_CMPR0 = 32,
290 #[doc = "33 - STIMER_CMPR1_IRQ"]
291 STIMER_CMPR1 = 33,
292 #[doc = "34 - STIMER_CMPR2_IRQ"]
293 STIMER_CMPR2 = 34,
294 #[doc = "35 - STIMER_CMPR3_IRQ"]
295 STIMER_CMPR3 = 35,
296 #[doc = "36 - STIMER_CMPR4_IRQ"]
297 STIMER_CMPR4 = 36,
298 #[doc = "37 - STIMER_CMPR5_IRQ"]
299 STIMER_CMPR5 = 37,
300 #[doc = "38 - STIMER_CMPR6_IRQ"]
301 STIMER_CMPR6 = 38,
302 #[doc = "39 - STIMER_CMPR7_IRQ"]
303 STIMER_CMPR7 = 39,
304 #[doc = "40 - STIMER_OVF_IRQ"]
305 STIMER_OVF = 40,
306 #[doc = "42 - AUDADC0_IRQ"]
307 AUDADC0 = 42,
308 #[doc = "44 - I2S0_IRQ"]
309 I2S0 = 44,
310 #[doc = "45 - I2S1_IRQ"]
311 I2S1 = 45,
312 #[doc = "48 - PDM0_IRQ"]
313 PDM0 = 48,
314 #[doc = "49 - PDM1_IRQ"]
315 PDM1 = 49,
316 #[doc = "50 - PDM2_IRQ"]
317 PDM2 = 50,
318 #[doc = "51 - PDM3_IRQ"]
319 PDM3 = 51,
320 #[doc = "56 - GPIO0_001F_IRQ"]
321 GPIO0_001F = 56,
322 #[doc = "57 - GPIO0_203F_IRQ"]
323 GPIO0_203F = 57,
324 #[doc = "58 - GPIO0_405F_IRQ"]
325 GPIO0_405F = 58,
326 #[doc = "59 - GPIO0_607F_IRQ"]
327 GPIO0_607F = 59,
328 #[doc = "60 - GPIO1_001F_IRQ"]
329 GPIO1_001F = 60,
330 #[doc = "61 - GPIO1_203F_IRQ"]
331 GPIO1_203F = 61,
332 #[doc = "62 - GPIO1_405F_IRQ"]
333 GPIO1_405F = 62,
334 #[doc = "63 - GPIO1_607F_IRQ"]
335 GPIO1_607F = 63,
336 #[doc = "67 - TIMER0_IRQ"]
337 TIMER0 = 67,
338 #[doc = "68 - TIMER1_IRQ"]
339 TIMER1 = 68,
340 #[doc = "69 - TIMER2_IRQ"]
341 TIMER2 = 69,
342 #[doc = "70 - TIMER3_IRQ"]
343 TIMER3 = 70,
344 #[doc = "71 - TIMER4_IRQ"]
345 TIMER4 = 71,
346 #[doc = "72 - TIMER5_IRQ"]
347 TIMER5 = 72,
348 #[doc = "73 - TIMER6_IRQ"]
349 TIMER6 = 73,
350 #[doc = "74 - TIMER7_IRQ"]
351 TIMER7 = 74,
352 #[doc = "75 - TIMER8_IRQ"]
353 TIMER8 = 75,
354 #[doc = "76 - TIMER9_IRQ"]
355 TIMER9 = 76,
356 #[doc = "77 - TIMER10_IRQ"]
357 TIMER10 = 77,
358 #[doc = "78 - TIMER11_IRQ"]
359 TIMER11 = 78,
360 #[doc = "79 - TIMER12_IRQ"]
361 TIMER12 = 79,
362 #[doc = "80 - TIMER13_IRQ"]
363 TIMER13 = 80,
364 #[doc = "81 - TIMER14_IRQ"]
365 TIMER14 = 81,
366 #[doc = "82 - TIMER15_IRQ"]
367 TIMER15 = 82,
368 #[doc = "83 - CACHE_IRQ"]
369 CACHE = 83,
370 #[doc = "84 - Not a valid IRQ. The maximum IRQ is this value - 1."]
371 MAX = 84,
372}
373unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
374 #[inline(always)]
375 fn number(self) -> u16 {
376 self as u16
377 }
378}
379#[doc = "Analog Digital Converter Control"]
380pub struct Adc {
381 _marker: PhantomData<*const ()>,
382}
383unsafe impl Send for Adc {}
384impl Adc {
385 #[doc = r"Pointer to the register block"]
386 pub const PTR: *const adc::RegisterBlock = 0x4003_8000 as *const _;
387 #[doc = r"Return the pointer to the register block"]
388 #[inline(always)]
389 pub const fn ptr() -> *const adc::RegisterBlock {
390 Self::PTR
391 }
392 #[doc = r" Steal an instance of this peripheral"]
393 #[doc = r""]
394 #[doc = r" # Safety"]
395 #[doc = r""]
396 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
397 #[doc = r" that may race with any existing instances, for example by only"]
398 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
399 #[doc = r" original peripheral and using critical sections to coordinate"]
400 #[doc = r" access between multiple new instances."]
401 #[doc = r""]
402 #[doc = r" Additionally, other software such as HALs may rely on only one"]
403 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
404 #[doc = r" no stolen instances are passed to such software."]
405 pub unsafe fn steal() -> Self {
406 Self {
407 _marker: PhantomData,
408 }
409 }
410}
411impl Deref for Adc {
412 type Target = adc::RegisterBlock;
413 #[inline(always)]
414 fn deref(&self) -> &Self::Target {
415 unsafe { &*Self::PTR }
416 }
417}
418impl core::fmt::Debug for Adc {
419 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
420 f.debug_struct("Adc").finish()
421 }
422}
423#[doc = "Analog Digital Converter Control"]
424pub mod adc;
425#[doc = "APB DMA Register Interfaces"]
426pub struct Apbdma {
427 _marker: PhantomData<*const ()>,
428}
429unsafe impl Send for Apbdma {}
430impl Apbdma {
431 #[doc = r"Pointer to the register block"]
432 pub const PTR: *const apbdma::RegisterBlock = 0x4001_1000 as *const _;
433 #[doc = r"Return the pointer to the register block"]
434 #[inline(always)]
435 pub const fn ptr() -> *const apbdma::RegisterBlock {
436 Self::PTR
437 }
438 #[doc = r" Steal an instance of this peripheral"]
439 #[doc = r""]
440 #[doc = r" # Safety"]
441 #[doc = r""]
442 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
443 #[doc = r" that may race with any existing instances, for example by only"]
444 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
445 #[doc = r" original peripheral and using critical sections to coordinate"]
446 #[doc = r" access between multiple new instances."]
447 #[doc = r""]
448 #[doc = r" Additionally, other software such as HALs may rely on only one"]
449 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
450 #[doc = r" no stolen instances are passed to such software."]
451 pub unsafe fn steal() -> Self {
452 Self {
453 _marker: PhantomData,
454 }
455 }
456}
457impl Deref for Apbdma {
458 type Target = apbdma::RegisterBlock;
459 #[inline(always)]
460 fn deref(&self) -> &Self::Target {
461 unsafe { &*Self::PTR }
462 }
463}
464impl core::fmt::Debug for Apbdma {
465 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
466 f.debug_struct("Apbdma").finish()
467 }
468}
469#[doc = "APB DMA Register Interfaces"]
470pub mod apbdma;
471#[doc = "Audio Analog Digital Converter Control"]
472pub struct Audadc {
473 _marker: PhantomData<*const ()>,
474}
475unsafe impl Send for Audadc {}
476impl Audadc {
477 #[doc = r"Pointer to the register block"]
478 pub const PTR: *const audadc::RegisterBlock = 0x4021_0000 as *const _;
479 #[doc = r"Return the pointer to the register block"]
480 #[inline(always)]
481 pub const fn ptr() -> *const audadc::RegisterBlock {
482 Self::PTR
483 }
484 #[doc = r" Steal an instance of this peripheral"]
485 #[doc = r""]
486 #[doc = r" # Safety"]
487 #[doc = r""]
488 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
489 #[doc = r" that may race with any existing instances, for example by only"]
490 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
491 #[doc = r" original peripheral and using critical sections to coordinate"]
492 #[doc = r" access between multiple new instances."]
493 #[doc = r""]
494 #[doc = r" Additionally, other software such as HALs may rely on only one"]
495 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
496 #[doc = r" no stolen instances are passed to such software."]
497 pub unsafe fn steal() -> Self {
498 Self {
499 _marker: PhantomData,
500 }
501 }
502}
503impl Deref for Audadc {
504 type Target = audadc::RegisterBlock;
505 #[inline(always)]
506 fn deref(&self) -> &Self::Target {
507 unsafe { &*Self::PTR }
508 }
509}
510impl core::fmt::Debug for Audadc {
511 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
512 f.debug_struct("Audadc").finish()
513 }
514}
515#[doc = "Audio Analog Digital Converter Control"]
516pub mod audadc;
517#[doc = "Clock Generator"]
518pub struct Clkgen {
519 _marker: PhantomData<*const ()>,
520}
521unsafe impl Send for Clkgen {}
522impl Clkgen {
523 #[doc = r"Pointer to the register block"]
524 pub const PTR: *const clkgen::RegisterBlock = 0x4000_4000 as *const _;
525 #[doc = r"Return the pointer to the register block"]
526 #[inline(always)]
527 pub const fn ptr() -> *const clkgen::RegisterBlock {
528 Self::PTR
529 }
530 #[doc = r" Steal an instance of this peripheral"]
531 #[doc = r""]
532 #[doc = r" # Safety"]
533 #[doc = r""]
534 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
535 #[doc = r" that may race with any existing instances, for example by only"]
536 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
537 #[doc = r" original peripheral and using critical sections to coordinate"]
538 #[doc = r" access between multiple new instances."]
539 #[doc = r""]
540 #[doc = r" Additionally, other software such as HALs may rely on only one"]
541 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
542 #[doc = r" no stolen instances are passed to such software."]
543 pub unsafe fn steal() -> Self {
544 Self {
545 _marker: PhantomData,
546 }
547 }
548}
549impl Deref for Clkgen {
550 type Target = clkgen::RegisterBlock;
551 #[inline(always)]
552 fn deref(&self) -> &Self::Target {
553 unsafe { &*Self::PTR }
554 }
555}
556impl core::fmt::Debug for Clkgen {
557 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
558 f.debug_struct("Clkgen").finish()
559 }
560}
561#[doc = "Clock Generator"]
562pub mod clkgen;
563#[doc = "CM4 Complex Registers (Cache, TCM, DAXI)"]
564pub struct Cpu {
565 _marker: PhantomData<*const ()>,
566}
567unsafe impl Send for Cpu {}
568impl Cpu {
569 #[doc = r"Pointer to the register block"]
570 pub const PTR: *const cpu::RegisterBlock = 0x4800_0000 as *const _;
571 #[doc = r"Return the pointer to the register block"]
572 #[inline(always)]
573 pub const fn ptr() -> *const cpu::RegisterBlock {
574 Self::PTR
575 }
576 #[doc = r" Steal an instance of this peripheral"]
577 #[doc = r""]
578 #[doc = r" # Safety"]
579 #[doc = r""]
580 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
581 #[doc = r" that may race with any existing instances, for example by only"]
582 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
583 #[doc = r" original peripheral and using critical sections to coordinate"]
584 #[doc = r" access between multiple new instances."]
585 #[doc = r""]
586 #[doc = r" Additionally, other software such as HALs may rely on only one"]
587 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
588 #[doc = r" no stolen instances are passed to such software."]
589 pub unsafe fn steal() -> Self {
590 Self {
591 _marker: PhantomData,
592 }
593 }
594}
595impl Deref for Cpu {
596 type Target = cpu::RegisterBlock;
597 #[inline(always)]
598 fn deref(&self) -> &Self::Target {
599 unsafe { &*Self::PTR }
600 }
601}
602impl core::fmt::Debug for Cpu {
603 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
604 f.debug_struct("Cpu").finish()
605 }
606}
607#[doc = "CM4 Complex Registers (Cache, TCM, DAXI)"]
608pub mod cpu;
609#[doc = "Embedded security and cryptographic services"]
610pub struct Crypto {
611 _marker: PhantomData<*const ()>,
612}
613unsafe impl Send for Crypto {}
614impl Crypto {
615 #[doc = r"Pointer to the register block"]
616 pub const PTR: *const crypto::RegisterBlock = 0x400c_0000 as *const _;
617 #[doc = r"Return the pointer to the register block"]
618 #[inline(always)]
619 pub const fn ptr() -> *const crypto::RegisterBlock {
620 Self::PTR
621 }
622 #[doc = r" Steal an instance of this peripheral"]
623 #[doc = r""]
624 #[doc = r" # Safety"]
625 #[doc = r""]
626 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
627 #[doc = r" that may race with any existing instances, for example by only"]
628 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
629 #[doc = r" original peripheral and using critical sections to coordinate"]
630 #[doc = r" access between multiple new instances."]
631 #[doc = r""]
632 #[doc = r" Additionally, other software such as HALs may rely on only one"]
633 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
634 #[doc = r" no stolen instances are passed to such software."]
635 pub unsafe fn steal() -> Self {
636 Self {
637 _marker: PhantomData,
638 }
639 }
640}
641impl Deref for Crypto {
642 type Target = crypto::RegisterBlock;
643 #[inline(always)]
644 fn deref(&self) -> &Self::Target {
645 unsafe { &*Self::PTR }
646 }
647}
648impl core::fmt::Debug for Crypto {
649 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
650 f.debug_struct("Crypto").finish()
651 }
652}
653#[doc = "Embedded security and cryptographic services"]
654pub mod crypto;
655#[doc = "Display Controller"]
656pub struct Dc {
657 _marker: PhantomData<*const ()>,
658}
659unsafe impl Send for Dc {}
660impl Dc {
661 #[doc = r"Pointer to the register block"]
662 pub const PTR: *const dc::RegisterBlock = 0x400a_0000 as *const _;
663 #[doc = r"Return the pointer to the register block"]
664 #[inline(always)]
665 pub const fn ptr() -> *const dc::RegisterBlock {
666 Self::PTR
667 }
668 #[doc = r" Steal an instance of this peripheral"]
669 #[doc = r""]
670 #[doc = r" # Safety"]
671 #[doc = r""]
672 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
673 #[doc = r" that may race with any existing instances, for example by only"]
674 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
675 #[doc = r" original peripheral and using critical sections to coordinate"]
676 #[doc = r" access between multiple new instances."]
677 #[doc = r""]
678 #[doc = r" Additionally, other software such as HALs may rely on only one"]
679 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
680 #[doc = r" no stolen instances are passed to such software."]
681 pub unsafe fn steal() -> Self {
682 Self {
683 _marker: PhantomData,
684 }
685 }
686}
687impl Deref for Dc {
688 type Target = dc::RegisterBlock;
689 #[inline(always)]
690 fn deref(&self) -> &Self::Target {
691 unsafe { &*Self::PTR }
692 }
693}
694impl core::fmt::Debug for Dc {
695 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
696 f.debug_struct("Dc").finish()
697 }
698}
699#[doc = "Display Controller"]
700pub mod dc;
701#[doc = "Digital Serial Interface Unit"]
702pub struct Dsi {
703 _marker: PhantomData<*const ()>,
704}
705unsafe impl Send for Dsi {}
706impl Dsi {
707 #[doc = r"Pointer to the register block"]
708 pub const PTR: *const dsi::RegisterBlock = 0x400a_8000 as *const _;
709 #[doc = r"Return the pointer to the register block"]
710 #[inline(always)]
711 pub const fn ptr() -> *const dsi::RegisterBlock {
712 Self::PTR
713 }
714 #[doc = r" Steal an instance of this peripheral"]
715 #[doc = r""]
716 #[doc = r" # Safety"]
717 #[doc = r""]
718 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
719 #[doc = r" that may race with any existing instances, for example by only"]
720 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
721 #[doc = r" original peripheral and using critical sections to coordinate"]
722 #[doc = r" access between multiple new instances."]
723 #[doc = r""]
724 #[doc = r" Additionally, other software such as HALs may rely on only one"]
725 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
726 #[doc = r" no stolen instances are passed to such software."]
727 pub unsafe fn steal() -> Self {
728 Self {
729 _marker: PhantomData,
730 }
731 }
732}
733impl Deref for Dsi {
734 type Target = dsi::RegisterBlock;
735 #[inline(always)]
736 fn deref(&self) -> &Self::Target {
737 unsafe { &*Self::PTR }
738 }
739}
740impl core::fmt::Debug for Dsi {
741 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
742 f.debug_struct("Dsi").finish()
743 }
744}
745#[doc = "Digital Serial Interface Unit"]
746pub mod dsi;
747#[doc = "DSP Control Interface"]
748pub struct Dsp {
749 _marker: PhantomData<*const ()>,
750}
751unsafe impl Send for Dsp {}
752impl Dsp {
753 #[doc = r"Pointer to the register block"]
754 pub const PTR: *const dsp::RegisterBlock = 0x4010_0000 as *const _;
755 #[doc = r"Return the pointer to the register block"]
756 #[inline(always)]
757 pub const fn ptr() -> *const dsp::RegisterBlock {
758 Self::PTR
759 }
760 #[doc = r" Steal an instance of this peripheral"]
761 #[doc = r""]
762 #[doc = r" # Safety"]
763 #[doc = r""]
764 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
765 #[doc = r" that may race with any existing instances, for example by only"]
766 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
767 #[doc = r" original peripheral and using critical sections to coordinate"]
768 #[doc = r" access between multiple new instances."]
769 #[doc = r""]
770 #[doc = r" Additionally, other software such as HALs may rely on only one"]
771 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
772 #[doc = r" no stolen instances are passed to such software."]
773 pub unsafe fn steal() -> Self {
774 Self {
775 _marker: PhantomData,
776 }
777 }
778}
779impl Deref for Dsp {
780 type Target = dsp::RegisterBlock;
781 #[inline(always)]
782 fn deref(&self) -> &Self::Target {
783 unsafe { &*Self::PTR }
784 }
785}
786impl core::fmt::Debug for Dsp {
787 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
788 f.debug_struct("Dsp").finish()
789 }
790}
791#[doc = "DSP Control Interface"]
792pub mod dsp;
793#[doc = "Fast PIO access"]
794pub struct Fpio {
795 _marker: PhantomData<*const ()>,
796}
797unsafe impl Send for Fpio {}
798impl Fpio {
799 #[doc = r"Pointer to the register block"]
800 pub const PTR: *const fpio::RegisterBlock = 0x4800_1000 as *const _;
801 #[doc = r"Return the pointer to the register block"]
802 #[inline(always)]
803 pub const fn ptr() -> *const fpio::RegisterBlock {
804 Self::PTR
805 }
806 #[doc = r" Steal an instance of this peripheral"]
807 #[doc = r""]
808 #[doc = r" # Safety"]
809 #[doc = r""]
810 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
811 #[doc = r" that may race with any existing instances, for example by only"]
812 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
813 #[doc = r" original peripheral and using critical sections to coordinate"]
814 #[doc = r" access between multiple new instances."]
815 #[doc = r""]
816 #[doc = r" Additionally, other software such as HALs may rely on only one"]
817 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
818 #[doc = r" no stolen instances are passed to such software."]
819 pub unsafe fn steal() -> Self {
820 Self {
821 _marker: PhantomData,
822 }
823 }
824}
825impl Deref for Fpio {
826 type Target = fpio::RegisterBlock;
827 #[inline(always)]
828 fn deref(&self) -> &Self::Target {
829 unsafe { &*Self::PTR }
830 }
831}
832impl core::fmt::Debug for Fpio {
833 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
834 f.debug_struct("Fpio").finish()
835 }
836}
837#[doc = "Fast PIO access"]
838pub mod fpio;
839#[doc = "General Purpose IO"]
840pub struct Gpio {
841 _marker: PhantomData<*const ()>,
842}
843unsafe impl Send for Gpio {}
844impl Gpio {
845 #[doc = r"Pointer to the register block"]
846 pub const PTR: *const gpio::RegisterBlock = 0x4001_0000 as *const _;
847 #[doc = r"Return the pointer to the register block"]
848 #[inline(always)]
849 pub const fn ptr() -> *const gpio::RegisterBlock {
850 Self::PTR
851 }
852 #[doc = r" Steal an instance of this peripheral"]
853 #[doc = r""]
854 #[doc = r" # Safety"]
855 #[doc = r""]
856 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
857 #[doc = r" that may race with any existing instances, for example by only"]
858 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
859 #[doc = r" original peripheral and using critical sections to coordinate"]
860 #[doc = r" access between multiple new instances."]
861 #[doc = r""]
862 #[doc = r" Additionally, other software such as HALs may rely on only one"]
863 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
864 #[doc = r" no stolen instances are passed to such software."]
865 pub unsafe fn steal() -> Self {
866 Self {
867 _marker: PhantomData,
868 }
869 }
870}
871impl Deref for Gpio {
872 type Target = gpio::RegisterBlock;
873 #[inline(always)]
874 fn deref(&self) -> &Self::Target {
875 unsafe { &*Self::PTR }
876 }
877}
878impl core::fmt::Debug for Gpio {
879 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
880 f.debug_struct("Gpio").finish()
881 }
882}
883#[doc = "General Purpose IO"]
884pub mod gpio;
885#[doc = "Graphics Processing Unit"]
886pub struct Gpu {
887 _marker: PhantomData<*const ()>,
888}
889unsafe impl Send for Gpu {}
890impl Gpu {
891 #[doc = r"Pointer to the register block"]
892 pub const PTR: *const gpu::RegisterBlock = 0x4009_0000 as *const _;
893 #[doc = r"Return the pointer to the register block"]
894 #[inline(always)]
895 pub const fn ptr() -> *const gpu::RegisterBlock {
896 Self::PTR
897 }
898 #[doc = r" Steal an instance of this peripheral"]
899 #[doc = r""]
900 #[doc = r" # Safety"]
901 #[doc = r""]
902 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
903 #[doc = r" that may race with any existing instances, for example by only"]
904 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
905 #[doc = r" original peripheral and using critical sections to coordinate"]
906 #[doc = r" access between multiple new instances."]
907 #[doc = r""]
908 #[doc = r" Additionally, other software such as HALs may rely on only one"]
909 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
910 #[doc = r" no stolen instances are passed to such software."]
911 pub unsafe fn steal() -> Self {
912 Self {
913 _marker: PhantomData,
914 }
915 }
916}
917impl Deref for Gpu {
918 type Target = gpu::RegisterBlock;
919 #[inline(always)]
920 fn deref(&self) -> &Self::Target {
921 unsafe { &*Self::PTR }
922 }
923}
924impl core::fmt::Debug for Gpu {
925 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
926 f.debug_struct("Gpu").finish()
927 }
928}
929#[doc = "Graphics Processing Unit"]
930pub mod gpu;
931#[doc = "I2S ASRC Master/Slave Module"]
932pub struct I2s0 {
933 _marker: PhantomData<*const ()>,
934}
935unsafe impl Send for I2s0 {}
936impl I2s0 {
937 #[doc = r"Pointer to the register block"]
938 pub const PTR: *const i2s0::RegisterBlock = 0x4020_8000 as *const _;
939 #[doc = r"Return the pointer to the register block"]
940 #[inline(always)]
941 pub const fn ptr() -> *const i2s0::RegisterBlock {
942 Self::PTR
943 }
944 #[doc = r" Steal an instance of this peripheral"]
945 #[doc = r""]
946 #[doc = r" # Safety"]
947 #[doc = r""]
948 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
949 #[doc = r" that may race with any existing instances, for example by only"]
950 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
951 #[doc = r" original peripheral and using critical sections to coordinate"]
952 #[doc = r" access between multiple new instances."]
953 #[doc = r""]
954 #[doc = r" Additionally, other software such as HALs may rely on only one"]
955 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
956 #[doc = r" no stolen instances are passed to such software."]
957 pub unsafe fn steal() -> Self {
958 Self {
959 _marker: PhantomData,
960 }
961 }
962}
963impl Deref for I2s0 {
964 type Target = i2s0::RegisterBlock;
965 #[inline(always)]
966 fn deref(&self) -> &Self::Target {
967 unsafe { &*Self::PTR }
968 }
969}
970impl core::fmt::Debug for I2s0 {
971 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
972 f.debug_struct("I2s0").finish()
973 }
974}
975#[doc = "I2S ASRC Master/Slave Module"]
976pub mod i2s0;
977#[doc = "I2S ASRC Master/Slave Module"]
978pub struct I2s1 {
979 _marker: PhantomData<*const ()>,
980}
981unsafe impl Send for I2s1 {}
982impl I2s1 {
983 #[doc = r"Pointer to the register block"]
984 pub const PTR: *const i2s0::RegisterBlock = 0x4020_9000 as *const _;
985 #[doc = r"Return the pointer to the register block"]
986 #[inline(always)]
987 pub const fn ptr() -> *const i2s0::RegisterBlock {
988 Self::PTR
989 }
990 #[doc = r" Steal an instance of this peripheral"]
991 #[doc = r""]
992 #[doc = r" # Safety"]
993 #[doc = r""]
994 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
995 #[doc = r" that may race with any existing instances, for example by only"]
996 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
997 #[doc = r" original peripheral and using critical sections to coordinate"]
998 #[doc = r" access between multiple new instances."]
999 #[doc = r""]
1000 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1001 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1002 #[doc = r" no stolen instances are passed to such software."]
1003 pub unsafe fn steal() -> Self {
1004 Self {
1005 _marker: PhantomData,
1006 }
1007 }
1008}
1009impl Deref for I2s1 {
1010 type Target = i2s0::RegisterBlock;
1011 #[inline(always)]
1012 fn deref(&self) -> &Self::Target {
1013 unsafe { &*Self::PTR }
1014 }
1015}
1016impl core::fmt::Debug for I2s1 {
1017 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1018 f.debug_struct("I2s1").finish()
1019 }
1020}
1021#[doc = "I2S ASRC Master/Slave Module"]
1022pub use self::i2s0 as i2s1;
1023#[doc = "IO Peripheral Master"]
1024pub struct Iom0 {
1025 _marker: PhantomData<*const ()>,
1026}
1027unsafe impl Send for Iom0 {}
1028impl Iom0 {
1029 #[doc = r"Pointer to the register block"]
1030 pub const PTR: *const iom0::RegisterBlock = 0x4005_0000 as *const _;
1031 #[doc = r"Return the pointer to the register block"]
1032 #[inline(always)]
1033 pub const fn ptr() -> *const iom0::RegisterBlock {
1034 Self::PTR
1035 }
1036 #[doc = r" Steal an instance of this peripheral"]
1037 #[doc = r""]
1038 #[doc = r" # Safety"]
1039 #[doc = r""]
1040 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1041 #[doc = r" that may race with any existing instances, for example by only"]
1042 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1043 #[doc = r" original peripheral and using critical sections to coordinate"]
1044 #[doc = r" access between multiple new instances."]
1045 #[doc = r""]
1046 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1047 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1048 #[doc = r" no stolen instances are passed to such software."]
1049 pub unsafe fn steal() -> Self {
1050 Self {
1051 _marker: PhantomData,
1052 }
1053 }
1054}
1055impl Deref for Iom0 {
1056 type Target = iom0::RegisterBlock;
1057 #[inline(always)]
1058 fn deref(&self) -> &Self::Target {
1059 unsafe { &*Self::PTR }
1060 }
1061}
1062impl core::fmt::Debug for Iom0 {
1063 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1064 f.debug_struct("Iom0").finish()
1065 }
1066}
1067#[doc = "IO Peripheral Master"]
1068pub mod iom0;
1069#[doc = "IO Peripheral Master"]
1070pub struct Iom1 {
1071 _marker: PhantomData<*const ()>,
1072}
1073unsafe impl Send for Iom1 {}
1074impl Iom1 {
1075 #[doc = r"Pointer to the register block"]
1076 pub const PTR: *const iom0::RegisterBlock = 0x4005_1000 as *const _;
1077 #[doc = r"Return the pointer to the register block"]
1078 #[inline(always)]
1079 pub const fn ptr() -> *const iom0::RegisterBlock {
1080 Self::PTR
1081 }
1082 #[doc = r" Steal an instance of this peripheral"]
1083 #[doc = r""]
1084 #[doc = r" # Safety"]
1085 #[doc = r""]
1086 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1087 #[doc = r" that may race with any existing instances, for example by only"]
1088 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1089 #[doc = r" original peripheral and using critical sections to coordinate"]
1090 #[doc = r" access between multiple new instances."]
1091 #[doc = r""]
1092 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1093 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1094 #[doc = r" no stolen instances are passed to such software."]
1095 pub unsafe fn steal() -> Self {
1096 Self {
1097 _marker: PhantomData,
1098 }
1099 }
1100}
1101impl Deref for Iom1 {
1102 type Target = iom0::RegisterBlock;
1103 #[inline(always)]
1104 fn deref(&self) -> &Self::Target {
1105 unsafe { &*Self::PTR }
1106 }
1107}
1108impl core::fmt::Debug for Iom1 {
1109 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1110 f.debug_struct("Iom1").finish()
1111 }
1112}
1113#[doc = "IO Peripheral Master"]
1114pub use self::iom0 as iom1;
1115#[doc = "IO Peripheral Master"]
1116pub struct Iom2 {
1117 _marker: PhantomData<*const ()>,
1118}
1119unsafe impl Send for Iom2 {}
1120impl Iom2 {
1121 #[doc = r"Pointer to the register block"]
1122 pub const PTR: *const iom0::RegisterBlock = 0x4005_2000 as *const _;
1123 #[doc = r"Return the pointer to the register block"]
1124 #[inline(always)]
1125 pub const fn ptr() -> *const iom0::RegisterBlock {
1126 Self::PTR
1127 }
1128 #[doc = r" Steal an instance of this peripheral"]
1129 #[doc = r""]
1130 #[doc = r" # Safety"]
1131 #[doc = r""]
1132 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1133 #[doc = r" that may race with any existing instances, for example by only"]
1134 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1135 #[doc = r" original peripheral and using critical sections to coordinate"]
1136 #[doc = r" access between multiple new instances."]
1137 #[doc = r""]
1138 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1139 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1140 #[doc = r" no stolen instances are passed to such software."]
1141 pub unsafe fn steal() -> Self {
1142 Self {
1143 _marker: PhantomData,
1144 }
1145 }
1146}
1147impl Deref for Iom2 {
1148 type Target = iom0::RegisterBlock;
1149 #[inline(always)]
1150 fn deref(&self) -> &Self::Target {
1151 unsafe { &*Self::PTR }
1152 }
1153}
1154impl core::fmt::Debug for Iom2 {
1155 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1156 f.debug_struct("Iom2").finish()
1157 }
1158}
1159#[doc = "IO Peripheral Master"]
1160pub use self::iom0 as iom2;
1161#[doc = "IO Peripheral Master"]
1162pub struct Iom3 {
1163 _marker: PhantomData<*const ()>,
1164}
1165unsafe impl Send for Iom3 {}
1166impl Iom3 {
1167 #[doc = r"Pointer to the register block"]
1168 pub const PTR: *const iom0::RegisterBlock = 0x4005_3000 as *const _;
1169 #[doc = r"Return the pointer to the register block"]
1170 #[inline(always)]
1171 pub const fn ptr() -> *const iom0::RegisterBlock {
1172 Self::PTR
1173 }
1174 #[doc = r" Steal an instance of this peripheral"]
1175 #[doc = r""]
1176 #[doc = r" # Safety"]
1177 #[doc = r""]
1178 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1179 #[doc = r" that may race with any existing instances, for example by only"]
1180 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1181 #[doc = r" original peripheral and using critical sections to coordinate"]
1182 #[doc = r" access between multiple new instances."]
1183 #[doc = r""]
1184 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1185 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1186 #[doc = r" no stolen instances are passed to such software."]
1187 pub unsafe fn steal() -> Self {
1188 Self {
1189 _marker: PhantomData,
1190 }
1191 }
1192}
1193impl Deref for Iom3 {
1194 type Target = iom0::RegisterBlock;
1195 #[inline(always)]
1196 fn deref(&self) -> &Self::Target {
1197 unsafe { &*Self::PTR }
1198 }
1199}
1200impl core::fmt::Debug for Iom3 {
1201 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1202 f.debug_struct("Iom3").finish()
1203 }
1204}
1205#[doc = "IO Peripheral Master"]
1206pub use self::iom0 as iom3;
1207#[doc = "IO Peripheral Master"]
1208pub struct Iom4 {
1209 _marker: PhantomData<*const ()>,
1210}
1211unsafe impl Send for Iom4 {}
1212impl Iom4 {
1213 #[doc = r"Pointer to the register block"]
1214 pub const PTR: *const iom0::RegisterBlock = 0x4005_4000 as *const _;
1215 #[doc = r"Return the pointer to the register block"]
1216 #[inline(always)]
1217 pub const fn ptr() -> *const iom0::RegisterBlock {
1218 Self::PTR
1219 }
1220 #[doc = r" Steal an instance of this peripheral"]
1221 #[doc = r""]
1222 #[doc = r" # Safety"]
1223 #[doc = r""]
1224 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1225 #[doc = r" that may race with any existing instances, for example by only"]
1226 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1227 #[doc = r" original peripheral and using critical sections to coordinate"]
1228 #[doc = r" access between multiple new instances."]
1229 #[doc = r""]
1230 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1231 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1232 #[doc = r" no stolen instances are passed to such software."]
1233 pub unsafe fn steal() -> Self {
1234 Self {
1235 _marker: PhantomData,
1236 }
1237 }
1238}
1239impl Deref for Iom4 {
1240 type Target = iom0::RegisterBlock;
1241 #[inline(always)]
1242 fn deref(&self) -> &Self::Target {
1243 unsafe { &*Self::PTR }
1244 }
1245}
1246impl core::fmt::Debug for Iom4 {
1247 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1248 f.debug_struct("Iom4").finish()
1249 }
1250}
1251#[doc = "IO Peripheral Master"]
1252pub use self::iom0 as iom4;
1253#[doc = "IO Peripheral Master"]
1254pub struct Iom5 {
1255 _marker: PhantomData<*const ()>,
1256}
1257unsafe impl Send for Iom5 {}
1258impl Iom5 {
1259 #[doc = r"Pointer to the register block"]
1260 pub const PTR: *const iom0::RegisterBlock = 0x4005_5000 as *const _;
1261 #[doc = r"Return the pointer to the register block"]
1262 #[inline(always)]
1263 pub const fn ptr() -> *const iom0::RegisterBlock {
1264 Self::PTR
1265 }
1266 #[doc = r" Steal an instance of this peripheral"]
1267 #[doc = r""]
1268 #[doc = r" # Safety"]
1269 #[doc = r""]
1270 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1271 #[doc = r" that may race with any existing instances, for example by only"]
1272 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1273 #[doc = r" original peripheral and using critical sections to coordinate"]
1274 #[doc = r" access between multiple new instances."]
1275 #[doc = r""]
1276 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1277 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1278 #[doc = r" no stolen instances are passed to such software."]
1279 pub unsafe fn steal() -> Self {
1280 Self {
1281 _marker: PhantomData,
1282 }
1283 }
1284}
1285impl Deref for Iom5 {
1286 type Target = iom0::RegisterBlock;
1287 #[inline(always)]
1288 fn deref(&self) -> &Self::Target {
1289 unsafe { &*Self::PTR }
1290 }
1291}
1292impl core::fmt::Debug for Iom5 {
1293 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1294 f.debug_struct("Iom5").finish()
1295 }
1296}
1297#[doc = "IO Peripheral Master"]
1298pub use self::iom0 as iom5;
1299#[doc = "IO Peripheral Master"]
1300pub struct Iom6 {
1301 _marker: PhantomData<*const ()>,
1302}
1303unsafe impl Send for Iom6 {}
1304impl Iom6 {
1305 #[doc = r"Pointer to the register block"]
1306 pub const PTR: *const iom0::RegisterBlock = 0x4005_6000 as *const _;
1307 #[doc = r"Return the pointer to the register block"]
1308 #[inline(always)]
1309 pub const fn ptr() -> *const iom0::RegisterBlock {
1310 Self::PTR
1311 }
1312 #[doc = r" Steal an instance of this peripheral"]
1313 #[doc = r""]
1314 #[doc = r" # Safety"]
1315 #[doc = r""]
1316 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1317 #[doc = r" that may race with any existing instances, for example by only"]
1318 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1319 #[doc = r" original peripheral and using critical sections to coordinate"]
1320 #[doc = r" access between multiple new instances."]
1321 #[doc = r""]
1322 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1323 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1324 #[doc = r" no stolen instances are passed to such software."]
1325 pub unsafe fn steal() -> Self {
1326 Self {
1327 _marker: PhantomData,
1328 }
1329 }
1330}
1331impl Deref for Iom6 {
1332 type Target = iom0::RegisterBlock;
1333 #[inline(always)]
1334 fn deref(&self) -> &Self::Target {
1335 unsafe { &*Self::PTR }
1336 }
1337}
1338impl core::fmt::Debug for Iom6 {
1339 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1340 f.debug_struct("Iom6").finish()
1341 }
1342}
1343#[doc = "IO Peripheral Master"]
1344pub use self::iom0 as iom6;
1345#[doc = "IO Peripheral Master"]
1346pub struct Iom7 {
1347 _marker: PhantomData<*const ()>,
1348}
1349unsafe impl Send for Iom7 {}
1350impl Iom7 {
1351 #[doc = r"Pointer to the register block"]
1352 pub const PTR: *const iom0::RegisterBlock = 0x4005_7000 as *const _;
1353 #[doc = r"Return the pointer to the register block"]
1354 #[inline(always)]
1355 pub const fn ptr() -> *const iom0::RegisterBlock {
1356 Self::PTR
1357 }
1358 #[doc = r" Steal an instance of this peripheral"]
1359 #[doc = r""]
1360 #[doc = r" # Safety"]
1361 #[doc = r""]
1362 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1363 #[doc = r" that may race with any existing instances, for example by only"]
1364 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1365 #[doc = r" original peripheral and using critical sections to coordinate"]
1366 #[doc = r" access between multiple new instances."]
1367 #[doc = r""]
1368 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1369 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1370 #[doc = r" no stolen instances are passed to such software."]
1371 pub unsafe fn steal() -> Self {
1372 Self {
1373 _marker: PhantomData,
1374 }
1375 }
1376}
1377impl Deref for Iom7 {
1378 type Target = iom0::RegisterBlock;
1379 #[inline(always)]
1380 fn deref(&self) -> &Self::Target {
1381 unsafe { &*Self::PTR }
1382 }
1383}
1384impl core::fmt::Debug for Iom7 {
1385 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1386 f.debug_struct("Iom7").finish()
1387 }
1388}
1389#[doc = "IO Peripheral Master"]
1390pub use self::iom0 as iom7;
1391#[doc = "I2C/SPI Slave"]
1392pub struct Ioslave {
1393 _marker: PhantomData<*const ()>,
1394}
1395unsafe impl Send for Ioslave {}
1396impl Ioslave {
1397 #[doc = r"Pointer to the register block"]
1398 pub const PTR: *const ioslave::RegisterBlock = 0x4003_4000 as *const _;
1399 #[doc = r"Return the pointer to the register block"]
1400 #[inline(always)]
1401 pub const fn ptr() -> *const ioslave::RegisterBlock {
1402 Self::PTR
1403 }
1404 #[doc = r" Steal an instance of this peripheral"]
1405 #[doc = r""]
1406 #[doc = r" # Safety"]
1407 #[doc = r""]
1408 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1409 #[doc = r" that may race with any existing instances, for example by only"]
1410 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1411 #[doc = r" original peripheral and using critical sections to coordinate"]
1412 #[doc = r" access between multiple new instances."]
1413 #[doc = r""]
1414 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1415 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1416 #[doc = r" no stolen instances are passed to such software."]
1417 pub unsafe fn steal() -> Self {
1418 Self {
1419 _marker: PhantomData,
1420 }
1421 }
1422}
1423impl Deref for Ioslave {
1424 type Target = ioslave::RegisterBlock;
1425 #[inline(always)]
1426 fn deref(&self) -> &Self::Target {
1427 unsafe { &*Self::PTR }
1428 }
1429}
1430impl core::fmt::Debug for Ioslave {
1431 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1432 f.debug_struct("Ioslave").finish()
1433 }
1434}
1435#[doc = "I2C/SPI Slave"]
1436pub mod ioslave;
1437#[doc = "MCU Miscellaneous Control Logic"]
1438pub struct Mcuctrl {
1439 _marker: PhantomData<*const ()>,
1440}
1441unsafe impl Send for Mcuctrl {}
1442impl Mcuctrl {
1443 #[doc = r"Pointer to the register block"]
1444 pub const PTR: *const mcuctrl::RegisterBlock = 0x4002_0000 as *const _;
1445 #[doc = r"Return the pointer to the register block"]
1446 #[inline(always)]
1447 pub const fn ptr() -> *const mcuctrl::RegisterBlock {
1448 Self::PTR
1449 }
1450 #[doc = r" Steal an instance of this peripheral"]
1451 #[doc = r""]
1452 #[doc = r" # Safety"]
1453 #[doc = r""]
1454 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1455 #[doc = r" that may race with any existing instances, for example by only"]
1456 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1457 #[doc = r" original peripheral and using critical sections to coordinate"]
1458 #[doc = r" access between multiple new instances."]
1459 #[doc = r""]
1460 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1461 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1462 #[doc = r" no stolen instances are passed to such software."]
1463 pub unsafe fn steal() -> Self {
1464 Self {
1465 _marker: PhantomData,
1466 }
1467 }
1468}
1469impl Deref for Mcuctrl {
1470 type Target = mcuctrl::RegisterBlock;
1471 #[inline(always)]
1472 fn deref(&self) -> &Self::Target {
1473 unsafe { &*Self::PTR }
1474 }
1475}
1476impl core::fmt::Debug for Mcuctrl {
1477 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1478 f.debug_struct("Mcuctrl").finish()
1479 }
1480}
1481#[doc = "MCU Miscellaneous Control Logic"]
1482pub mod mcuctrl;
1483#[doc = "Multi-bit SPI Master"]
1484pub struct Mspi0 {
1485 _marker: PhantomData<*const ()>,
1486}
1487unsafe impl Send for Mspi0 {}
1488impl Mspi0 {
1489 #[doc = r"Pointer to the register block"]
1490 pub const PTR: *const mspi0::RegisterBlock = 0x4006_0000 as *const _;
1491 #[doc = r"Return the pointer to the register block"]
1492 #[inline(always)]
1493 pub const fn ptr() -> *const mspi0::RegisterBlock {
1494 Self::PTR
1495 }
1496 #[doc = r" Steal an instance of this peripheral"]
1497 #[doc = r""]
1498 #[doc = r" # Safety"]
1499 #[doc = r""]
1500 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1501 #[doc = r" that may race with any existing instances, for example by only"]
1502 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1503 #[doc = r" original peripheral and using critical sections to coordinate"]
1504 #[doc = r" access between multiple new instances."]
1505 #[doc = r""]
1506 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1507 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1508 #[doc = r" no stolen instances are passed to such software."]
1509 pub unsafe fn steal() -> Self {
1510 Self {
1511 _marker: PhantomData,
1512 }
1513 }
1514}
1515impl Deref for Mspi0 {
1516 type Target = mspi0::RegisterBlock;
1517 #[inline(always)]
1518 fn deref(&self) -> &Self::Target {
1519 unsafe { &*Self::PTR }
1520 }
1521}
1522impl core::fmt::Debug for Mspi0 {
1523 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1524 f.debug_struct("Mspi0").finish()
1525 }
1526}
1527#[doc = "Multi-bit SPI Master"]
1528pub mod mspi0;
1529#[doc = "Multi-bit SPI Master"]
1530pub struct Mspi1 {
1531 _marker: PhantomData<*const ()>,
1532}
1533unsafe impl Send for Mspi1 {}
1534impl Mspi1 {
1535 #[doc = r"Pointer to the register block"]
1536 pub const PTR: *const mspi0::RegisterBlock = 0x4006_1000 as *const _;
1537 #[doc = r"Return the pointer to the register block"]
1538 #[inline(always)]
1539 pub const fn ptr() -> *const mspi0::RegisterBlock {
1540 Self::PTR
1541 }
1542 #[doc = r" Steal an instance of this peripheral"]
1543 #[doc = r""]
1544 #[doc = r" # Safety"]
1545 #[doc = r""]
1546 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1547 #[doc = r" that may race with any existing instances, for example by only"]
1548 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1549 #[doc = r" original peripheral and using critical sections to coordinate"]
1550 #[doc = r" access between multiple new instances."]
1551 #[doc = r""]
1552 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1553 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1554 #[doc = r" no stolen instances are passed to such software."]
1555 pub unsafe fn steal() -> Self {
1556 Self {
1557 _marker: PhantomData,
1558 }
1559 }
1560}
1561impl Deref for Mspi1 {
1562 type Target = mspi0::RegisterBlock;
1563 #[inline(always)]
1564 fn deref(&self) -> &Self::Target {
1565 unsafe { &*Self::PTR }
1566 }
1567}
1568impl core::fmt::Debug for Mspi1 {
1569 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1570 f.debug_struct("Mspi1").finish()
1571 }
1572}
1573#[doc = "Multi-bit SPI Master"]
1574pub use self::mspi0 as mspi1;
1575#[doc = "Multi-bit SPI Master"]
1576pub struct Mspi2 {
1577 _marker: PhantomData<*const ()>,
1578}
1579unsafe impl Send for Mspi2 {}
1580impl Mspi2 {
1581 #[doc = r"Pointer to the register block"]
1582 pub const PTR: *const mspi0::RegisterBlock = 0x4006_2000 as *const _;
1583 #[doc = r"Return the pointer to the register block"]
1584 #[inline(always)]
1585 pub const fn ptr() -> *const mspi0::RegisterBlock {
1586 Self::PTR
1587 }
1588 #[doc = r" Steal an instance of this peripheral"]
1589 #[doc = r""]
1590 #[doc = r" # Safety"]
1591 #[doc = r""]
1592 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1593 #[doc = r" that may race with any existing instances, for example by only"]
1594 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1595 #[doc = r" original peripheral and using critical sections to coordinate"]
1596 #[doc = r" access between multiple new instances."]
1597 #[doc = r""]
1598 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1599 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1600 #[doc = r" no stolen instances are passed to such software."]
1601 pub unsafe fn steal() -> Self {
1602 Self {
1603 _marker: PhantomData,
1604 }
1605 }
1606}
1607impl Deref for Mspi2 {
1608 type Target = mspi0::RegisterBlock;
1609 #[inline(always)]
1610 fn deref(&self) -> &Self::Target {
1611 unsafe { &*Self::PTR }
1612 }
1613}
1614impl core::fmt::Debug for Mspi2 {
1615 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1616 f.debug_struct("Mspi2").finish()
1617 }
1618}
1619#[doc = "Multi-bit SPI Master"]
1620pub use self::mspi0 as mspi2;
1621#[doc = "PDM Audio"]
1622pub struct Pdm0 {
1623 _marker: PhantomData<*const ()>,
1624}
1625unsafe impl Send for Pdm0 {}
1626impl Pdm0 {
1627 #[doc = r"Pointer to the register block"]
1628 pub const PTR: *const pdm0::RegisterBlock = 0x4020_1000 as *const _;
1629 #[doc = r"Return the pointer to the register block"]
1630 #[inline(always)]
1631 pub const fn ptr() -> *const pdm0::RegisterBlock {
1632 Self::PTR
1633 }
1634 #[doc = r" Steal an instance of this peripheral"]
1635 #[doc = r""]
1636 #[doc = r" # Safety"]
1637 #[doc = r""]
1638 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1639 #[doc = r" that may race with any existing instances, for example by only"]
1640 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1641 #[doc = r" original peripheral and using critical sections to coordinate"]
1642 #[doc = r" access between multiple new instances."]
1643 #[doc = r""]
1644 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1645 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1646 #[doc = r" no stolen instances are passed to such software."]
1647 pub unsafe fn steal() -> Self {
1648 Self {
1649 _marker: PhantomData,
1650 }
1651 }
1652}
1653impl Deref for Pdm0 {
1654 type Target = pdm0::RegisterBlock;
1655 #[inline(always)]
1656 fn deref(&self) -> &Self::Target {
1657 unsafe { &*Self::PTR }
1658 }
1659}
1660impl core::fmt::Debug for Pdm0 {
1661 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1662 f.debug_struct("Pdm0").finish()
1663 }
1664}
1665#[doc = "PDM Audio"]
1666pub mod pdm0;
1667#[doc = "PDM Audio"]
1668pub struct Pdm1 {
1669 _marker: PhantomData<*const ()>,
1670}
1671unsafe impl Send for Pdm1 {}
1672impl Pdm1 {
1673 #[doc = r"Pointer to the register block"]
1674 pub const PTR: *const pdm0::RegisterBlock = 0x4020_2000 as *const _;
1675 #[doc = r"Return the pointer to the register block"]
1676 #[inline(always)]
1677 pub const fn ptr() -> *const pdm0::RegisterBlock {
1678 Self::PTR
1679 }
1680 #[doc = r" Steal an instance of this peripheral"]
1681 #[doc = r""]
1682 #[doc = r" # Safety"]
1683 #[doc = r""]
1684 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1685 #[doc = r" that may race with any existing instances, for example by only"]
1686 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1687 #[doc = r" original peripheral and using critical sections to coordinate"]
1688 #[doc = r" access between multiple new instances."]
1689 #[doc = r""]
1690 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1691 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1692 #[doc = r" no stolen instances are passed to such software."]
1693 pub unsafe fn steal() -> Self {
1694 Self {
1695 _marker: PhantomData,
1696 }
1697 }
1698}
1699impl Deref for Pdm1 {
1700 type Target = pdm0::RegisterBlock;
1701 #[inline(always)]
1702 fn deref(&self) -> &Self::Target {
1703 unsafe { &*Self::PTR }
1704 }
1705}
1706impl core::fmt::Debug for Pdm1 {
1707 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1708 f.debug_struct("Pdm1").finish()
1709 }
1710}
1711#[doc = "PDM Audio"]
1712pub use self::pdm0 as pdm1;
1713#[doc = "PDM Audio"]
1714pub struct Pdm2 {
1715 _marker: PhantomData<*const ()>,
1716}
1717unsafe impl Send for Pdm2 {}
1718impl Pdm2 {
1719 #[doc = r"Pointer to the register block"]
1720 pub const PTR: *const pdm0::RegisterBlock = 0x4020_3000 as *const _;
1721 #[doc = r"Return the pointer to the register block"]
1722 #[inline(always)]
1723 pub const fn ptr() -> *const pdm0::RegisterBlock {
1724 Self::PTR
1725 }
1726 #[doc = r" Steal an instance of this peripheral"]
1727 #[doc = r""]
1728 #[doc = r" # Safety"]
1729 #[doc = r""]
1730 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1731 #[doc = r" that may race with any existing instances, for example by only"]
1732 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1733 #[doc = r" original peripheral and using critical sections to coordinate"]
1734 #[doc = r" access between multiple new instances."]
1735 #[doc = r""]
1736 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1737 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1738 #[doc = r" no stolen instances are passed to such software."]
1739 pub unsafe fn steal() -> Self {
1740 Self {
1741 _marker: PhantomData,
1742 }
1743 }
1744}
1745impl Deref for Pdm2 {
1746 type Target = pdm0::RegisterBlock;
1747 #[inline(always)]
1748 fn deref(&self) -> &Self::Target {
1749 unsafe { &*Self::PTR }
1750 }
1751}
1752impl core::fmt::Debug for Pdm2 {
1753 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1754 f.debug_struct("Pdm2").finish()
1755 }
1756}
1757#[doc = "PDM Audio"]
1758pub use self::pdm0 as pdm2;
1759#[doc = "PDM Audio"]
1760pub struct Pdm3 {
1761 _marker: PhantomData<*const ()>,
1762}
1763unsafe impl Send for Pdm3 {}
1764impl Pdm3 {
1765 #[doc = r"Pointer to the register block"]
1766 pub const PTR: *const pdm0::RegisterBlock = 0x4020_4000 as *const _;
1767 #[doc = r"Return the pointer to the register block"]
1768 #[inline(always)]
1769 pub const fn ptr() -> *const pdm0::RegisterBlock {
1770 Self::PTR
1771 }
1772 #[doc = r" Steal an instance of this peripheral"]
1773 #[doc = r""]
1774 #[doc = r" # Safety"]
1775 #[doc = r""]
1776 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1777 #[doc = r" that may race with any existing instances, for example by only"]
1778 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1779 #[doc = r" original peripheral and using critical sections to coordinate"]
1780 #[doc = r" access between multiple new instances."]
1781 #[doc = r""]
1782 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1783 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1784 #[doc = r" no stolen instances are passed to such software."]
1785 pub unsafe fn steal() -> Self {
1786 Self {
1787 _marker: PhantomData,
1788 }
1789 }
1790}
1791impl Deref for Pdm3 {
1792 type Target = pdm0::RegisterBlock;
1793 #[inline(always)]
1794 fn deref(&self) -> &Self::Target {
1795 unsafe { &*Self::PTR }
1796 }
1797}
1798impl core::fmt::Debug for Pdm3 {
1799 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1800 f.debug_struct("Pdm3").finish()
1801 }
1802}
1803#[doc = "PDM Audio"]
1804pub use self::pdm0 as pdm3;
1805#[doc = "PWR Controller Register Bank"]
1806pub struct Pwrctrl {
1807 _marker: PhantomData<*const ()>,
1808}
1809unsafe impl Send for Pwrctrl {}
1810impl Pwrctrl {
1811 #[doc = r"Pointer to the register block"]
1812 pub const PTR: *const pwrctrl::RegisterBlock = 0x4002_1000 as *const _;
1813 #[doc = r"Return the pointer to the register block"]
1814 #[inline(always)]
1815 pub const fn ptr() -> *const pwrctrl::RegisterBlock {
1816 Self::PTR
1817 }
1818 #[doc = r" Steal an instance of this peripheral"]
1819 #[doc = r""]
1820 #[doc = r" # Safety"]
1821 #[doc = r""]
1822 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1823 #[doc = r" that may race with any existing instances, for example by only"]
1824 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1825 #[doc = r" original peripheral and using critical sections to coordinate"]
1826 #[doc = r" access between multiple new instances."]
1827 #[doc = r""]
1828 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1829 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1830 #[doc = r" no stolen instances are passed to such software."]
1831 pub unsafe fn steal() -> Self {
1832 Self {
1833 _marker: PhantomData,
1834 }
1835 }
1836}
1837impl Deref for Pwrctrl {
1838 type Target = pwrctrl::RegisterBlock;
1839 #[inline(always)]
1840 fn deref(&self) -> &Self::Target {
1841 unsafe { &*Self::PTR }
1842 }
1843}
1844impl core::fmt::Debug for Pwrctrl {
1845 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1846 f.debug_struct("Pwrctrl").finish()
1847 }
1848}
1849#[doc = "PWR Controller Register Bank"]
1850pub mod pwrctrl;
1851#[doc = "MCU Reset Generator"]
1852pub struct Rstgen {
1853 _marker: PhantomData<*const ()>,
1854}
1855unsafe impl Send for Rstgen {}
1856impl Rstgen {
1857 #[doc = r"Pointer to the register block"]
1858 pub const PTR: *const rstgen::RegisterBlock = 0x4000_0000 as *const _;
1859 #[doc = r"Return the pointer to the register block"]
1860 #[inline(always)]
1861 pub const fn ptr() -> *const rstgen::RegisterBlock {
1862 Self::PTR
1863 }
1864 #[doc = r" Steal an instance of this peripheral"]
1865 #[doc = r""]
1866 #[doc = r" # Safety"]
1867 #[doc = r""]
1868 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1869 #[doc = r" that may race with any existing instances, for example by only"]
1870 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1871 #[doc = r" original peripheral and using critical sections to coordinate"]
1872 #[doc = r" access between multiple new instances."]
1873 #[doc = r""]
1874 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1875 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1876 #[doc = r" no stolen instances are passed to such software."]
1877 pub unsafe fn steal() -> Self {
1878 Self {
1879 _marker: PhantomData,
1880 }
1881 }
1882}
1883impl Deref for Rstgen {
1884 type Target = rstgen::RegisterBlock;
1885 #[inline(always)]
1886 fn deref(&self) -> &Self::Target {
1887 unsafe { &*Self::PTR }
1888 }
1889}
1890impl core::fmt::Debug for Rstgen {
1891 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1892 f.debug_struct("Rstgen").finish()
1893 }
1894}
1895#[doc = "MCU Reset Generator"]
1896pub mod rstgen;
1897#[doc = "Real Time Clock"]
1898pub struct Rtc {
1899 _marker: PhantomData<*const ()>,
1900}
1901unsafe impl Send for Rtc {}
1902impl Rtc {
1903 #[doc = r"Pointer to the register block"]
1904 pub const PTR: *const rtc::RegisterBlock = 0x4000_4800 as *const _;
1905 #[doc = r"Return the pointer to the register block"]
1906 #[inline(always)]
1907 pub const fn ptr() -> *const rtc::RegisterBlock {
1908 Self::PTR
1909 }
1910 #[doc = r" Steal an instance of this peripheral"]
1911 #[doc = r""]
1912 #[doc = r" # Safety"]
1913 #[doc = r""]
1914 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1915 #[doc = r" that may race with any existing instances, for example by only"]
1916 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1917 #[doc = r" original peripheral and using critical sections to coordinate"]
1918 #[doc = r" access between multiple new instances."]
1919 #[doc = r""]
1920 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1921 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1922 #[doc = r" no stolen instances are passed to such software."]
1923 pub unsafe fn steal() -> Self {
1924 Self {
1925 _marker: PhantomData,
1926 }
1927 }
1928}
1929impl Deref for Rtc {
1930 type Target = rtc::RegisterBlock;
1931 #[inline(always)]
1932 fn deref(&self) -> &Self::Target {
1933 unsafe { &*Self::PTR }
1934 }
1935}
1936impl core::fmt::Debug for Rtc {
1937 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1938 f.debug_struct("Rtc").finish()
1939 }
1940}
1941#[doc = "Real Time Clock"]
1942pub mod rtc;
1943#[doc = "SDIO Control Registers"]
1944pub struct Sdio {
1945 _marker: PhantomData<*const ()>,
1946}
1947unsafe impl Send for Sdio {}
1948impl Sdio {
1949 #[doc = r"Pointer to the register block"]
1950 pub const PTR: *const sdio::RegisterBlock = 0x4007_0000 as *const _;
1951 #[doc = r"Return the pointer to the register block"]
1952 #[inline(always)]
1953 pub const fn ptr() -> *const sdio::RegisterBlock {
1954 Self::PTR
1955 }
1956 #[doc = r" Steal an instance of this peripheral"]
1957 #[doc = r""]
1958 #[doc = r" # Safety"]
1959 #[doc = r""]
1960 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1961 #[doc = r" that may race with any existing instances, for example by only"]
1962 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1963 #[doc = r" original peripheral and using critical sections to coordinate"]
1964 #[doc = r" access between multiple new instances."]
1965 #[doc = r""]
1966 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1967 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1968 #[doc = r" no stolen instances are passed to such software."]
1969 pub unsafe fn steal() -> Self {
1970 Self {
1971 _marker: PhantomData,
1972 }
1973 }
1974}
1975impl Deref for Sdio {
1976 type Target = sdio::RegisterBlock;
1977 #[inline(always)]
1978 fn deref(&self) -> &Self::Target {
1979 unsafe { &*Self::PTR }
1980 }
1981}
1982impl core::fmt::Debug for Sdio {
1983 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1984 f.debug_struct("Sdio").finish()
1985 }
1986}
1987#[doc = "SDIO Control Registers"]
1988pub mod sdio;
1989#[doc = "Security Interfaces"]
1990pub struct Security {
1991 _marker: PhantomData<*const ()>,
1992}
1993unsafe impl Send for Security {}
1994impl Security {
1995 #[doc = r"Pointer to the register block"]
1996 pub const PTR: *const security::RegisterBlock = 0x4003_0000 as *const _;
1997 #[doc = r"Return the pointer to the register block"]
1998 #[inline(always)]
1999 pub const fn ptr() -> *const security::RegisterBlock {
2000 Self::PTR
2001 }
2002 #[doc = r" Steal an instance of this peripheral"]
2003 #[doc = r""]
2004 #[doc = r" # Safety"]
2005 #[doc = r""]
2006 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2007 #[doc = r" that may race with any existing instances, for example by only"]
2008 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2009 #[doc = r" original peripheral and using critical sections to coordinate"]
2010 #[doc = r" access between multiple new instances."]
2011 #[doc = r""]
2012 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2013 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2014 #[doc = r" no stolen instances are passed to such software."]
2015 pub unsafe fn steal() -> Self {
2016 Self {
2017 _marker: PhantomData,
2018 }
2019 }
2020}
2021impl Deref for Security {
2022 type Target = security::RegisterBlock;
2023 #[inline(always)]
2024 fn deref(&self) -> &Self::Target {
2025 unsafe { &*Self::PTR }
2026 }
2027}
2028impl core::fmt::Debug for Security {
2029 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2030 f.debug_struct("Security").finish()
2031 }
2032}
2033#[doc = "Security Interfaces"]
2034pub mod security;
2035#[doc = "Counter/Timer"]
2036pub struct Stimer {
2037 _marker: PhantomData<*const ()>,
2038}
2039unsafe impl Send for Stimer {}
2040impl Stimer {
2041 #[doc = r"Pointer to the register block"]
2042 pub const PTR: *const stimer::RegisterBlock = 0x4000_8800 as *const _;
2043 #[doc = r"Return the pointer to the register block"]
2044 #[inline(always)]
2045 pub const fn ptr() -> *const stimer::RegisterBlock {
2046 Self::PTR
2047 }
2048 #[doc = r" Steal an instance of this peripheral"]
2049 #[doc = r""]
2050 #[doc = r" # Safety"]
2051 #[doc = r""]
2052 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2053 #[doc = r" that may race with any existing instances, for example by only"]
2054 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2055 #[doc = r" original peripheral and using critical sections to coordinate"]
2056 #[doc = r" access between multiple new instances."]
2057 #[doc = r""]
2058 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2059 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2060 #[doc = r" no stolen instances are passed to such software."]
2061 pub unsafe fn steal() -> Self {
2062 Self {
2063 _marker: PhantomData,
2064 }
2065 }
2066}
2067impl Deref for Stimer {
2068 type Target = stimer::RegisterBlock;
2069 #[inline(always)]
2070 fn deref(&self) -> &Self::Target {
2071 unsafe { &*Self::PTR }
2072 }
2073}
2074impl core::fmt::Debug for Stimer {
2075 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2076 f.debug_struct("Stimer").finish()
2077 }
2078}
2079#[doc = "Counter/Timer"]
2080pub mod stimer;
2081#[doc = "Counter/Timer"]
2082pub struct Timer {
2083 _marker: PhantomData<*const ()>,
2084}
2085unsafe impl Send for Timer {}
2086impl Timer {
2087 #[doc = r"Pointer to the register block"]
2088 pub const PTR: *const timer::RegisterBlock = 0x4000_8000 as *const _;
2089 #[doc = r"Return the pointer to the register block"]
2090 #[inline(always)]
2091 pub const fn ptr() -> *const timer::RegisterBlock {
2092 Self::PTR
2093 }
2094 #[doc = r" Steal an instance of this peripheral"]
2095 #[doc = r""]
2096 #[doc = r" # Safety"]
2097 #[doc = r""]
2098 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2099 #[doc = r" that may race with any existing instances, for example by only"]
2100 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2101 #[doc = r" original peripheral and using critical sections to coordinate"]
2102 #[doc = r" access between multiple new instances."]
2103 #[doc = r""]
2104 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2105 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2106 #[doc = r" no stolen instances are passed to such software."]
2107 pub unsafe fn steal() -> Self {
2108 Self {
2109 _marker: PhantomData,
2110 }
2111 }
2112}
2113impl Deref for Timer {
2114 type Target = timer::RegisterBlock;
2115 #[inline(always)]
2116 fn deref(&self) -> &Self::Target {
2117 unsafe { &*Self::PTR }
2118 }
2119}
2120impl core::fmt::Debug for Timer {
2121 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2122 f.debug_struct("Timer").finish()
2123 }
2124}
2125#[doc = "Counter/Timer"]
2126pub mod timer;
2127#[doc = "Serial UART"]
2128pub struct Uart0 {
2129 _marker: PhantomData<*const ()>,
2130}
2131unsafe impl Send for Uart0 {}
2132impl Uart0 {
2133 #[doc = r"Pointer to the register block"]
2134 pub const PTR: *const uart0::RegisterBlock = 0x4001_c000 as *const _;
2135 #[doc = r"Return the pointer to the register block"]
2136 #[inline(always)]
2137 pub const fn ptr() -> *const uart0::RegisterBlock {
2138 Self::PTR
2139 }
2140 #[doc = r" Steal an instance of this peripheral"]
2141 #[doc = r""]
2142 #[doc = r" # Safety"]
2143 #[doc = r""]
2144 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2145 #[doc = r" that may race with any existing instances, for example by only"]
2146 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2147 #[doc = r" original peripheral and using critical sections to coordinate"]
2148 #[doc = r" access between multiple new instances."]
2149 #[doc = r""]
2150 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2151 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2152 #[doc = r" no stolen instances are passed to such software."]
2153 pub unsafe fn steal() -> Self {
2154 Self {
2155 _marker: PhantomData,
2156 }
2157 }
2158}
2159impl Deref for Uart0 {
2160 type Target = uart0::RegisterBlock;
2161 #[inline(always)]
2162 fn deref(&self) -> &Self::Target {
2163 unsafe { &*Self::PTR }
2164 }
2165}
2166impl core::fmt::Debug for Uart0 {
2167 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2168 f.debug_struct("Uart0").finish()
2169 }
2170}
2171#[doc = "Serial UART"]
2172pub mod uart0;
2173#[doc = "Serial UART"]
2174pub struct Uart1 {
2175 _marker: PhantomData<*const ()>,
2176}
2177unsafe impl Send for Uart1 {}
2178impl Uart1 {
2179 #[doc = r"Pointer to the register block"]
2180 pub const PTR: *const uart0::RegisterBlock = 0x4001_d000 as *const _;
2181 #[doc = r"Return the pointer to the register block"]
2182 #[inline(always)]
2183 pub const fn ptr() -> *const uart0::RegisterBlock {
2184 Self::PTR
2185 }
2186 #[doc = r" Steal an instance of this peripheral"]
2187 #[doc = r""]
2188 #[doc = r" # Safety"]
2189 #[doc = r""]
2190 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2191 #[doc = r" that may race with any existing instances, for example by only"]
2192 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2193 #[doc = r" original peripheral and using critical sections to coordinate"]
2194 #[doc = r" access between multiple new instances."]
2195 #[doc = r""]
2196 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2197 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2198 #[doc = r" no stolen instances are passed to such software."]
2199 pub unsafe fn steal() -> Self {
2200 Self {
2201 _marker: PhantomData,
2202 }
2203 }
2204}
2205impl Deref for Uart1 {
2206 type Target = uart0::RegisterBlock;
2207 #[inline(always)]
2208 fn deref(&self) -> &Self::Target {
2209 unsafe { &*Self::PTR }
2210 }
2211}
2212impl core::fmt::Debug for Uart1 {
2213 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2214 f.debug_struct("Uart1").finish()
2215 }
2216}
2217#[doc = "Serial UART"]
2218pub use self::uart0 as uart1;
2219#[doc = "Serial UART"]
2220pub struct Uart2 {
2221 _marker: PhantomData<*const ()>,
2222}
2223unsafe impl Send for Uart2 {}
2224impl Uart2 {
2225 #[doc = r"Pointer to the register block"]
2226 pub const PTR: *const uart0::RegisterBlock = 0x4001_e000 as *const _;
2227 #[doc = r"Return the pointer to the register block"]
2228 #[inline(always)]
2229 pub const fn ptr() -> *const uart0::RegisterBlock {
2230 Self::PTR
2231 }
2232 #[doc = r" Steal an instance of this peripheral"]
2233 #[doc = r""]
2234 #[doc = r" # Safety"]
2235 #[doc = r""]
2236 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2237 #[doc = r" that may race with any existing instances, for example by only"]
2238 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2239 #[doc = r" original peripheral and using critical sections to coordinate"]
2240 #[doc = r" access between multiple new instances."]
2241 #[doc = r""]
2242 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2243 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2244 #[doc = r" no stolen instances are passed to such software."]
2245 pub unsafe fn steal() -> Self {
2246 Self {
2247 _marker: PhantomData,
2248 }
2249 }
2250}
2251impl Deref for Uart2 {
2252 type Target = uart0::RegisterBlock;
2253 #[inline(always)]
2254 fn deref(&self) -> &Self::Target {
2255 unsafe { &*Self::PTR }
2256 }
2257}
2258impl core::fmt::Debug for Uart2 {
2259 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2260 f.debug_struct("Uart2").finish()
2261 }
2262}
2263#[doc = "Serial UART"]
2264pub use self::uart0 as uart2;
2265#[doc = "Serial UART"]
2266pub struct Uart3 {
2267 _marker: PhantomData<*const ()>,
2268}
2269unsafe impl Send for Uart3 {}
2270impl Uart3 {
2271 #[doc = r"Pointer to the register block"]
2272 pub const PTR: *const uart0::RegisterBlock = 0x4001_f000 as *const _;
2273 #[doc = r"Return the pointer to the register block"]
2274 #[inline(always)]
2275 pub const fn ptr() -> *const uart0::RegisterBlock {
2276 Self::PTR
2277 }
2278 #[doc = r" Steal an instance of this peripheral"]
2279 #[doc = r""]
2280 #[doc = r" # Safety"]
2281 #[doc = r""]
2282 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2283 #[doc = r" that may race with any existing instances, for example by only"]
2284 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2285 #[doc = r" original peripheral and using critical sections to coordinate"]
2286 #[doc = r" access between multiple new instances."]
2287 #[doc = r""]
2288 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2289 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2290 #[doc = r" no stolen instances are passed to such software."]
2291 pub unsafe fn steal() -> Self {
2292 Self {
2293 _marker: PhantomData,
2294 }
2295 }
2296}
2297impl Deref for Uart3 {
2298 type Target = uart0::RegisterBlock;
2299 #[inline(always)]
2300 fn deref(&self) -> &Self::Target {
2301 unsafe { &*Self::PTR }
2302 }
2303}
2304impl core::fmt::Debug for Uart3 {
2305 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2306 f.debug_struct("Uart3").finish()
2307 }
2308}
2309#[doc = "Serial UART"]
2310pub use self::uart0 as uart3;
2311#[doc = "USBPHY device register descriptions."]
2312pub struct Usbphy {
2313 _marker: PhantomData<*const ()>,
2314}
2315unsafe impl Send for Usbphy {}
2316impl Usbphy {
2317 #[doc = r"Pointer to the register block"]
2318 pub const PTR: *const usbphy::RegisterBlock = 0x400b_4000 as *const _;
2319 #[doc = r"Return the pointer to the register block"]
2320 #[inline(always)]
2321 pub const fn ptr() -> *const usbphy::RegisterBlock {
2322 Self::PTR
2323 }
2324 #[doc = r" Steal an instance of this peripheral"]
2325 #[doc = r""]
2326 #[doc = r" # Safety"]
2327 #[doc = r""]
2328 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2329 #[doc = r" that may race with any existing instances, for example by only"]
2330 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2331 #[doc = r" original peripheral and using critical sections to coordinate"]
2332 #[doc = r" access between multiple new instances."]
2333 #[doc = r""]
2334 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2335 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2336 #[doc = r" no stolen instances are passed to such software."]
2337 pub unsafe fn steal() -> Self {
2338 Self {
2339 _marker: PhantomData,
2340 }
2341 }
2342}
2343impl Deref for Usbphy {
2344 type Target = usbphy::RegisterBlock;
2345 #[inline(always)]
2346 fn deref(&self) -> &Self::Target {
2347 unsafe { &*Self::PTR }
2348 }
2349}
2350impl core::fmt::Debug for Usbphy {
2351 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2352 f.debug_struct("Usbphy").finish()
2353 }
2354}
2355#[doc = "USBPHY device register descriptions."]
2356pub mod usbphy;
2357#[doc = "USB device register descriptions."]
2358pub struct Usb {
2359 _marker: PhantomData<*const ()>,
2360}
2361unsafe impl Send for Usb {}
2362impl Usb {
2363 #[doc = r"Pointer to the register block"]
2364 pub const PTR: *const usb::RegisterBlock = 0x400b_0000 as *const _;
2365 #[doc = r"Return the pointer to the register block"]
2366 #[inline(always)]
2367 pub const fn ptr() -> *const usb::RegisterBlock {
2368 Self::PTR
2369 }
2370 #[doc = r" Steal an instance of this peripheral"]
2371 #[doc = r""]
2372 #[doc = r" # Safety"]
2373 #[doc = r""]
2374 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2375 #[doc = r" that may race with any existing instances, for example by only"]
2376 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2377 #[doc = r" original peripheral and using critical sections to coordinate"]
2378 #[doc = r" access between multiple new instances."]
2379 #[doc = r""]
2380 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2381 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2382 #[doc = r" no stolen instances are passed to such software."]
2383 pub unsafe fn steal() -> Self {
2384 Self {
2385 _marker: PhantomData,
2386 }
2387 }
2388}
2389impl Deref for Usb {
2390 type Target = usb::RegisterBlock;
2391 #[inline(always)]
2392 fn deref(&self) -> &Self::Target {
2393 unsafe { &*Self::PTR }
2394 }
2395}
2396impl core::fmt::Debug for Usb {
2397 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2398 f.debug_struct("Usb").finish()
2399 }
2400}
2401#[doc = "USB device register descriptions."]
2402pub mod usb;
2403#[doc = "Voltage Comparator"]
2404pub struct Vcomp {
2405 _marker: PhantomData<*const ()>,
2406}
2407unsafe impl Send for Vcomp {}
2408impl Vcomp {
2409 #[doc = r"Pointer to the register block"]
2410 pub const PTR: *const vcomp::RegisterBlock = 0x4000_c000 as *const _;
2411 #[doc = r"Return the pointer to the register block"]
2412 #[inline(always)]
2413 pub const fn ptr() -> *const vcomp::RegisterBlock {
2414 Self::PTR
2415 }
2416 #[doc = r" Steal an instance of this peripheral"]
2417 #[doc = r""]
2418 #[doc = r" # Safety"]
2419 #[doc = r""]
2420 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2421 #[doc = r" that may race with any existing instances, for example by only"]
2422 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2423 #[doc = r" original peripheral and using critical sections to coordinate"]
2424 #[doc = r" access between multiple new instances."]
2425 #[doc = r""]
2426 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2427 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2428 #[doc = r" no stolen instances are passed to such software."]
2429 pub unsafe fn steal() -> Self {
2430 Self {
2431 _marker: PhantomData,
2432 }
2433 }
2434}
2435impl Deref for Vcomp {
2436 type Target = vcomp::RegisterBlock;
2437 #[inline(always)]
2438 fn deref(&self) -> &Self::Target {
2439 unsafe { &*Self::PTR }
2440 }
2441}
2442impl core::fmt::Debug for Vcomp {
2443 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2444 f.debug_struct("Vcomp").finish()
2445 }
2446}
2447#[doc = "Voltage Comparator"]
2448pub mod vcomp;
2449#[doc = "Watchdog Timer"]
2450pub struct Wdt {
2451 _marker: PhantomData<*const ()>,
2452}
2453unsafe impl Send for Wdt {}
2454impl Wdt {
2455 #[doc = r"Pointer to the register block"]
2456 pub const PTR: *const wdt::RegisterBlock = 0x4002_4000 as *const _;
2457 #[doc = r"Return the pointer to the register block"]
2458 #[inline(always)]
2459 pub const fn ptr() -> *const wdt::RegisterBlock {
2460 Self::PTR
2461 }
2462 #[doc = r" Steal an instance of this peripheral"]
2463 #[doc = r""]
2464 #[doc = r" # Safety"]
2465 #[doc = r""]
2466 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2467 #[doc = r" that may race with any existing instances, for example by only"]
2468 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2469 #[doc = r" original peripheral and using critical sections to coordinate"]
2470 #[doc = r" access between multiple new instances."]
2471 #[doc = r""]
2472 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2473 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2474 #[doc = r" no stolen instances are passed to such software."]
2475 pub unsafe fn steal() -> Self {
2476 Self {
2477 _marker: PhantomData,
2478 }
2479 }
2480}
2481impl Deref for Wdt {
2482 type Target = wdt::RegisterBlock;
2483 #[inline(always)]
2484 fn deref(&self) -> &Self::Target {
2485 unsafe { &*Self::PTR }
2486 }
2487}
2488impl core::fmt::Debug for Wdt {
2489 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2490 f.debug_struct("Wdt").finish()
2491 }
2492}
2493#[doc = "Watchdog Timer"]
2494pub mod wdt;
2495#[no_mangle]
2496static mut DEVICE_PERIPHERALS: bool = false;
2497#[doc = r" All the peripherals."]
2498#[allow(non_snake_case)]
2499pub struct Peripherals {
2500 #[doc = "ADC"]
2501 pub adc: Adc,
2502 #[doc = "APBDMA"]
2503 pub apbdma: Apbdma,
2504 #[doc = "AUDADC"]
2505 pub audadc: Audadc,
2506 #[doc = "CLKGEN"]
2507 pub clkgen: Clkgen,
2508 #[doc = "CPU"]
2509 pub cpu: Cpu,
2510 #[doc = "CRYPTO"]
2511 pub crypto: Crypto,
2512 #[doc = "DC"]
2513 pub dc: Dc,
2514 #[doc = "DSI"]
2515 pub dsi: Dsi,
2516 #[doc = "DSP"]
2517 pub dsp: Dsp,
2518 #[doc = "FPIO"]
2519 pub fpio: Fpio,
2520 #[doc = "GPIO"]
2521 pub gpio: Gpio,
2522 #[doc = "GPU"]
2523 pub gpu: Gpu,
2524 #[doc = "I2S0"]
2525 pub i2s0: I2s0,
2526 #[doc = "I2S1"]
2527 pub i2s1: I2s1,
2528 #[doc = "IOM0"]
2529 pub iom0: Iom0,
2530 #[doc = "IOM1"]
2531 pub iom1: Iom1,
2532 #[doc = "IOM2"]
2533 pub iom2: Iom2,
2534 #[doc = "IOM3"]
2535 pub iom3: Iom3,
2536 #[doc = "IOM4"]
2537 pub iom4: Iom4,
2538 #[doc = "IOM5"]
2539 pub iom5: Iom5,
2540 #[doc = "IOM6"]
2541 pub iom6: Iom6,
2542 #[doc = "IOM7"]
2543 pub iom7: Iom7,
2544 #[doc = "IOSLAVE"]
2545 pub ioslave: Ioslave,
2546 #[doc = "MCUCTRL"]
2547 pub mcuctrl: Mcuctrl,
2548 #[doc = "MSPI0"]
2549 pub mspi0: Mspi0,
2550 #[doc = "MSPI1"]
2551 pub mspi1: Mspi1,
2552 #[doc = "MSPI2"]
2553 pub mspi2: Mspi2,
2554 #[doc = "PDM0"]
2555 pub pdm0: Pdm0,
2556 #[doc = "PDM1"]
2557 pub pdm1: Pdm1,
2558 #[doc = "PDM2"]
2559 pub pdm2: Pdm2,
2560 #[doc = "PDM3"]
2561 pub pdm3: Pdm3,
2562 #[doc = "PWRCTRL"]
2563 pub pwrctrl: Pwrctrl,
2564 #[doc = "RSTGEN"]
2565 pub rstgen: Rstgen,
2566 #[doc = "RTC"]
2567 pub rtc: Rtc,
2568 #[doc = "SDIO"]
2569 pub sdio: Sdio,
2570 #[doc = "SECURITY"]
2571 pub security: Security,
2572 #[doc = "STIMER"]
2573 pub stimer: Stimer,
2574 #[doc = "TIMER"]
2575 pub timer: Timer,
2576 #[doc = "UART0"]
2577 pub uart0: Uart0,
2578 #[doc = "UART1"]
2579 pub uart1: Uart1,
2580 #[doc = "UART2"]
2581 pub uart2: Uart2,
2582 #[doc = "UART3"]
2583 pub uart3: Uart3,
2584 #[doc = "USBPHY"]
2585 pub usbphy: Usbphy,
2586 #[doc = "USB"]
2587 pub usb: Usb,
2588 #[doc = "VCOMP"]
2589 pub vcomp: Vcomp,
2590 #[doc = "WDT"]
2591 pub wdt: Wdt,
2592}
2593impl Peripherals {
2594 #[doc = r" Returns all the peripherals *once*."]
2595 #[cfg(feature = "critical-section")]
2596 #[inline]
2597 pub fn take() -> Option<Self> {
2598 critical_section::with(|_| {
2599 if unsafe { DEVICE_PERIPHERALS } {
2600 return None;
2601 }
2602 Some(unsafe { Peripherals::steal() })
2603 })
2604 }
2605 #[doc = r" Unchecked version of `Peripherals::take`."]
2606 #[doc = r""]
2607 #[doc = r" # Safety"]
2608 #[doc = r""]
2609 #[doc = r" Each of the returned peripherals must be used at most once."]
2610 #[inline]
2611 pub unsafe fn steal() -> Self {
2612 DEVICE_PERIPHERALS = true;
2613 Peripherals {
2614 adc: Adc::steal(),
2615 apbdma: Apbdma::steal(),
2616 audadc: Audadc::steal(),
2617 clkgen: Clkgen::steal(),
2618 cpu: Cpu::steal(),
2619 crypto: Crypto::steal(),
2620 dc: Dc::steal(),
2621 dsi: Dsi::steal(),
2622 dsp: Dsp::steal(),
2623 fpio: Fpio::steal(),
2624 gpio: Gpio::steal(),
2625 gpu: Gpu::steal(),
2626 i2s0: I2s0::steal(),
2627 i2s1: I2s1::steal(),
2628 iom0: Iom0::steal(),
2629 iom1: Iom1::steal(),
2630 iom2: Iom2::steal(),
2631 iom3: Iom3::steal(),
2632 iom4: Iom4::steal(),
2633 iom5: Iom5::steal(),
2634 iom6: Iom6::steal(),
2635 iom7: Iom7::steal(),
2636 ioslave: Ioslave::steal(),
2637 mcuctrl: Mcuctrl::steal(),
2638 mspi0: Mspi0::steal(),
2639 mspi1: Mspi1::steal(),
2640 mspi2: Mspi2::steal(),
2641 pdm0: Pdm0::steal(),
2642 pdm1: Pdm1::steal(),
2643 pdm2: Pdm2::steal(),
2644 pdm3: Pdm3::steal(),
2645 pwrctrl: Pwrctrl::steal(),
2646 rstgen: Rstgen::steal(),
2647 rtc: Rtc::steal(),
2648 sdio: Sdio::steal(),
2649 security: Security::steal(),
2650 stimer: Stimer::steal(),
2651 timer: Timer::steal(),
2652 uart0: Uart0::steal(),
2653 uart1: Uart1::steal(),
2654 uart2: Uart2::steal(),
2655 uart3: Uart3::steal(),
2656 usbphy: Usbphy::steal(),
2657 usb: Usb::steal(),
2658 vcomp: Vcomp::steal(),
2659 wdt: Wdt::steal(),
2660 }
2661 }
2662}