1#![doc = "Peripheral access API for D1H microcontrollers (generated using svd2rust v0.31.1 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next] svd2rust 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.31.1/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4#![no_std]
5use core::marker::PhantomData;
6use core::ops::Deref;
7#[allow(unused_imports)]
8use generic::*;
9#[doc = r"Common register and bit access and modify traits"]
10pub mod generic;
11#[cfg(feature = "rt")]
12extern "C" {
13 fn UART0();
14 fn UART1();
15 fn UART2();
16 fn UART3();
17 fn UART4();
18 fn UART5();
19 fn TWI0();
20 fn TWI1();
21 fn TWI2();
22 fn TWI3();
23 fn SPI0();
24 fn SPI1();
25 fn PWM();
26 fn IR_TX();
27 fn LEDC();
28 fn OWA();
29 fn DMIC();
30 fn AUDIO_CODEC();
31 fn I2S_PCM0();
32 fn I2S_PCM1();
33 fn I2S_PCM2();
34 fn USB0_DEVICE();
35 fn USB0_EHCI();
36 fn USB0_OHCI();
37 fn USB1_EHCI();
38 fn USB1_OHCI();
39 fn SMHC0();
40 fn SMHC1();
41 fn SMHC2();
42 fn EMAC();
43 fn DMAC_NS();
44 fn CE_NS();
45 fn SPINLOCK();
46 fn HSTIMER0();
47 fn HSTIMER1();
48 fn GPADC();
49 fn THS();
50 fn TIMER0();
51 fn TIMER1();
52 fn LRADC();
53 fn TPADC();
54 fn WATCHDOG();
55 fn IOMMU();
56 fn GPIOB_NS();
57 fn GPIOC_NS();
58 fn GPIOD_NS();
59 fn GPIOE_NS();
60 fn GPIOF_NS();
61 fn CSI_DMA0();
62 fn CSI_DMA1();
63 fn CSI_TOP_PKT();
64 fn TVD();
65 fn DSP_MBOX_RV_W();
66 fn RV_MBOX_RV();
67 fn RV_MBOX_DSP();
68 fn IR_RX();
69}
70#[doc(hidden)]
71#[repr(C)]
72pub union Vector {
73 pub _handler: unsafe extern "C" fn(),
74 pub _reserved: usize,
75}
76#[cfg(feature = "rt")]
77#[doc(hidden)]
78#[no_mangle]
79pub static __EXTERNAL_INTERRUPTS: [Vector; 168] = [
80 Vector { _reserved: 0 },
81 Vector { _reserved: 0 },
82 Vector { _reserved: 0 },
83 Vector { _reserved: 0 },
84 Vector { _reserved: 0 },
85 Vector { _reserved: 0 },
86 Vector { _reserved: 0 },
87 Vector { _reserved: 0 },
88 Vector { _reserved: 0 },
89 Vector { _reserved: 0 },
90 Vector { _reserved: 0 },
91 Vector { _reserved: 0 },
92 Vector { _reserved: 0 },
93 Vector { _reserved: 0 },
94 Vector { _reserved: 0 },
95 Vector { _reserved: 0 },
96 Vector { _reserved: 0 },
97 Vector { _reserved: 0 },
98 Vector { _handler: UART0 },
99 Vector { _handler: UART1 },
100 Vector { _handler: UART2 },
101 Vector { _handler: UART3 },
102 Vector { _handler: UART4 },
103 Vector { _handler: UART5 },
104 Vector { _reserved: 0 },
105 Vector { _handler: TWI0 },
106 Vector { _handler: TWI1 },
107 Vector { _handler: TWI2 },
108 Vector { _handler: TWI3 },
109 Vector { _reserved: 0 },
110 Vector { _reserved: 0 },
111 Vector { _handler: SPI0 },
112 Vector { _handler: SPI1 },
113 Vector { _reserved: 0 },
114 Vector { _handler: PWM },
115 Vector { _handler: IR_TX },
116 Vector { _handler: LEDC },
117 Vector { _reserved: 0 },
118 Vector { _reserved: 0 },
119 Vector { _handler: OWA },
120 Vector { _handler: DMIC },
121 Vector {
122 _handler: AUDIO_CODEC,
123 },
124 Vector { _handler: I2S_PCM0 },
125 Vector { _handler: I2S_PCM1 },
126 Vector { _handler: I2S_PCM2 },
127 Vector {
128 _handler: USB0_DEVICE,
129 },
130 Vector {
131 _handler: USB0_EHCI,
132 },
133 Vector {
134 _handler: USB0_OHCI,
135 },
136 Vector { _reserved: 0 },
137 Vector {
138 _handler: USB1_EHCI,
139 },
140 Vector {
141 _handler: USB1_OHCI,
142 },
143 Vector { _reserved: 0 },
144 Vector { _reserved: 0 },
145 Vector { _reserved: 0 },
146 Vector { _reserved: 0 },
147 Vector { _reserved: 0 },
148 Vector { _handler: SMHC0 },
149 Vector { _handler: SMHC1 },
150 Vector { _handler: SMHC2 },
151 Vector { _reserved: 0 },
152 Vector { _reserved: 0 },
153 Vector { _reserved: 0 },
154 Vector { _handler: EMAC },
155 Vector { _reserved: 0 },
156 Vector { _reserved: 0 },
157 Vector { _reserved: 0 },
158 Vector { _handler: DMAC_NS },
159 Vector { _reserved: 0 },
160 Vector { _handler: CE_NS },
161 Vector { _reserved: 0 },
162 Vector { _handler: SPINLOCK },
163 Vector { _handler: HSTIMER0 },
164 Vector { _handler: HSTIMER1 },
165 Vector { _handler: GPADC },
166 Vector { _handler: THS },
167 Vector { _handler: TIMER0 },
168 Vector { _handler: TIMER1 },
169 Vector { _handler: LRADC },
170 Vector { _handler: TPADC },
171 Vector { _handler: WATCHDOG },
172 Vector { _handler: IOMMU },
173 Vector { _reserved: 0 },
174 Vector { _reserved: 0 },
175 Vector { _reserved: 0 },
176 Vector { _reserved: 0 },
177 Vector { _handler: GPIOB_NS },
178 Vector { _reserved: 0 },
179 Vector { _handler: GPIOC_NS },
180 Vector { _reserved: 0 },
181 Vector { _handler: GPIOD_NS },
182 Vector { _reserved: 0 },
183 Vector { _handler: GPIOE_NS },
184 Vector { _reserved: 0 },
185 Vector { _handler: GPIOF_NS },
186 Vector { _reserved: 0 },
187 Vector { _reserved: 0 },
188 Vector { _reserved: 0 },
189 Vector { _reserved: 0 },
190 Vector { _reserved: 0 },
191 Vector { _reserved: 0 },
192 Vector { _reserved: 0 },
193 Vector { _reserved: 0 },
194 Vector { _reserved: 0 },
195 Vector { _reserved: 0 },
196 Vector { _reserved: 0 },
197 Vector { _reserved: 0 },
198 Vector { _reserved: 0 },
199 Vector { _reserved: 0 },
200 Vector { _reserved: 0 },
201 Vector { _reserved: 0 },
202 Vector { _reserved: 0 },
203 Vector { _handler: CSI_DMA0 },
204 Vector { _handler: CSI_DMA1 },
205 Vector { _reserved: 0 },
206 Vector { _reserved: 0 },
207 Vector { _reserved: 0 },
208 Vector { _reserved: 0 },
209 Vector { _reserved: 0 },
210 Vector { _reserved: 0 },
211 Vector { _reserved: 0 },
212 Vector { _reserved: 0 },
213 Vector { _reserved: 0 },
214 Vector {
215 _handler: CSI_TOP_PKT,
216 },
217 Vector { _handler: TVD },
218 Vector { _reserved: 0 },
219 Vector { _reserved: 0 },
220 Vector { _reserved: 0 },
221 Vector { _reserved: 0 },
222 Vector { _reserved: 0 },
223 Vector { _reserved: 0 },
224 Vector { _reserved: 0 },
225 Vector { _reserved: 0 },
226 Vector { _reserved: 0 },
227 Vector { _reserved: 0 },
228 Vector { _reserved: 0 },
229 Vector { _reserved: 0 },
230 Vector { _reserved: 0 },
231 Vector { _reserved: 0 },
232 Vector { _reserved: 0 },
233 Vector { _reserved: 0 },
234 Vector {
235 _handler: DSP_MBOX_RV_W,
236 },
237 Vector { _reserved: 0 },
238 Vector { _reserved: 0 },
239 Vector { _reserved: 0 },
240 Vector {
241 _handler: RV_MBOX_RV,
242 },
243 Vector {
244 _handler: RV_MBOX_DSP,
245 },
246 Vector { _reserved: 0 },
247 Vector { _reserved: 0 },
248 Vector { _reserved: 0 },
249 Vector { _reserved: 0 },
250 Vector { _reserved: 0 },
251 Vector { _reserved: 0 },
252 Vector { _reserved: 0 },
253 Vector { _reserved: 0 },
254 Vector { _reserved: 0 },
255 Vector { _reserved: 0 },
256 Vector { _reserved: 0 },
257 Vector { _reserved: 0 },
258 Vector { _reserved: 0 },
259 Vector { _reserved: 0 },
260 Vector { _reserved: 0 },
261 Vector { _reserved: 0 },
262 Vector { _reserved: 0 },
263 Vector { _reserved: 0 },
264 Vector { _reserved: 0 },
265 Vector { _reserved: 0 },
266 Vector { _reserved: 0 },
267 Vector { _handler: IR_RX },
268];
269#[doc(hidden)]
270pub mod interrupt;
271pub use self::interrupt::Interrupt;
272#[doc = "Clock Controller Unit"]
273pub struct CCU {
274 _marker: PhantomData<*const ()>,
275}
276unsafe impl Send for CCU {}
277impl CCU {
278 #[doc = r"Pointer to the register block"]
279 pub const PTR: *const ccu::RegisterBlock = 0x0200_1000 as *const _;
280 #[doc = r"Return the pointer to the register block"]
281 #[inline(always)]
282 pub const fn ptr() -> *const ccu::RegisterBlock {
283 Self::PTR
284 }
285 #[doc = r" Steal an instance of this peripheral"]
286 #[doc = r""]
287 #[doc = r" # Safety"]
288 #[doc = r""]
289 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
290 #[doc = r" that may race with any existing instances, for example by only"]
291 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
292 #[doc = r" original peripheral and using critical sections to coordinate"]
293 #[doc = r" access between multiple new instances."]
294 #[doc = r""]
295 #[doc = r" Additionally, other software such as HALs may rely on only one"]
296 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
297 #[doc = r" no stolen instances are passed to such software."]
298 pub unsafe fn steal() -> Self {
299 Self {
300 _marker: PhantomData,
301 }
302 }
303}
304impl Deref for CCU {
305 type Target = ccu::RegisterBlock;
306 #[inline(always)]
307 fn deref(&self) -> &Self::Target {
308 unsafe { &*Self::PTR }
309 }
310}
311impl core::fmt::Debug for CCU {
312 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
313 f.debug_struct("CCU").finish()
314 }
315}
316#[doc = "Clock Controller Unit"]
317pub mod ccu;
318#[doc = "System Configuration"]
319pub struct SYS_CFG {
320 _marker: PhantomData<*const ()>,
321}
322unsafe impl Send for SYS_CFG {}
323impl SYS_CFG {
324 #[doc = r"Pointer to the register block"]
325 pub const PTR: *const sys_cfg::RegisterBlock = 0x0300_0000 as *const _;
326 #[doc = r"Return the pointer to the register block"]
327 #[inline(always)]
328 pub const fn ptr() -> *const sys_cfg::RegisterBlock {
329 Self::PTR
330 }
331 #[doc = r" Steal an instance of this peripheral"]
332 #[doc = r""]
333 #[doc = r" # Safety"]
334 #[doc = r""]
335 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
336 #[doc = r" that may race with any existing instances, for example by only"]
337 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
338 #[doc = r" original peripheral and using critical sections to coordinate"]
339 #[doc = r" access between multiple new instances."]
340 #[doc = r""]
341 #[doc = r" Additionally, other software such as HALs may rely on only one"]
342 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
343 #[doc = r" no stolen instances are passed to such software."]
344 pub unsafe fn steal() -> Self {
345 Self {
346 _marker: PhantomData,
347 }
348 }
349}
350impl Deref for SYS_CFG {
351 type Target = sys_cfg::RegisterBlock;
352 #[inline(always)]
353 fn deref(&self) -> &Self::Target {
354 unsafe { &*Self::PTR }
355 }
356}
357impl core::fmt::Debug for SYS_CFG {
358 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
359 f.debug_struct("SYS_CFG").finish()
360 }
361}
362#[doc = "System Configuration"]
363pub mod sys_cfg;
364#[doc = "RISC-V System Configuration"]
365pub struct RISCV_CFG {
366 _marker: PhantomData<*const ()>,
367}
368unsafe impl Send for RISCV_CFG {}
369impl RISCV_CFG {
370 #[doc = r"Pointer to the register block"]
371 pub const PTR: *const riscv_cfg::RegisterBlock = 0x0601_0000 as *const _;
372 #[doc = r"Return the pointer to the register block"]
373 #[inline(always)]
374 pub const fn ptr() -> *const riscv_cfg::RegisterBlock {
375 Self::PTR
376 }
377 #[doc = r" Steal an instance of this peripheral"]
378 #[doc = r""]
379 #[doc = r" # Safety"]
380 #[doc = r""]
381 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
382 #[doc = r" that may race with any existing instances, for example by only"]
383 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
384 #[doc = r" original peripheral and using critical sections to coordinate"]
385 #[doc = r" access between multiple new instances."]
386 #[doc = r""]
387 #[doc = r" Additionally, other software such as HALs may rely on only one"]
388 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
389 #[doc = r" no stolen instances are passed to such software."]
390 pub unsafe fn steal() -> Self {
391 Self {
392 _marker: PhantomData,
393 }
394 }
395}
396impl Deref for RISCV_CFG {
397 type Target = riscv_cfg::RegisterBlock;
398 #[inline(always)]
399 fn deref(&self) -> &Self::Target {
400 unsafe { &*Self::PTR }
401 }
402}
403impl core::fmt::Debug for RISCV_CFG {
404 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
405 f.debug_struct("RISCV_CFG").finish()
406 }
407}
408#[doc = "RISC-V System Configuration"]
409pub mod riscv_cfg;
410#[doc = "Core-Local Interruptor"]
411pub struct CLINT {
412 _marker: PhantomData<*const ()>,
413}
414unsafe impl Send for CLINT {}
415impl CLINT {
416 #[doc = r"Pointer to the register block"]
417 pub const PTR: *const clint::RegisterBlock = 0x1400_0000 as *const _;
418 #[doc = r"Return the pointer to the register block"]
419 #[inline(always)]
420 pub const fn ptr() -> *const clint::RegisterBlock {
421 Self::PTR
422 }
423 #[doc = r" Steal an instance of this peripheral"]
424 #[doc = r""]
425 #[doc = r" # Safety"]
426 #[doc = r""]
427 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
428 #[doc = r" that may race with any existing instances, for example by only"]
429 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
430 #[doc = r" original peripheral and using critical sections to coordinate"]
431 #[doc = r" access between multiple new instances."]
432 #[doc = r""]
433 #[doc = r" Additionally, other software such as HALs may rely on only one"]
434 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
435 #[doc = r" no stolen instances are passed to such software."]
436 pub unsafe fn steal() -> Self {
437 Self {
438 _marker: PhantomData,
439 }
440 }
441}
442impl Deref for CLINT {
443 type Target = clint::RegisterBlock;
444 #[inline(always)]
445 fn deref(&self) -> &Self::Target {
446 unsafe { &*Self::PTR }
447 }
448}
449impl core::fmt::Debug for CLINT {
450 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
451 f.debug_struct("CLINT").finish()
452 }
453}
454#[doc = "Core-Local Interruptor"]
455pub mod clint;
456#[doc = "Timer Module, includes timer0, timer1, watchdog and audio video synchronization"]
457pub struct TIMER {
458 _marker: PhantomData<*const ()>,
459}
460unsafe impl Send for TIMER {}
461impl TIMER {
462 #[doc = r"Pointer to the register block"]
463 pub const PTR: *const timer::RegisterBlock = 0x0205_0000 as *const _;
464 #[doc = r"Return the pointer to the register block"]
465 #[inline(always)]
466 pub const fn ptr() -> *const timer::RegisterBlock {
467 Self::PTR
468 }
469 #[doc = r" Steal an instance of this peripheral"]
470 #[doc = r""]
471 #[doc = r" # Safety"]
472 #[doc = r""]
473 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
474 #[doc = r" that may race with any existing instances, for example by only"]
475 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
476 #[doc = r" original peripheral and using critical sections to coordinate"]
477 #[doc = r" access between multiple new instances."]
478 #[doc = r""]
479 #[doc = r" Additionally, other software such as HALs may rely on only one"]
480 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
481 #[doc = r" no stolen instances are passed to such software."]
482 pub unsafe fn steal() -> Self {
483 Self {
484 _marker: PhantomData,
485 }
486 }
487}
488impl Deref for TIMER {
489 type Target = timer::RegisterBlock;
490 #[inline(always)]
491 fn deref(&self) -> &Self::Target {
492 unsafe { &*Self::PTR }
493 }
494}
495impl core::fmt::Debug for TIMER {
496 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
497 f.debug_struct("TIMER").finish()
498 }
499}
500#[doc = "Timer Module, includes timer0, timer1, watchdog and audio video synchronization"]
501pub mod timer;
502#[doc = "High Speed Timer"]
503pub struct HS_TIMER {
504 _marker: PhantomData<*const ()>,
505}
506unsafe impl Send for HS_TIMER {}
507impl HS_TIMER {
508 #[doc = r"Pointer to the register block"]
509 pub const PTR: *const hs_timer::RegisterBlock = 0x0300_8000 as *const _;
510 #[doc = r"Return the pointer to the register block"]
511 #[inline(always)]
512 pub const fn ptr() -> *const hs_timer::RegisterBlock {
513 Self::PTR
514 }
515 #[doc = r" Steal an instance of this peripheral"]
516 #[doc = r""]
517 #[doc = r" # Safety"]
518 #[doc = r""]
519 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
520 #[doc = r" that may race with any existing instances, for example by only"]
521 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
522 #[doc = r" original peripheral and using critical sections to coordinate"]
523 #[doc = r" access between multiple new instances."]
524 #[doc = r""]
525 #[doc = r" Additionally, other software such as HALs may rely on only one"]
526 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
527 #[doc = r" no stolen instances are passed to such software."]
528 pub unsafe fn steal() -> Self {
529 Self {
530 _marker: PhantomData,
531 }
532 }
533}
534impl Deref for HS_TIMER {
535 type Target = hs_timer::RegisterBlock;
536 #[inline(always)]
537 fn deref(&self) -> &Self::Target {
538 unsafe { &*Self::PTR }
539 }
540}
541impl core::fmt::Debug for HS_TIMER {
542 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
543 f.debug_struct("HS_TIMER").finish()
544 }
545}
546#[doc = "High Speed Timer"]
547pub mod hs_timer;
548#[doc = "Platform Level Interrupt Control"]
549pub struct PLIC {
550 _marker: PhantomData<*const ()>,
551}
552unsafe impl Send for PLIC {}
553impl PLIC {
554 #[doc = r"Pointer to the register block"]
555 pub const PTR: *const plic::RegisterBlock = 0x1000_0000 as *const _;
556 #[doc = r"Return the pointer to the register block"]
557 #[inline(always)]
558 pub const fn ptr() -> *const plic::RegisterBlock {
559 Self::PTR
560 }
561 #[doc = r" Steal an instance of this peripheral"]
562 #[doc = r""]
563 #[doc = r" # Safety"]
564 #[doc = r""]
565 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
566 #[doc = r" that may race with any existing instances, for example by only"]
567 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
568 #[doc = r" original peripheral and using critical sections to coordinate"]
569 #[doc = r" access between multiple new instances."]
570 #[doc = r""]
571 #[doc = r" Additionally, other software such as HALs may rely on only one"]
572 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
573 #[doc = r" no stolen instances are passed to such software."]
574 pub unsafe fn steal() -> Self {
575 Self {
576 _marker: PhantomData,
577 }
578 }
579}
580impl Deref for PLIC {
581 type Target = plic::RegisterBlock;
582 #[inline(always)]
583 fn deref(&self) -> &Self::Target {
584 unsafe { &*Self::PTR }
585 }
586}
587impl core::fmt::Debug for PLIC {
588 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
589 f.debug_struct("PLIC").finish()
590 }
591}
592#[doc = "Platform Level Interrupt Control"]
593pub mod plic;
594#[doc = "Direct Memory Access Controller"]
595pub struct DMAC {
596 _marker: PhantomData<*const ()>,
597}
598unsafe impl Send for DMAC {}
599impl DMAC {
600 #[doc = r"Pointer to the register block"]
601 pub const PTR: *const dmac::RegisterBlock = 0x0300_2000 as *const _;
602 #[doc = r"Return the pointer to the register block"]
603 #[inline(always)]
604 pub const fn ptr() -> *const dmac::RegisterBlock {
605 Self::PTR
606 }
607 #[doc = r" Steal an instance of this peripheral"]
608 #[doc = r""]
609 #[doc = r" # Safety"]
610 #[doc = r""]
611 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
612 #[doc = r" that may race with any existing instances, for example by only"]
613 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
614 #[doc = r" original peripheral and using critical sections to coordinate"]
615 #[doc = r" access between multiple new instances."]
616 #[doc = r""]
617 #[doc = r" Additionally, other software such as HALs may rely on only one"]
618 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
619 #[doc = r" no stolen instances are passed to such software."]
620 pub unsafe fn steal() -> Self {
621 Self {
622 _marker: PhantomData,
623 }
624 }
625}
626impl Deref for DMAC {
627 type Target = dmac::RegisterBlock;
628 #[inline(always)]
629 fn deref(&self) -> &Self::Target {
630 unsafe { &*Self::PTR }
631 }
632}
633impl core::fmt::Debug for DMAC {
634 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
635 f.debug_struct("DMAC").finish()
636 }
637}
638#[doc = "Direct Memory Access Controller"]
639pub mod dmac;
640#[doc = "Thermal Sensor Controller"]
641pub struct THS {
642 _marker: PhantomData<*const ()>,
643}
644unsafe impl Send for THS {}
645impl THS {
646 #[doc = r"Pointer to the register block"]
647 pub const PTR: *const ths::RegisterBlock = 0x0200_9400 as *const _;
648 #[doc = r"Return the pointer to the register block"]
649 #[inline(always)]
650 pub const fn ptr() -> *const ths::RegisterBlock {
651 Self::PTR
652 }
653 #[doc = r" Steal an instance of this peripheral"]
654 #[doc = r""]
655 #[doc = r" # Safety"]
656 #[doc = r""]
657 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
658 #[doc = r" that may race with any existing instances, for example by only"]
659 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
660 #[doc = r" original peripheral and using critical sections to coordinate"]
661 #[doc = r" access between multiple new instances."]
662 #[doc = r""]
663 #[doc = r" Additionally, other software such as HALs may rely on only one"]
664 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
665 #[doc = r" no stolen instances are passed to such software."]
666 pub unsafe fn steal() -> Self {
667 Self {
668 _marker: PhantomData,
669 }
670 }
671}
672impl Deref for THS {
673 type Target = ths::RegisterBlock;
674 #[inline(always)]
675 fn deref(&self) -> &Self::Target {
676 unsafe { &*Self::PTR }
677 }
678}
679impl core::fmt::Debug for THS {
680 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
681 f.debug_struct("THS").finish()
682 }
683}
684#[doc = "Thermal Sensor Controller"]
685pub mod ths;
686#[doc = "I/O Memory Management Unit"]
687pub struct IOMMU {
688 _marker: PhantomData<*const ()>,
689}
690unsafe impl Send for IOMMU {}
691impl IOMMU {
692 #[doc = r"Pointer to the register block"]
693 pub const PTR: *const iommu::RegisterBlock = 0x0201_0000 as *const _;
694 #[doc = r"Return the pointer to the register block"]
695 #[inline(always)]
696 pub const fn ptr() -> *const iommu::RegisterBlock {
697 Self::PTR
698 }
699 #[doc = r" Steal an instance of this peripheral"]
700 #[doc = r""]
701 #[doc = r" # Safety"]
702 #[doc = r""]
703 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
704 #[doc = r" that may race with any existing instances, for example by only"]
705 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
706 #[doc = r" original peripheral and using critical sections to coordinate"]
707 #[doc = r" access between multiple new instances."]
708 #[doc = r""]
709 #[doc = r" Additionally, other software such as HALs may rely on only one"]
710 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
711 #[doc = r" no stolen instances are passed to such software."]
712 pub unsafe fn steal() -> Self {
713 Self {
714 _marker: PhantomData,
715 }
716 }
717}
718impl Deref for IOMMU {
719 type Target = iommu::RegisterBlock;
720 #[inline(always)]
721 fn deref(&self) -> &Self::Target {
722 unsafe { &*Self::PTR }
723 }
724}
725impl core::fmt::Debug for IOMMU {
726 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
727 f.debug_struct("IOMMU").finish()
728 }
729}
730#[doc = "I/O Memory Management Unit"]
731pub mod iommu;
732#[doc = "DSP Message Box"]
733pub struct DSP_MSGBOX {
734 _marker: PhantomData<*const ()>,
735}
736unsafe impl Send for DSP_MSGBOX {}
737impl DSP_MSGBOX {
738 #[doc = r"Pointer to the register block"]
739 pub const PTR: *const dsp_msgbox::RegisterBlock = 0x0170_1000 as *const _;
740 #[doc = r"Return the pointer to the register block"]
741 #[inline(always)]
742 pub const fn ptr() -> *const dsp_msgbox::RegisterBlock {
743 Self::PTR
744 }
745 #[doc = r" Steal an instance of this peripheral"]
746 #[doc = r""]
747 #[doc = r" # Safety"]
748 #[doc = r""]
749 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
750 #[doc = r" that may race with any existing instances, for example by only"]
751 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
752 #[doc = r" original peripheral and using critical sections to coordinate"]
753 #[doc = r" access between multiple new instances."]
754 #[doc = r""]
755 #[doc = r" Additionally, other software such as HALs may rely on only one"]
756 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
757 #[doc = r" no stolen instances are passed to such software."]
758 pub unsafe fn steal() -> Self {
759 Self {
760 _marker: PhantomData,
761 }
762 }
763}
764impl Deref for DSP_MSGBOX {
765 type Target = dsp_msgbox::RegisterBlock;
766 #[inline(always)]
767 fn deref(&self) -> &Self::Target {
768 unsafe { &*Self::PTR }
769 }
770}
771impl core::fmt::Debug for DSP_MSGBOX {
772 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
773 f.debug_struct("DSP_MSGBOX").finish()
774 }
775}
776#[doc = "DSP Message Box"]
777pub mod dsp_msgbox;
778#[doc = "RISC-V Message Box"]
779pub struct RV_MSGBOX {
780 _marker: PhantomData<*const ()>,
781}
782unsafe impl Send for RV_MSGBOX {}
783impl RV_MSGBOX {
784 #[doc = r"Pointer to the register block"]
785 pub const PTR: *const dsp_msgbox::RegisterBlock = 0x0601_f000 as *const _;
786 #[doc = r"Return the pointer to the register block"]
787 #[inline(always)]
788 pub const fn ptr() -> *const dsp_msgbox::RegisterBlock {
789 Self::PTR
790 }
791 #[doc = r" Steal an instance of this peripheral"]
792 #[doc = r""]
793 #[doc = r" # Safety"]
794 #[doc = r""]
795 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
796 #[doc = r" that may race with any existing instances, for example by only"]
797 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
798 #[doc = r" original peripheral and using critical sections to coordinate"]
799 #[doc = r" access between multiple new instances."]
800 #[doc = r""]
801 #[doc = r" Additionally, other software such as HALs may rely on only one"]
802 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
803 #[doc = r" no stolen instances are passed to such software."]
804 pub unsafe fn steal() -> Self {
805 Self {
806 _marker: PhantomData,
807 }
808 }
809}
810impl Deref for RV_MSGBOX {
811 type Target = dsp_msgbox::RegisterBlock;
812 #[inline(always)]
813 fn deref(&self) -> &Self::Target {
814 unsafe { &*Self::PTR }
815 }
816}
817impl core::fmt::Debug for RV_MSGBOX {
818 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
819 f.debug_struct("RV_MSGBOX").finish()
820 }
821}
822#[doc = "RISC-V Message Box"]
823pub use self::dsp_msgbox as rv_msgbox;
824#[doc = "Spinlock"]
825pub struct SPINLOCK {
826 _marker: PhantomData<*const ()>,
827}
828unsafe impl Send for SPINLOCK {}
829impl SPINLOCK {
830 #[doc = r"Pointer to the register block"]
831 pub const PTR: *const spinlock::RegisterBlock = 0x0300_5000 as *const _;
832 #[doc = r"Return the pointer to the register block"]
833 #[inline(always)]
834 pub const fn ptr() -> *const spinlock::RegisterBlock {
835 Self::PTR
836 }
837 #[doc = r" Steal an instance of this peripheral"]
838 #[doc = r""]
839 #[doc = r" # Safety"]
840 #[doc = r""]
841 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
842 #[doc = r" that may race with any existing instances, for example by only"]
843 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
844 #[doc = r" original peripheral and using critical sections to coordinate"]
845 #[doc = r" access between multiple new instances."]
846 #[doc = r""]
847 #[doc = r" Additionally, other software such as HALs may rely on only one"]
848 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
849 #[doc = r" no stolen instances are passed to such software."]
850 pub unsafe fn steal() -> Self {
851 Self {
852 _marker: PhantomData,
853 }
854 }
855}
856impl Deref for SPINLOCK {
857 type Target = spinlock::RegisterBlock;
858 #[inline(always)]
859 fn deref(&self) -> &Self::Target {
860 unsafe { &*Self::PTR }
861 }
862}
863impl core::fmt::Debug for SPINLOCK {
864 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
865 f.debug_struct("SPINLOCK").finish()
866 }
867}
868#[doc = "Spinlock"]
869pub mod spinlock;
870#[doc = "Real Time CLock"]
871pub struct RTC {
872 _marker: PhantomData<*const ()>,
873}
874unsafe impl Send for RTC {}
875impl RTC {
876 #[doc = r"Pointer to the register block"]
877 pub const PTR: *const rtc::RegisterBlock = 0x0709_0000 as *const _;
878 #[doc = r"Return the pointer to the register block"]
879 #[inline(always)]
880 pub const fn ptr() -> *const rtc::RegisterBlock {
881 Self::PTR
882 }
883 #[doc = r" Steal an instance of this peripheral"]
884 #[doc = r""]
885 #[doc = r" # Safety"]
886 #[doc = r""]
887 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
888 #[doc = r" that may race with any existing instances, for example by only"]
889 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
890 #[doc = r" original peripheral and using critical sections to coordinate"]
891 #[doc = r" access between multiple new instances."]
892 #[doc = r""]
893 #[doc = r" Additionally, other software such as HALs may rely on only one"]
894 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
895 #[doc = r" no stolen instances are passed to such software."]
896 pub unsafe fn steal() -> Self {
897 Self {
898 _marker: PhantomData,
899 }
900 }
901}
902impl Deref for RTC {
903 type Target = rtc::RegisterBlock;
904 #[inline(always)]
905 fn deref(&self) -> &Self::Target {
906 unsafe { &*Self::PTR }
907 }
908}
909impl core::fmt::Debug for RTC {
910 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
911 f.debug_struct("RTC").finish()
912 }
913}
914#[doc = "Real Time CLock"]
915pub mod rtc;
916#[doc = "Timing COntroller LCD"]
917pub struct TCON_LCD0 {
918 _marker: PhantomData<*const ()>,
919}
920unsafe impl Send for TCON_LCD0 {}
921impl TCON_LCD0 {
922 #[doc = r"Pointer to the register block"]
923 pub const PTR: *const tcon_lcd0::RegisterBlock = 0x0546_1000 as *const _;
924 #[doc = r"Return the pointer to the register block"]
925 #[inline(always)]
926 pub const fn ptr() -> *const tcon_lcd0::RegisterBlock {
927 Self::PTR
928 }
929 #[doc = r" Steal an instance of this peripheral"]
930 #[doc = r""]
931 #[doc = r" # Safety"]
932 #[doc = r""]
933 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
934 #[doc = r" that may race with any existing instances, for example by only"]
935 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
936 #[doc = r" original peripheral and using critical sections to coordinate"]
937 #[doc = r" access between multiple new instances."]
938 #[doc = r""]
939 #[doc = r" Additionally, other software such as HALs may rely on only one"]
940 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
941 #[doc = r" no stolen instances are passed to such software."]
942 pub unsafe fn steal() -> Self {
943 Self {
944 _marker: PhantomData,
945 }
946 }
947}
948impl Deref for TCON_LCD0 {
949 type Target = tcon_lcd0::RegisterBlock;
950 #[inline(always)]
951 fn deref(&self) -> &Self::Target {
952 unsafe { &*Self::PTR }
953 }
954}
955impl core::fmt::Debug for TCON_LCD0 {
956 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
957 f.debug_struct("TCON_LCD0").finish()
958 }
959}
960#[doc = "Timing COntroller LCD"]
961pub mod tcon_lcd0;
962#[doc = "Timing COntroller TV"]
963pub struct TCON_TV0 {
964 _marker: PhantomData<*const ()>,
965}
966unsafe impl Send for TCON_TV0 {}
967impl TCON_TV0 {
968 #[doc = r"Pointer to the register block"]
969 pub const PTR: *const tcon_tv0::RegisterBlock = 0x0547_0000 as *const _;
970 #[doc = r"Return the pointer to the register block"]
971 #[inline(always)]
972 pub const fn ptr() -> *const tcon_tv0::RegisterBlock {
973 Self::PTR
974 }
975 #[doc = r" Steal an instance of this peripheral"]
976 #[doc = r""]
977 #[doc = r" # Safety"]
978 #[doc = r""]
979 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
980 #[doc = r" that may race with any existing instances, for example by only"]
981 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
982 #[doc = r" original peripheral and using critical sections to coordinate"]
983 #[doc = r" access between multiple new instances."]
984 #[doc = r""]
985 #[doc = r" Additionally, other software such as HALs may rely on only one"]
986 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
987 #[doc = r" no stolen instances are passed to such software."]
988 pub unsafe fn steal() -> Self {
989 Self {
990 _marker: PhantomData,
991 }
992 }
993}
994impl Deref for TCON_TV0 {
995 type Target = tcon_tv0::RegisterBlock;
996 #[inline(always)]
997 fn deref(&self) -> &Self::Target {
998 unsafe { &*Self::PTR }
999 }
1000}
1001impl core::fmt::Debug for TCON_TV0 {
1002 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1003 f.debug_struct("TCON_TV0").finish()
1004 }
1005}
1006#[doc = "Timing COntroller TV"]
1007pub mod tcon_tv0;
1008#[doc = "TV Encoder TOP"]
1009pub struct TVE_TOP {
1010 _marker: PhantomData<*const ()>,
1011}
1012unsafe impl Send for TVE_TOP {}
1013impl TVE_TOP {
1014 #[doc = r"Pointer to the register block"]
1015 pub const PTR: *const tve_top::RegisterBlock = 0x0560_0000 as *const _;
1016 #[doc = r"Return the pointer to the register block"]
1017 #[inline(always)]
1018 pub const fn ptr() -> *const tve_top::RegisterBlock {
1019 Self::PTR
1020 }
1021 #[doc = r" Steal an instance of this peripheral"]
1022 #[doc = r""]
1023 #[doc = r" # Safety"]
1024 #[doc = r""]
1025 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1026 #[doc = r" that may race with any existing instances, for example by only"]
1027 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1028 #[doc = r" original peripheral and using critical sections to coordinate"]
1029 #[doc = r" access between multiple new instances."]
1030 #[doc = r""]
1031 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1032 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1033 #[doc = r" no stolen instances are passed to such software."]
1034 pub unsafe fn steal() -> Self {
1035 Self {
1036 _marker: PhantomData,
1037 }
1038 }
1039}
1040impl Deref for TVE_TOP {
1041 type Target = tve_top::RegisterBlock;
1042 #[inline(always)]
1043 fn deref(&self) -> &Self::Target {
1044 unsafe { &*Self::PTR }
1045 }
1046}
1047impl core::fmt::Debug for TVE_TOP {
1048 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1049 f.debug_struct("TVE_TOP").finish()
1050 }
1051}
1052#[doc = "TV Encoder TOP"]
1053pub mod tve_top;
1054#[doc = "TV Encoder"]
1055pub struct TVE {
1056 _marker: PhantomData<*const ()>,
1057}
1058unsafe impl Send for TVE {}
1059impl TVE {
1060 #[doc = r"Pointer to the register block"]
1061 pub const PTR: *const tve::RegisterBlock = 0x0560_4000 as *const _;
1062 #[doc = r"Return the pointer to the register block"]
1063 #[inline(always)]
1064 pub const fn ptr() -> *const tve::RegisterBlock {
1065 Self::PTR
1066 }
1067 #[doc = r" Steal an instance of this peripheral"]
1068 #[doc = r""]
1069 #[doc = r" # Safety"]
1070 #[doc = r""]
1071 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1072 #[doc = r" that may race with any existing instances, for example by only"]
1073 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1074 #[doc = r" original peripheral and using critical sections to coordinate"]
1075 #[doc = r" access between multiple new instances."]
1076 #[doc = r""]
1077 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1078 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1079 #[doc = r" no stolen instances are passed to such software."]
1080 pub unsafe fn steal() -> Self {
1081 Self {
1082 _marker: PhantomData,
1083 }
1084 }
1085}
1086impl Deref for TVE {
1087 type Target = tve::RegisterBlock;
1088 #[inline(always)]
1089 fn deref(&self) -> &Self::Target {
1090 unsafe { &*Self::PTR }
1091 }
1092}
1093impl core::fmt::Debug for TVE {
1094 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1095 f.debug_struct("TVE").finish()
1096 }
1097}
1098#[doc = "TV Encoder"]
1099pub mod tve;
1100#[doc = "CMOS Sensor Interface Controller"]
1101pub struct CSIC {
1102 _marker: PhantomData<*const ()>,
1103}
1104unsafe impl Send for CSIC {}
1105impl CSIC {
1106 #[doc = r"Pointer to the register block"]
1107 pub const PTR: *const csic::RegisterBlock = 0x0580_0000 as *const _;
1108 #[doc = r"Return the pointer to the register block"]
1109 #[inline(always)]
1110 pub const fn ptr() -> *const csic::RegisterBlock {
1111 Self::PTR
1112 }
1113 #[doc = r" Steal an instance of this peripheral"]
1114 #[doc = r""]
1115 #[doc = r" # Safety"]
1116 #[doc = r""]
1117 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1118 #[doc = r" that may race with any existing instances, for example by only"]
1119 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1120 #[doc = r" original peripheral and using critical sections to coordinate"]
1121 #[doc = r" access between multiple new instances."]
1122 #[doc = r""]
1123 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1124 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1125 #[doc = r" no stolen instances are passed to such software."]
1126 pub unsafe fn steal() -> Self {
1127 Self {
1128 _marker: PhantomData,
1129 }
1130 }
1131}
1132impl Deref for CSIC {
1133 type Target = csic::RegisterBlock;
1134 #[inline(always)]
1135 fn deref(&self) -> &Self::Target {
1136 unsafe { &*Self::PTR }
1137 }
1138}
1139impl core::fmt::Debug for CSIC {
1140 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1141 f.debug_struct("CSIC").finish()
1142 }
1143}
1144#[doc = "CMOS Sensor Interface Controller"]
1145pub mod csic;
1146#[doc = "Television Decoder TOP"]
1147pub struct TVD_TOP {
1148 _marker: PhantomData<*const ()>,
1149}
1150unsafe impl Send for TVD_TOP {}
1151impl TVD_TOP {
1152 #[doc = r"Pointer to the register block"]
1153 pub const PTR: *const tvd_top::RegisterBlock = 0x05c0_0000 as *const _;
1154 #[doc = r"Return the pointer to the register block"]
1155 #[inline(always)]
1156 pub const fn ptr() -> *const tvd_top::RegisterBlock {
1157 Self::PTR
1158 }
1159 #[doc = r" Steal an instance of this peripheral"]
1160 #[doc = r""]
1161 #[doc = r" # Safety"]
1162 #[doc = r""]
1163 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1164 #[doc = r" that may race with any existing instances, for example by only"]
1165 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1166 #[doc = r" original peripheral and using critical sections to coordinate"]
1167 #[doc = r" access between multiple new instances."]
1168 #[doc = r""]
1169 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1170 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1171 #[doc = r" no stolen instances are passed to such software."]
1172 pub unsafe fn steal() -> Self {
1173 Self {
1174 _marker: PhantomData,
1175 }
1176 }
1177}
1178impl Deref for TVD_TOP {
1179 type Target = tvd_top::RegisterBlock;
1180 #[inline(always)]
1181 fn deref(&self) -> &Self::Target {
1182 unsafe { &*Self::PTR }
1183 }
1184}
1185impl core::fmt::Debug for TVD_TOP {
1186 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1187 f.debug_struct("TVD_TOP").finish()
1188 }
1189}
1190#[doc = "Television Decoder TOP"]
1191pub mod tvd_top;
1192#[doc = "Television Decoder"]
1193pub struct TVD0 {
1194 _marker: PhantomData<*const ()>,
1195}
1196unsafe impl Send for TVD0 {}
1197impl TVD0 {
1198 #[doc = r"Pointer to the register block"]
1199 pub const PTR: *const tvd0::RegisterBlock = 0x05c0_1000 as *const _;
1200 #[doc = r"Return the pointer to the register block"]
1201 #[inline(always)]
1202 pub const fn ptr() -> *const tvd0::RegisterBlock {
1203 Self::PTR
1204 }
1205 #[doc = r" Steal an instance of this peripheral"]
1206 #[doc = r""]
1207 #[doc = r" # Safety"]
1208 #[doc = r""]
1209 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1210 #[doc = r" that may race with any existing instances, for example by only"]
1211 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1212 #[doc = r" original peripheral and using critical sections to coordinate"]
1213 #[doc = r" access between multiple new instances."]
1214 #[doc = r""]
1215 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1216 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1217 #[doc = r" no stolen instances are passed to such software."]
1218 pub unsafe fn steal() -> Self {
1219 Self {
1220 _marker: PhantomData,
1221 }
1222 }
1223}
1224impl Deref for TVD0 {
1225 type Target = tvd0::RegisterBlock;
1226 #[inline(always)]
1227 fn deref(&self) -> &Self::Target {
1228 unsafe { &*Self::PTR }
1229 }
1230}
1231impl core::fmt::Debug for TVD0 {
1232 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1233 f.debug_struct("TVD0").finish()
1234 }
1235}
1236#[doc = "Television Decoder"]
1237pub mod tvd0;
1238#[doc = "SD/MMC Host Controller"]
1239pub struct SMHC0 {
1240 _marker: PhantomData<*const ()>,
1241}
1242unsafe impl Send for SMHC0 {}
1243impl SMHC0 {
1244 #[doc = r"Pointer to the register block"]
1245 pub const PTR: *const smhc::RegisterBlock = 0x0402_0000 as *const _;
1246 #[doc = r"Return the pointer to the register block"]
1247 #[inline(always)]
1248 pub const fn ptr() -> *const smhc::RegisterBlock {
1249 Self::PTR
1250 }
1251 #[doc = r" Steal an instance of this peripheral"]
1252 #[doc = r""]
1253 #[doc = r" # Safety"]
1254 #[doc = r""]
1255 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1256 #[doc = r" that may race with any existing instances, for example by only"]
1257 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1258 #[doc = r" original peripheral and using critical sections to coordinate"]
1259 #[doc = r" access between multiple new instances."]
1260 #[doc = r""]
1261 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1262 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1263 #[doc = r" no stolen instances are passed to such software."]
1264 pub unsafe fn steal() -> Self {
1265 Self {
1266 _marker: PhantomData,
1267 }
1268 }
1269}
1270impl Deref for SMHC0 {
1271 type Target = smhc::RegisterBlock;
1272 #[inline(always)]
1273 fn deref(&self) -> &Self::Target {
1274 unsafe { &*Self::PTR }
1275 }
1276}
1277impl core::fmt::Debug for SMHC0 {
1278 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1279 f.debug_struct("SMHC0").finish()
1280 }
1281}
1282#[doc = "SD/MMC Host Controller"]
1283pub struct SMHC1 {
1284 _marker: PhantomData<*const ()>,
1285}
1286unsafe impl Send for SMHC1 {}
1287impl SMHC1 {
1288 #[doc = r"Pointer to the register block"]
1289 pub const PTR: *const smhc::RegisterBlock = 0x0402_1000 as *const _;
1290 #[doc = r"Return the pointer to the register block"]
1291 #[inline(always)]
1292 pub const fn ptr() -> *const smhc::RegisterBlock {
1293 Self::PTR
1294 }
1295 #[doc = r" Steal an instance of this peripheral"]
1296 #[doc = r""]
1297 #[doc = r" # Safety"]
1298 #[doc = r""]
1299 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1300 #[doc = r" that may race with any existing instances, for example by only"]
1301 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1302 #[doc = r" original peripheral and using critical sections to coordinate"]
1303 #[doc = r" access between multiple new instances."]
1304 #[doc = r""]
1305 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1306 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1307 #[doc = r" no stolen instances are passed to such software."]
1308 pub unsafe fn steal() -> Self {
1309 Self {
1310 _marker: PhantomData,
1311 }
1312 }
1313}
1314impl Deref for SMHC1 {
1315 type Target = smhc::RegisterBlock;
1316 #[inline(always)]
1317 fn deref(&self) -> &Self::Target {
1318 unsafe { &*Self::PTR }
1319 }
1320}
1321impl core::fmt::Debug for SMHC1 {
1322 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1323 f.debug_struct("SMHC1").finish()
1324 }
1325}
1326#[doc = "SD/MMC Host Controller"]
1327pub struct SMHC2 {
1328 _marker: PhantomData<*const ()>,
1329}
1330unsafe impl Send for SMHC2 {}
1331impl SMHC2 {
1332 #[doc = r"Pointer to the register block"]
1333 pub const PTR: *const smhc::RegisterBlock = 0x0402_2000 as *const _;
1334 #[doc = r"Return the pointer to the register block"]
1335 #[inline(always)]
1336 pub const fn ptr() -> *const smhc::RegisterBlock {
1337 Self::PTR
1338 }
1339 #[doc = r" Steal an instance of this peripheral"]
1340 #[doc = r""]
1341 #[doc = r" # Safety"]
1342 #[doc = r""]
1343 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1344 #[doc = r" that may race with any existing instances, for example by only"]
1345 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1346 #[doc = r" original peripheral and using critical sections to coordinate"]
1347 #[doc = r" access between multiple new instances."]
1348 #[doc = r""]
1349 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1350 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1351 #[doc = r" no stolen instances are passed to such software."]
1352 pub unsafe fn steal() -> Self {
1353 Self {
1354 _marker: PhantomData,
1355 }
1356 }
1357}
1358impl Deref for SMHC2 {
1359 type Target = smhc::RegisterBlock;
1360 #[inline(always)]
1361 fn deref(&self) -> &Self::Target {
1362 unsafe { &*Self::PTR }
1363 }
1364}
1365impl core::fmt::Debug for SMHC2 {
1366 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1367 f.debug_struct("SMHC2").finish()
1368 }
1369}
1370#[doc = "SD/MMC Host Controller"]
1371pub mod smhc;
1372#[doc = "I2S/PCM"]
1373pub struct I2S_PCM0 {
1374 _marker: PhantomData<*const ()>,
1375}
1376unsafe impl Send for I2S_PCM0 {}
1377impl I2S_PCM0 {
1378 #[doc = r"Pointer to the register block"]
1379 pub const PTR: *const i2s_pcm::RegisterBlock = 0x0203_2000 as *const _;
1380 #[doc = r"Return the pointer to the register block"]
1381 #[inline(always)]
1382 pub const fn ptr() -> *const i2s_pcm::RegisterBlock {
1383 Self::PTR
1384 }
1385 #[doc = r" Steal an instance of this peripheral"]
1386 #[doc = r""]
1387 #[doc = r" # Safety"]
1388 #[doc = r""]
1389 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1390 #[doc = r" that may race with any existing instances, for example by only"]
1391 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1392 #[doc = r" original peripheral and using critical sections to coordinate"]
1393 #[doc = r" access between multiple new instances."]
1394 #[doc = r""]
1395 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1396 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1397 #[doc = r" no stolen instances are passed to such software."]
1398 pub unsafe fn steal() -> Self {
1399 Self {
1400 _marker: PhantomData,
1401 }
1402 }
1403}
1404impl Deref for I2S_PCM0 {
1405 type Target = i2s_pcm::RegisterBlock;
1406 #[inline(always)]
1407 fn deref(&self) -> &Self::Target {
1408 unsafe { &*Self::PTR }
1409 }
1410}
1411impl core::fmt::Debug for I2S_PCM0 {
1412 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1413 f.debug_struct("I2S_PCM0").finish()
1414 }
1415}
1416#[doc = "I2S/PCM"]
1417pub struct I2S_PCM1 {
1418 _marker: PhantomData<*const ()>,
1419}
1420unsafe impl Send for I2S_PCM1 {}
1421impl I2S_PCM1 {
1422 #[doc = r"Pointer to the register block"]
1423 pub const PTR: *const i2s_pcm::RegisterBlock = 0x0203_3000 as *const _;
1424 #[doc = r"Return the pointer to the register block"]
1425 #[inline(always)]
1426 pub const fn ptr() -> *const i2s_pcm::RegisterBlock {
1427 Self::PTR
1428 }
1429 #[doc = r" Steal an instance of this peripheral"]
1430 #[doc = r""]
1431 #[doc = r" # Safety"]
1432 #[doc = r""]
1433 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1434 #[doc = r" that may race with any existing instances, for example by only"]
1435 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1436 #[doc = r" original peripheral and using critical sections to coordinate"]
1437 #[doc = r" access between multiple new instances."]
1438 #[doc = r""]
1439 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1440 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1441 #[doc = r" no stolen instances are passed to such software."]
1442 pub unsafe fn steal() -> Self {
1443 Self {
1444 _marker: PhantomData,
1445 }
1446 }
1447}
1448impl Deref for I2S_PCM1 {
1449 type Target = i2s_pcm::RegisterBlock;
1450 #[inline(always)]
1451 fn deref(&self) -> &Self::Target {
1452 unsafe { &*Self::PTR }
1453 }
1454}
1455impl core::fmt::Debug for I2S_PCM1 {
1456 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1457 f.debug_struct("I2S_PCM1").finish()
1458 }
1459}
1460#[doc = "I2S/PCM"]
1461pub struct I2S_PCM2 {
1462 _marker: PhantomData<*const ()>,
1463}
1464unsafe impl Send for I2S_PCM2 {}
1465impl I2S_PCM2 {
1466 #[doc = r"Pointer to the register block"]
1467 pub const PTR: *const i2s_pcm::RegisterBlock = 0x0203_4000 as *const _;
1468 #[doc = r"Return the pointer to the register block"]
1469 #[inline(always)]
1470 pub const fn ptr() -> *const i2s_pcm::RegisterBlock {
1471 Self::PTR
1472 }
1473 #[doc = r" Steal an instance of this peripheral"]
1474 #[doc = r""]
1475 #[doc = r" # Safety"]
1476 #[doc = r""]
1477 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1478 #[doc = r" that may race with any existing instances, for example by only"]
1479 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1480 #[doc = r" original peripheral and using critical sections to coordinate"]
1481 #[doc = r" access between multiple new instances."]
1482 #[doc = r""]
1483 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1484 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1485 #[doc = r" no stolen instances are passed to such software."]
1486 pub unsafe fn steal() -> Self {
1487 Self {
1488 _marker: PhantomData,
1489 }
1490 }
1491}
1492impl Deref for I2S_PCM2 {
1493 type Target = i2s_pcm::RegisterBlock;
1494 #[inline(always)]
1495 fn deref(&self) -> &Self::Target {
1496 unsafe { &*Self::PTR }
1497 }
1498}
1499impl core::fmt::Debug for I2S_PCM2 {
1500 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1501 f.debug_struct("I2S_PCM2").finish()
1502 }
1503}
1504#[doc = "I2S/PCM"]
1505pub mod i2s_pcm;
1506#[doc = "DMIC"]
1507pub struct DMIC {
1508 _marker: PhantomData<*const ()>,
1509}
1510unsafe impl Send for DMIC {}
1511impl DMIC {
1512 #[doc = r"Pointer to the register block"]
1513 pub const PTR: *const dmic::RegisterBlock = 0x0203_1000 as *const _;
1514 #[doc = r"Return the pointer to the register block"]
1515 #[inline(always)]
1516 pub const fn ptr() -> *const dmic::RegisterBlock {
1517 Self::PTR
1518 }
1519 #[doc = r" Steal an instance of this peripheral"]
1520 #[doc = r""]
1521 #[doc = r" # Safety"]
1522 #[doc = r""]
1523 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1524 #[doc = r" that may race with any existing instances, for example by only"]
1525 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1526 #[doc = r" original peripheral and using critical sections to coordinate"]
1527 #[doc = r" access between multiple new instances."]
1528 #[doc = r""]
1529 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1530 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1531 #[doc = r" no stolen instances are passed to such software."]
1532 pub unsafe fn steal() -> Self {
1533 Self {
1534 _marker: PhantomData,
1535 }
1536 }
1537}
1538impl Deref for DMIC {
1539 type Target = dmic::RegisterBlock;
1540 #[inline(always)]
1541 fn deref(&self) -> &Self::Target {
1542 unsafe { &*Self::PTR }
1543 }
1544}
1545impl core::fmt::Debug for DMIC {
1546 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1547 f.debug_struct("DMIC").finish()
1548 }
1549}
1550#[doc = "DMIC"]
1551pub mod dmic;
1552#[doc = "One Wire Audio"]
1553pub struct OWA {
1554 _marker: PhantomData<*const ()>,
1555}
1556unsafe impl Send for OWA {}
1557impl OWA {
1558 #[doc = r"Pointer to the register block"]
1559 pub const PTR: *const owa::RegisterBlock = 0x0203_6000 as *const _;
1560 #[doc = r"Return the pointer to the register block"]
1561 #[inline(always)]
1562 pub const fn ptr() -> *const owa::RegisterBlock {
1563 Self::PTR
1564 }
1565 #[doc = r" Steal an instance of this peripheral"]
1566 #[doc = r""]
1567 #[doc = r" # Safety"]
1568 #[doc = r""]
1569 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1570 #[doc = r" that may race with any existing instances, for example by only"]
1571 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1572 #[doc = r" original peripheral and using critical sections to coordinate"]
1573 #[doc = r" access between multiple new instances."]
1574 #[doc = r""]
1575 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1576 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1577 #[doc = r" no stolen instances are passed to such software."]
1578 pub unsafe fn steal() -> Self {
1579 Self {
1580 _marker: PhantomData,
1581 }
1582 }
1583}
1584impl Deref for OWA {
1585 type Target = owa::RegisterBlock;
1586 #[inline(always)]
1587 fn deref(&self) -> &Self::Target {
1588 unsafe { &*Self::PTR }
1589 }
1590}
1591impl core::fmt::Debug for OWA {
1592 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1593 f.debug_struct("OWA").finish()
1594 }
1595}
1596#[doc = "One Wire Audio"]
1597pub mod owa;
1598#[doc = "Audio Codec"]
1599pub struct AUDIO_CODEC {
1600 _marker: PhantomData<*const ()>,
1601}
1602unsafe impl Send for AUDIO_CODEC {}
1603impl AUDIO_CODEC {
1604 #[doc = r"Pointer to the register block"]
1605 pub const PTR: *const audio_codec::RegisterBlock = 0x0203_0000 as *const _;
1606 #[doc = r"Return the pointer to the register block"]
1607 #[inline(always)]
1608 pub const fn ptr() -> *const audio_codec::RegisterBlock {
1609 Self::PTR
1610 }
1611 #[doc = r" Steal an instance of this peripheral"]
1612 #[doc = r""]
1613 #[doc = r" # Safety"]
1614 #[doc = r""]
1615 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1616 #[doc = r" that may race with any existing instances, for example by only"]
1617 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1618 #[doc = r" original peripheral and using critical sections to coordinate"]
1619 #[doc = r" access between multiple new instances."]
1620 #[doc = r""]
1621 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1622 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1623 #[doc = r" no stolen instances are passed to such software."]
1624 pub unsafe fn steal() -> Self {
1625 Self {
1626 _marker: PhantomData,
1627 }
1628 }
1629}
1630impl Deref for AUDIO_CODEC {
1631 type Target = audio_codec::RegisterBlock;
1632 #[inline(always)]
1633 fn deref(&self) -> &Self::Target {
1634 unsafe { &*Self::PTR }
1635 }
1636}
1637impl core::fmt::Debug for AUDIO_CODEC {
1638 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1639 f.debug_struct("AUDIO_CODEC").finish()
1640 }
1641}
1642#[doc = "Audio Codec"]
1643pub mod audio_codec;
1644#[doc = "Two Wire Interface"]
1645pub struct TWI0 {
1646 _marker: PhantomData<*const ()>,
1647}
1648unsafe impl Send for TWI0 {}
1649impl TWI0 {
1650 #[doc = r"Pointer to the register block"]
1651 pub const PTR: *const twi::RegisterBlock = 0x0250_2000 as *const _;
1652 #[doc = r"Return the pointer to the register block"]
1653 #[inline(always)]
1654 pub const fn ptr() -> *const twi::RegisterBlock {
1655 Self::PTR
1656 }
1657 #[doc = r" Steal an instance of this peripheral"]
1658 #[doc = r""]
1659 #[doc = r" # Safety"]
1660 #[doc = r""]
1661 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1662 #[doc = r" that may race with any existing instances, for example by only"]
1663 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1664 #[doc = r" original peripheral and using critical sections to coordinate"]
1665 #[doc = r" access between multiple new instances."]
1666 #[doc = r""]
1667 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1668 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1669 #[doc = r" no stolen instances are passed to such software."]
1670 pub unsafe fn steal() -> Self {
1671 Self {
1672 _marker: PhantomData,
1673 }
1674 }
1675}
1676impl Deref for TWI0 {
1677 type Target = twi::RegisterBlock;
1678 #[inline(always)]
1679 fn deref(&self) -> &Self::Target {
1680 unsafe { &*Self::PTR }
1681 }
1682}
1683impl core::fmt::Debug for TWI0 {
1684 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1685 f.debug_struct("TWI0").finish()
1686 }
1687}
1688#[doc = "Two Wire Interface"]
1689pub struct TWI1 {
1690 _marker: PhantomData<*const ()>,
1691}
1692unsafe impl Send for TWI1 {}
1693impl TWI1 {
1694 #[doc = r"Pointer to the register block"]
1695 pub const PTR: *const twi::RegisterBlock = 0x0250_2400 as *const _;
1696 #[doc = r"Return the pointer to the register block"]
1697 #[inline(always)]
1698 pub const fn ptr() -> *const twi::RegisterBlock {
1699 Self::PTR
1700 }
1701 #[doc = r" Steal an instance of this peripheral"]
1702 #[doc = r""]
1703 #[doc = r" # Safety"]
1704 #[doc = r""]
1705 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1706 #[doc = r" that may race with any existing instances, for example by only"]
1707 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1708 #[doc = r" original peripheral and using critical sections to coordinate"]
1709 #[doc = r" access between multiple new instances."]
1710 #[doc = r""]
1711 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1712 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1713 #[doc = r" no stolen instances are passed to such software."]
1714 pub unsafe fn steal() -> Self {
1715 Self {
1716 _marker: PhantomData,
1717 }
1718 }
1719}
1720impl Deref for TWI1 {
1721 type Target = twi::RegisterBlock;
1722 #[inline(always)]
1723 fn deref(&self) -> &Self::Target {
1724 unsafe { &*Self::PTR }
1725 }
1726}
1727impl core::fmt::Debug for TWI1 {
1728 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1729 f.debug_struct("TWI1").finish()
1730 }
1731}
1732#[doc = "Two Wire Interface"]
1733pub struct TWI2 {
1734 _marker: PhantomData<*const ()>,
1735}
1736unsafe impl Send for TWI2 {}
1737impl TWI2 {
1738 #[doc = r"Pointer to the register block"]
1739 pub const PTR: *const twi::RegisterBlock = 0x0250_2800 as *const _;
1740 #[doc = r"Return the pointer to the register block"]
1741 #[inline(always)]
1742 pub const fn ptr() -> *const twi::RegisterBlock {
1743 Self::PTR
1744 }
1745 #[doc = r" Steal an instance of this peripheral"]
1746 #[doc = r""]
1747 #[doc = r" # Safety"]
1748 #[doc = r""]
1749 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1750 #[doc = r" that may race with any existing instances, for example by only"]
1751 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1752 #[doc = r" original peripheral and using critical sections to coordinate"]
1753 #[doc = r" access between multiple new instances."]
1754 #[doc = r""]
1755 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1756 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1757 #[doc = r" no stolen instances are passed to such software."]
1758 pub unsafe fn steal() -> Self {
1759 Self {
1760 _marker: PhantomData,
1761 }
1762 }
1763}
1764impl Deref for TWI2 {
1765 type Target = twi::RegisterBlock;
1766 #[inline(always)]
1767 fn deref(&self) -> &Self::Target {
1768 unsafe { &*Self::PTR }
1769 }
1770}
1771impl core::fmt::Debug for TWI2 {
1772 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1773 f.debug_struct("TWI2").finish()
1774 }
1775}
1776#[doc = "Two Wire Interface"]
1777pub struct TWI3 {
1778 _marker: PhantomData<*const ()>,
1779}
1780unsafe impl Send for TWI3 {}
1781impl TWI3 {
1782 #[doc = r"Pointer to the register block"]
1783 pub const PTR: *const twi::RegisterBlock = 0x0250_2c00 as *const _;
1784 #[doc = r"Return the pointer to the register block"]
1785 #[inline(always)]
1786 pub const fn ptr() -> *const twi::RegisterBlock {
1787 Self::PTR
1788 }
1789 #[doc = r" Steal an instance of this peripheral"]
1790 #[doc = r""]
1791 #[doc = r" # Safety"]
1792 #[doc = r""]
1793 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1794 #[doc = r" that may race with any existing instances, for example by only"]
1795 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1796 #[doc = r" original peripheral and using critical sections to coordinate"]
1797 #[doc = r" access between multiple new instances."]
1798 #[doc = r""]
1799 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1800 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1801 #[doc = r" no stolen instances are passed to such software."]
1802 pub unsafe fn steal() -> Self {
1803 Self {
1804 _marker: PhantomData,
1805 }
1806 }
1807}
1808impl Deref for TWI3 {
1809 type Target = twi::RegisterBlock;
1810 #[inline(always)]
1811 fn deref(&self) -> &Self::Target {
1812 unsafe { &*Self::PTR }
1813 }
1814}
1815impl core::fmt::Debug for TWI3 {
1816 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1817 f.debug_struct("TWI3").finish()
1818 }
1819}
1820#[doc = "Two Wire Interface"]
1821pub mod twi;
1822#[doc = "Universal Asynchronous Receiver Transmitter"]
1823pub struct UART0 {
1824 _marker: PhantomData<*const ()>,
1825}
1826unsafe impl Send for UART0 {}
1827impl UART0 {
1828 #[doc = r"Pointer to the register block"]
1829 pub const PTR: *const uart::RegisterBlock = 0x0250_0000 as *const _;
1830 #[doc = r"Return the pointer to the register block"]
1831 #[inline(always)]
1832 pub const fn ptr() -> *const uart::RegisterBlock {
1833 Self::PTR
1834 }
1835 #[doc = r" Steal an instance of this peripheral"]
1836 #[doc = r""]
1837 #[doc = r" # Safety"]
1838 #[doc = r""]
1839 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1840 #[doc = r" that may race with any existing instances, for example by only"]
1841 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1842 #[doc = r" original peripheral and using critical sections to coordinate"]
1843 #[doc = r" access between multiple new instances."]
1844 #[doc = r""]
1845 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1846 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1847 #[doc = r" no stolen instances are passed to such software."]
1848 pub unsafe fn steal() -> Self {
1849 Self {
1850 _marker: PhantomData,
1851 }
1852 }
1853}
1854impl Deref for UART0 {
1855 type Target = uart::RegisterBlock;
1856 #[inline(always)]
1857 fn deref(&self) -> &Self::Target {
1858 unsafe { &*Self::PTR }
1859 }
1860}
1861impl core::fmt::Debug for UART0 {
1862 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1863 f.debug_struct("UART0").finish()
1864 }
1865}
1866#[doc = "Universal Asynchronous Receiver Transmitter"]
1867pub struct UART1 {
1868 _marker: PhantomData<*const ()>,
1869}
1870unsafe impl Send for UART1 {}
1871impl UART1 {
1872 #[doc = r"Pointer to the register block"]
1873 pub const PTR: *const uart::RegisterBlock = 0x0250_0400 as *const _;
1874 #[doc = r"Return the pointer to the register block"]
1875 #[inline(always)]
1876 pub const fn ptr() -> *const uart::RegisterBlock {
1877 Self::PTR
1878 }
1879 #[doc = r" Steal an instance of this peripheral"]
1880 #[doc = r""]
1881 #[doc = r" # Safety"]
1882 #[doc = r""]
1883 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1884 #[doc = r" that may race with any existing instances, for example by only"]
1885 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1886 #[doc = r" original peripheral and using critical sections to coordinate"]
1887 #[doc = r" access between multiple new instances."]
1888 #[doc = r""]
1889 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1890 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1891 #[doc = r" no stolen instances are passed to such software."]
1892 pub unsafe fn steal() -> Self {
1893 Self {
1894 _marker: PhantomData,
1895 }
1896 }
1897}
1898impl Deref for UART1 {
1899 type Target = uart::RegisterBlock;
1900 #[inline(always)]
1901 fn deref(&self) -> &Self::Target {
1902 unsafe { &*Self::PTR }
1903 }
1904}
1905impl core::fmt::Debug for UART1 {
1906 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1907 f.debug_struct("UART1").finish()
1908 }
1909}
1910#[doc = "Universal Asynchronous Receiver Transmitter"]
1911pub struct UART2 {
1912 _marker: PhantomData<*const ()>,
1913}
1914unsafe impl Send for UART2 {}
1915impl UART2 {
1916 #[doc = r"Pointer to the register block"]
1917 pub const PTR: *const uart::RegisterBlock = 0x0250_0800 as *const _;
1918 #[doc = r"Return the pointer to the register block"]
1919 #[inline(always)]
1920 pub const fn ptr() -> *const uart::RegisterBlock {
1921 Self::PTR
1922 }
1923 #[doc = r" Steal an instance of this peripheral"]
1924 #[doc = r""]
1925 #[doc = r" # Safety"]
1926 #[doc = r""]
1927 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1928 #[doc = r" that may race with any existing instances, for example by only"]
1929 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1930 #[doc = r" original peripheral and using critical sections to coordinate"]
1931 #[doc = r" access between multiple new instances."]
1932 #[doc = r""]
1933 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1934 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1935 #[doc = r" no stolen instances are passed to such software."]
1936 pub unsafe fn steal() -> Self {
1937 Self {
1938 _marker: PhantomData,
1939 }
1940 }
1941}
1942impl Deref for UART2 {
1943 type Target = uart::RegisterBlock;
1944 #[inline(always)]
1945 fn deref(&self) -> &Self::Target {
1946 unsafe { &*Self::PTR }
1947 }
1948}
1949impl core::fmt::Debug for UART2 {
1950 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1951 f.debug_struct("UART2").finish()
1952 }
1953}
1954#[doc = "Universal Asynchronous Receiver Transmitter"]
1955pub struct UART3 {
1956 _marker: PhantomData<*const ()>,
1957}
1958unsafe impl Send for UART3 {}
1959impl UART3 {
1960 #[doc = r"Pointer to the register block"]
1961 pub const PTR: *const uart::RegisterBlock = 0x0250_0c00 as *const _;
1962 #[doc = r"Return the pointer to the register block"]
1963 #[inline(always)]
1964 pub const fn ptr() -> *const uart::RegisterBlock {
1965 Self::PTR
1966 }
1967 #[doc = r" Steal an instance of this peripheral"]
1968 #[doc = r""]
1969 #[doc = r" # Safety"]
1970 #[doc = r""]
1971 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1972 #[doc = r" that may race with any existing instances, for example by only"]
1973 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1974 #[doc = r" original peripheral and using critical sections to coordinate"]
1975 #[doc = r" access between multiple new instances."]
1976 #[doc = r""]
1977 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1978 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1979 #[doc = r" no stolen instances are passed to such software."]
1980 pub unsafe fn steal() -> Self {
1981 Self {
1982 _marker: PhantomData,
1983 }
1984 }
1985}
1986impl Deref for UART3 {
1987 type Target = uart::RegisterBlock;
1988 #[inline(always)]
1989 fn deref(&self) -> &Self::Target {
1990 unsafe { &*Self::PTR }
1991 }
1992}
1993impl core::fmt::Debug for UART3 {
1994 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1995 f.debug_struct("UART3").finish()
1996 }
1997}
1998#[doc = "Universal Asynchronous Receiver Transmitter"]
1999pub struct UART4 {
2000 _marker: PhantomData<*const ()>,
2001}
2002unsafe impl Send for UART4 {}
2003impl UART4 {
2004 #[doc = r"Pointer to the register block"]
2005 pub const PTR: *const uart::RegisterBlock = 0x0250_1000 as *const _;
2006 #[doc = r"Return the pointer to the register block"]
2007 #[inline(always)]
2008 pub const fn ptr() -> *const uart::RegisterBlock {
2009 Self::PTR
2010 }
2011 #[doc = r" Steal an instance of this peripheral"]
2012 #[doc = r""]
2013 #[doc = r" # Safety"]
2014 #[doc = r""]
2015 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2016 #[doc = r" that may race with any existing instances, for example by only"]
2017 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2018 #[doc = r" original peripheral and using critical sections to coordinate"]
2019 #[doc = r" access between multiple new instances."]
2020 #[doc = r""]
2021 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2022 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2023 #[doc = r" no stolen instances are passed to such software."]
2024 pub unsafe fn steal() -> Self {
2025 Self {
2026 _marker: PhantomData,
2027 }
2028 }
2029}
2030impl Deref for UART4 {
2031 type Target = uart::RegisterBlock;
2032 #[inline(always)]
2033 fn deref(&self) -> &Self::Target {
2034 unsafe { &*Self::PTR }
2035 }
2036}
2037impl core::fmt::Debug for UART4 {
2038 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2039 f.debug_struct("UART4").finish()
2040 }
2041}
2042#[doc = "Universal Asynchronous Receiver Transmitter"]
2043pub struct UART5 {
2044 _marker: PhantomData<*const ()>,
2045}
2046unsafe impl Send for UART5 {}
2047impl UART5 {
2048 #[doc = r"Pointer to the register block"]
2049 pub const PTR: *const uart::RegisterBlock = 0x0250_1400 as *const _;
2050 #[doc = r"Return the pointer to the register block"]
2051 #[inline(always)]
2052 pub const fn ptr() -> *const uart::RegisterBlock {
2053 Self::PTR
2054 }
2055 #[doc = r" Steal an instance of this peripheral"]
2056 #[doc = r""]
2057 #[doc = r" # Safety"]
2058 #[doc = r""]
2059 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2060 #[doc = r" that may race with any existing instances, for example by only"]
2061 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2062 #[doc = r" original peripheral and using critical sections to coordinate"]
2063 #[doc = r" access between multiple new instances."]
2064 #[doc = r""]
2065 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2066 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2067 #[doc = r" no stolen instances are passed to such software."]
2068 pub unsafe fn steal() -> Self {
2069 Self {
2070 _marker: PhantomData,
2071 }
2072 }
2073}
2074impl Deref for UART5 {
2075 type Target = uart::RegisterBlock;
2076 #[inline(always)]
2077 fn deref(&self) -> &Self::Target {
2078 unsafe { &*Self::PTR }
2079 }
2080}
2081impl core::fmt::Debug for UART5 {
2082 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2083 f.debug_struct("UART5").finish()
2084 }
2085}
2086#[doc = "Universal Asynchronous Receiver Transmitter"]
2087pub mod uart;
2088#[doc = "Serial Peripheral Interface"]
2089pub struct SPI0 {
2090 _marker: PhantomData<*const ()>,
2091}
2092unsafe impl Send for SPI0 {}
2093impl SPI0 {
2094 #[doc = r"Pointer to the register block"]
2095 pub const PTR: *const spi0::RegisterBlock = 0x0402_5000 as *const _;
2096 #[doc = r"Return the pointer to the register block"]
2097 #[inline(always)]
2098 pub const fn ptr() -> *const spi0::RegisterBlock {
2099 Self::PTR
2100 }
2101 #[doc = r" Steal an instance of this peripheral"]
2102 #[doc = r""]
2103 #[doc = r" # Safety"]
2104 #[doc = r""]
2105 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2106 #[doc = r" that may race with any existing instances, for example by only"]
2107 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2108 #[doc = r" original peripheral and using critical sections to coordinate"]
2109 #[doc = r" access between multiple new instances."]
2110 #[doc = r""]
2111 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2112 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2113 #[doc = r" no stolen instances are passed to such software."]
2114 pub unsafe fn steal() -> Self {
2115 Self {
2116 _marker: PhantomData,
2117 }
2118 }
2119}
2120impl Deref for SPI0 {
2121 type Target = spi0::RegisterBlock;
2122 #[inline(always)]
2123 fn deref(&self) -> &Self::Target {
2124 unsafe { &*Self::PTR }
2125 }
2126}
2127impl core::fmt::Debug for SPI0 {
2128 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2129 f.debug_struct("SPI0").finish()
2130 }
2131}
2132#[doc = "Serial Peripheral Interface"]
2133pub mod spi0;
2134#[doc = "Serial Peripheral Interface Display Bus Interface"]
2135pub struct SPI_DBI {
2136 _marker: PhantomData<*const ()>,
2137}
2138unsafe impl Send for SPI_DBI {}
2139impl SPI_DBI {
2140 #[doc = r"Pointer to the register block"]
2141 pub const PTR: *const spi_dbi::RegisterBlock = 0x0402_6000 as *const _;
2142 #[doc = r"Return the pointer to the register block"]
2143 #[inline(always)]
2144 pub const fn ptr() -> *const spi_dbi::RegisterBlock {
2145 Self::PTR
2146 }
2147 #[doc = r" Steal an instance of this peripheral"]
2148 #[doc = r""]
2149 #[doc = r" # Safety"]
2150 #[doc = r""]
2151 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2152 #[doc = r" that may race with any existing instances, for example by only"]
2153 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2154 #[doc = r" original peripheral and using critical sections to coordinate"]
2155 #[doc = r" access between multiple new instances."]
2156 #[doc = r""]
2157 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2158 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2159 #[doc = r" no stolen instances are passed to such software."]
2160 pub unsafe fn steal() -> Self {
2161 Self {
2162 _marker: PhantomData,
2163 }
2164 }
2165}
2166impl Deref for SPI_DBI {
2167 type Target = spi_dbi::RegisterBlock;
2168 #[inline(always)]
2169 fn deref(&self) -> &Self::Target {
2170 unsafe { &*Self::PTR }
2171 }
2172}
2173impl core::fmt::Debug for SPI_DBI {
2174 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2175 f.debug_struct("SPI_DBI").finish()
2176 }
2177}
2178#[doc = "Serial Peripheral Interface Display Bus Interface"]
2179pub mod spi_dbi;
2180#[doc = "USB2.0 HOST"]
2181pub struct USB1 {
2182 _marker: PhantomData<*const ()>,
2183}
2184unsafe impl Send for USB1 {}
2185impl USB1 {
2186 #[doc = r"Pointer to the register block"]
2187 pub const PTR: *const usb1::RegisterBlock = 0x0420_0000 as *const _;
2188 #[doc = r"Return the pointer to the register block"]
2189 #[inline(always)]
2190 pub const fn ptr() -> *const usb1::RegisterBlock {
2191 Self::PTR
2192 }
2193 #[doc = r" Steal an instance of this peripheral"]
2194 #[doc = r""]
2195 #[doc = r" # Safety"]
2196 #[doc = r""]
2197 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2198 #[doc = r" that may race with any existing instances, for example by only"]
2199 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2200 #[doc = r" original peripheral and using critical sections to coordinate"]
2201 #[doc = r" access between multiple new instances."]
2202 #[doc = r""]
2203 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2204 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2205 #[doc = r" no stolen instances are passed to such software."]
2206 pub unsafe fn steal() -> Self {
2207 Self {
2208 _marker: PhantomData,
2209 }
2210 }
2211}
2212impl Deref for USB1 {
2213 type Target = usb1::RegisterBlock;
2214 #[inline(always)]
2215 fn deref(&self) -> &Self::Target {
2216 unsafe { &*Self::PTR }
2217 }
2218}
2219impl core::fmt::Debug for USB1 {
2220 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2221 f.debug_struct("USB1").finish()
2222 }
2223}
2224#[doc = "USB2.0 HOST"]
2225pub mod usb1;
2226#[doc = "Gerneral Purpose Input/Output"]
2227pub struct GPIO {
2228 _marker: PhantomData<*const ()>,
2229}
2230unsafe impl Send for GPIO {}
2231impl GPIO {
2232 #[doc = r"Pointer to the register block"]
2233 pub const PTR: *const gpio::RegisterBlock = 0x0200_0000 as *const _;
2234 #[doc = r"Return the pointer to the register block"]
2235 #[inline(always)]
2236 pub const fn ptr() -> *const gpio::RegisterBlock {
2237 Self::PTR
2238 }
2239 #[doc = r" Steal an instance of this peripheral"]
2240 #[doc = r""]
2241 #[doc = r" # Safety"]
2242 #[doc = r""]
2243 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2244 #[doc = r" that may race with any existing instances, for example by only"]
2245 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2246 #[doc = r" original peripheral and using critical sections to coordinate"]
2247 #[doc = r" access between multiple new instances."]
2248 #[doc = r""]
2249 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2250 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2251 #[doc = r" no stolen instances are passed to such software."]
2252 pub unsafe fn steal() -> Self {
2253 Self {
2254 _marker: PhantomData,
2255 }
2256 }
2257}
2258impl Deref for GPIO {
2259 type Target = gpio::RegisterBlock;
2260 #[inline(always)]
2261 fn deref(&self) -> &Self::Target {
2262 unsafe { &*Self::PTR }
2263 }
2264}
2265impl core::fmt::Debug for GPIO {
2266 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2267 f.debug_struct("GPIO").finish()
2268 }
2269}
2270#[doc = "Gerneral Purpose Input/Output"]
2271pub mod gpio;
2272#[doc = "General Purpose ADC"]
2273pub struct GPADC {
2274 _marker: PhantomData<*const ()>,
2275}
2276unsafe impl Send for GPADC {}
2277impl GPADC {
2278 #[doc = r"Pointer to the register block"]
2279 pub const PTR: *const gpadc::RegisterBlock = 0x0200_9000 as *const _;
2280 #[doc = r"Return the pointer to the register block"]
2281 #[inline(always)]
2282 pub const fn ptr() -> *const gpadc::RegisterBlock {
2283 Self::PTR
2284 }
2285 #[doc = r" Steal an instance of this peripheral"]
2286 #[doc = r""]
2287 #[doc = r" # Safety"]
2288 #[doc = r""]
2289 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2290 #[doc = r" that may race with any existing instances, for example by only"]
2291 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2292 #[doc = r" original peripheral and using critical sections to coordinate"]
2293 #[doc = r" access between multiple new instances."]
2294 #[doc = r""]
2295 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2296 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2297 #[doc = r" no stolen instances are passed to such software."]
2298 pub unsafe fn steal() -> Self {
2299 Self {
2300 _marker: PhantomData,
2301 }
2302 }
2303}
2304impl Deref for GPADC {
2305 type Target = gpadc::RegisterBlock;
2306 #[inline(always)]
2307 fn deref(&self) -> &Self::Target {
2308 unsafe { &*Self::PTR }
2309 }
2310}
2311impl core::fmt::Debug for GPADC {
2312 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2313 f.debug_struct("GPADC").finish()
2314 }
2315}
2316#[doc = "General Purpose ADC"]
2317pub mod gpadc;
2318#[doc = "Touch Panel ADC"]
2319pub struct TPADC {
2320 _marker: PhantomData<*const ()>,
2321}
2322unsafe impl Send for TPADC {}
2323impl TPADC {
2324 #[doc = r"Pointer to the register block"]
2325 pub const PTR: *const tpadc::RegisterBlock = 0x0200_9c00 as *const _;
2326 #[doc = r"Return the pointer to the register block"]
2327 #[inline(always)]
2328 pub const fn ptr() -> *const tpadc::RegisterBlock {
2329 Self::PTR
2330 }
2331 #[doc = r" Steal an instance of this peripheral"]
2332 #[doc = r""]
2333 #[doc = r" # Safety"]
2334 #[doc = r""]
2335 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2336 #[doc = r" that may race with any existing instances, for example by only"]
2337 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2338 #[doc = r" original peripheral and using critical sections to coordinate"]
2339 #[doc = r" access between multiple new instances."]
2340 #[doc = r""]
2341 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2342 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2343 #[doc = r" no stolen instances are passed to such software."]
2344 pub unsafe fn steal() -> Self {
2345 Self {
2346 _marker: PhantomData,
2347 }
2348 }
2349}
2350impl Deref for TPADC {
2351 type Target = tpadc::RegisterBlock;
2352 #[inline(always)]
2353 fn deref(&self) -> &Self::Target {
2354 unsafe { &*Self::PTR }
2355 }
2356}
2357impl core::fmt::Debug for TPADC {
2358 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2359 f.debug_struct("TPADC").finish()
2360 }
2361}
2362#[doc = "Touch Panel ADC"]
2363pub mod tpadc;
2364#[doc = "Low Rate ADC"]
2365pub struct LRADC {
2366 _marker: PhantomData<*const ()>,
2367}
2368unsafe impl Send for LRADC {}
2369impl LRADC {
2370 #[doc = r"Pointer to the register block"]
2371 pub const PTR: *const lradc::RegisterBlock = 0x0200_9800 as *const _;
2372 #[doc = r"Return the pointer to the register block"]
2373 #[inline(always)]
2374 pub const fn ptr() -> *const lradc::RegisterBlock {
2375 Self::PTR
2376 }
2377 #[doc = r" Steal an instance of this peripheral"]
2378 #[doc = r""]
2379 #[doc = r" # Safety"]
2380 #[doc = r""]
2381 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2382 #[doc = r" that may race with any existing instances, for example by only"]
2383 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2384 #[doc = r" original peripheral and using critical sections to coordinate"]
2385 #[doc = r" access between multiple new instances."]
2386 #[doc = r""]
2387 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2388 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2389 #[doc = r" no stolen instances are passed to such software."]
2390 pub unsafe fn steal() -> Self {
2391 Self {
2392 _marker: PhantomData,
2393 }
2394 }
2395}
2396impl Deref for LRADC {
2397 type Target = lradc::RegisterBlock;
2398 #[inline(always)]
2399 fn deref(&self) -> &Self::Target {
2400 unsafe { &*Self::PTR }
2401 }
2402}
2403impl core::fmt::Debug for LRADC {
2404 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2405 f.debug_struct("LRADC").finish()
2406 }
2407}
2408#[doc = "Low Rate ADC"]
2409pub mod lradc;
2410#[doc = "Pulse Width Modulation"]
2411pub struct PWM {
2412 _marker: PhantomData<*const ()>,
2413}
2414unsafe impl Send for PWM {}
2415impl PWM {
2416 #[doc = r"Pointer to the register block"]
2417 pub const PTR: *const pwm::RegisterBlock = 0x0200_0c00 as *const _;
2418 #[doc = r"Return the pointer to the register block"]
2419 #[inline(always)]
2420 pub const fn ptr() -> *const pwm::RegisterBlock {
2421 Self::PTR
2422 }
2423 #[doc = r" Steal an instance of this peripheral"]
2424 #[doc = r""]
2425 #[doc = r" # Safety"]
2426 #[doc = r""]
2427 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2428 #[doc = r" that may race with any existing instances, for example by only"]
2429 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2430 #[doc = r" original peripheral and using critical sections to coordinate"]
2431 #[doc = r" access between multiple new instances."]
2432 #[doc = r""]
2433 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2434 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2435 #[doc = r" no stolen instances are passed to such software."]
2436 pub unsafe fn steal() -> Self {
2437 Self {
2438 _marker: PhantomData,
2439 }
2440 }
2441}
2442impl Deref for PWM {
2443 type Target = pwm::RegisterBlock;
2444 #[inline(always)]
2445 fn deref(&self) -> &Self::Target {
2446 unsafe { &*Self::PTR }
2447 }
2448}
2449impl core::fmt::Debug for PWM {
2450 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2451 f.debug_struct("PWM").finish()
2452 }
2453}
2454#[doc = "Pulse Width Modulation"]
2455pub mod pwm;
2456#[doc = "LEDC"]
2457pub struct LEDC {
2458 _marker: PhantomData<*const ()>,
2459}
2460unsafe impl Send for LEDC {}
2461impl LEDC {
2462 #[doc = r"Pointer to the register block"]
2463 pub const PTR: *const ledc::RegisterBlock = 0x0200_8000 as *const _;
2464 #[doc = r"Return the pointer to the register block"]
2465 #[inline(always)]
2466 pub const fn ptr() -> *const ledc::RegisterBlock {
2467 Self::PTR
2468 }
2469 #[doc = r" Steal an instance of this peripheral"]
2470 #[doc = r""]
2471 #[doc = r" # Safety"]
2472 #[doc = r""]
2473 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2474 #[doc = r" that may race with any existing instances, for example by only"]
2475 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2476 #[doc = r" original peripheral and using critical sections to coordinate"]
2477 #[doc = r" access between multiple new instances."]
2478 #[doc = r""]
2479 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2480 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2481 #[doc = r" no stolen instances are passed to such software."]
2482 pub unsafe fn steal() -> Self {
2483 Self {
2484 _marker: PhantomData,
2485 }
2486 }
2487}
2488impl Deref for LEDC {
2489 type Target = ledc::RegisterBlock;
2490 #[inline(always)]
2491 fn deref(&self) -> &Self::Target {
2492 unsafe { &*Self::PTR }
2493 }
2494}
2495impl core::fmt::Debug for LEDC {
2496 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2497 f.debug_struct("LEDC").finish()
2498 }
2499}
2500#[doc = "LEDC"]
2501pub mod ledc;
2502#[doc = "Ethernet Medium Access Controller"]
2503pub struct EMAC {
2504 _marker: PhantomData<*const ()>,
2505}
2506unsafe impl Send for EMAC {}
2507impl EMAC {
2508 #[doc = r"Pointer to the register block"]
2509 pub const PTR: *const emac::RegisterBlock = 0x0450_0000 as *const _;
2510 #[doc = r"Return the pointer to the register block"]
2511 #[inline(always)]
2512 pub const fn ptr() -> *const emac::RegisterBlock {
2513 Self::PTR
2514 }
2515 #[doc = r" Steal an instance of this peripheral"]
2516 #[doc = r""]
2517 #[doc = r" # Safety"]
2518 #[doc = r""]
2519 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2520 #[doc = r" that may race with any existing instances, for example by only"]
2521 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2522 #[doc = r" original peripheral and using critical sections to coordinate"]
2523 #[doc = r" access between multiple new instances."]
2524 #[doc = r""]
2525 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2526 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2527 #[doc = r" no stolen instances are passed to such software."]
2528 pub unsafe fn steal() -> Self {
2529 Self {
2530 _marker: PhantomData,
2531 }
2532 }
2533}
2534impl Deref for EMAC {
2535 type Target = emac::RegisterBlock;
2536 #[inline(always)]
2537 fn deref(&self) -> &Self::Target {
2538 unsafe { &*Self::PTR }
2539 }
2540}
2541impl core::fmt::Debug for EMAC {
2542 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2543 f.debug_struct("EMAC").finish()
2544 }
2545}
2546#[doc = "Ethernet Medium Access Controller"]
2547pub mod emac;
2548#[doc = "Counsumer Infrared Receiver"]
2549pub struct CIR_RX {
2550 _marker: PhantomData<*const ()>,
2551}
2552unsafe impl Send for CIR_RX {}
2553impl CIR_RX {
2554 #[doc = r"Pointer to the register block"]
2555 pub const PTR: *const cir_rx::RegisterBlock = 0x0704_0000 as *const _;
2556 #[doc = r"Return the pointer to the register block"]
2557 #[inline(always)]
2558 pub const fn ptr() -> *const cir_rx::RegisterBlock {
2559 Self::PTR
2560 }
2561 #[doc = r" Steal an instance of this peripheral"]
2562 #[doc = r""]
2563 #[doc = r" # Safety"]
2564 #[doc = r""]
2565 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2566 #[doc = r" that may race with any existing instances, for example by only"]
2567 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2568 #[doc = r" original peripheral and using critical sections to coordinate"]
2569 #[doc = r" access between multiple new instances."]
2570 #[doc = r""]
2571 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2572 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2573 #[doc = r" no stolen instances are passed to such software."]
2574 pub unsafe fn steal() -> Self {
2575 Self {
2576 _marker: PhantomData,
2577 }
2578 }
2579}
2580impl Deref for CIR_RX {
2581 type Target = cir_rx::RegisterBlock;
2582 #[inline(always)]
2583 fn deref(&self) -> &Self::Target {
2584 unsafe { &*Self::PTR }
2585 }
2586}
2587impl core::fmt::Debug for CIR_RX {
2588 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2589 f.debug_struct("CIR_RX").finish()
2590 }
2591}
2592#[doc = "Counsumer Infrared Receiver"]
2593pub mod cir_rx;
2594#[doc = "Counsumer Infrared Transmitter"]
2595pub struct CIR_TX {
2596 _marker: PhantomData<*const ()>,
2597}
2598unsafe impl Send for CIR_TX {}
2599impl CIR_TX {
2600 #[doc = r"Pointer to the register block"]
2601 pub const PTR: *const cir_tx::RegisterBlock = 0x0200_3000 as *const _;
2602 #[doc = r"Return the pointer to the register block"]
2603 #[inline(always)]
2604 pub const fn ptr() -> *const cir_tx::RegisterBlock {
2605 Self::PTR
2606 }
2607 #[doc = r" Steal an instance of this peripheral"]
2608 #[doc = r""]
2609 #[doc = r" # Safety"]
2610 #[doc = r""]
2611 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2612 #[doc = r" that may race with any existing instances, for example by only"]
2613 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2614 #[doc = r" original peripheral and using critical sections to coordinate"]
2615 #[doc = r" access between multiple new instances."]
2616 #[doc = r""]
2617 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2618 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2619 #[doc = r" no stolen instances are passed to such software."]
2620 pub unsafe fn steal() -> Self {
2621 Self {
2622 _marker: PhantomData,
2623 }
2624 }
2625}
2626impl Deref for CIR_TX {
2627 type Target = cir_tx::RegisterBlock;
2628 #[inline(always)]
2629 fn deref(&self) -> &Self::Target {
2630 unsafe { &*Self::PTR }
2631 }
2632}
2633impl core::fmt::Debug for CIR_TX {
2634 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2635 f.debug_struct("CIR_TX").finish()
2636 }
2637}
2638#[doc = "Counsumer Infrared Transmitter"]
2639pub mod cir_tx;
2640#[doc = "Crypoto Engine"]
2641pub struct CE_NS {
2642 _marker: PhantomData<*const ()>,
2643}
2644unsafe impl Send for CE_NS {}
2645impl CE_NS {
2646 #[doc = r"Pointer to the register block"]
2647 pub const PTR: *const ce_ns::RegisterBlock = 0x0304_0000 as *const _;
2648 #[doc = r"Return the pointer to the register block"]
2649 #[inline(always)]
2650 pub const fn ptr() -> *const ce_ns::RegisterBlock {
2651 Self::PTR
2652 }
2653 #[doc = r" Steal an instance of this peripheral"]
2654 #[doc = r""]
2655 #[doc = r" # Safety"]
2656 #[doc = r""]
2657 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2658 #[doc = r" that may race with any existing instances, for example by only"]
2659 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2660 #[doc = r" original peripheral and using critical sections to coordinate"]
2661 #[doc = r" access between multiple new instances."]
2662 #[doc = r""]
2663 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2664 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2665 #[doc = r" no stolen instances are passed to such software."]
2666 pub unsafe fn steal() -> Self {
2667 Self {
2668 _marker: PhantomData,
2669 }
2670 }
2671}
2672impl Deref for CE_NS {
2673 type Target = ce_ns::RegisterBlock;
2674 #[inline(always)]
2675 fn deref(&self) -> &Self::Target {
2676 unsafe { &*Self::PTR }
2677 }
2678}
2679impl core::fmt::Debug for CE_NS {
2680 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2681 f.debug_struct("CE_NS").finish()
2682 }
2683}
2684#[doc = "Crypoto Engine"]
2685pub mod ce_ns;
2686#[no_mangle]
2687static mut DEVICE_PERIPHERALS: bool = false;
2688#[doc = r" All the peripherals."]
2689#[allow(non_snake_case)]
2690pub struct Peripherals {
2691 #[doc = "CCU"]
2692 pub CCU: CCU,
2693 #[doc = "SYS_CFG"]
2694 pub SYS_CFG: SYS_CFG,
2695 #[doc = "RISCV_CFG"]
2696 pub RISCV_CFG: RISCV_CFG,
2697 #[doc = "CLINT"]
2698 pub CLINT: CLINT,
2699 #[doc = "TIMER"]
2700 pub TIMER: TIMER,
2701 #[doc = "HS_TIMER"]
2702 pub HS_TIMER: HS_TIMER,
2703 #[doc = "PLIC"]
2704 pub PLIC: PLIC,
2705 #[doc = "DMAC"]
2706 pub DMAC: DMAC,
2707 #[doc = "THS"]
2708 pub THS: THS,
2709 #[doc = "IOMMU"]
2710 pub IOMMU: IOMMU,
2711 #[doc = "DSP_MSGBOX"]
2712 pub DSP_MSGBOX: DSP_MSGBOX,
2713 #[doc = "RV_MSGBOX"]
2714 pub RV_MSGBOX: RV_MSGBOX,
2715 #[doc = "SPINLOCK"]
2716 pub SPINLOCK: SPINLOCK,
2717 #[doc = "RTC"]
2718 pub RTC: RTC,
2719 #[doc = "TCON_LCD0"]
2720 pub TCON_LCD0: TCON_LCD0,
2721 #[doc = "TCON_TV0"]
2722 pub TCON_TV0: TCON_TV0,
2723 #[doc = "TVE_TOP"]
2724 pub TVE_TOP: TVE_TOP,
2725 #[doc = "TVE"]
2726 pub TVE: TVE,
2727 #[doc = "CSIC"]
2728 pub CSIC: CSIC,
2729 #[doc = "TVD_TOP"]
2730 pub TVD_TOP: TVD_TOP,
2731 #[doc = "TVD0"]
2732 pub TVD0: TVD0,
2733 #[doc = "SMHC0"]
2734 pub SMHC0: SMHC0,
2735 #[doc = "SMHC1"]
2736 pub SMHC1: SMHC1,
2737 #[doc = "SMHC2"]
2738 pub SMHC2: SMHC2,
2739 #[doc = "I2S_PCM0"]
2740 pub I2S_PCM0: I2S_PCM0,
2741 #[doc = "I2S_PCM1"]
2742 pub I2S_PCM1: I2S_PCM1,
2743 #[doc = "I2S_PCM2"]
2744 pub I2S_PCM2: I2S_PCM2,
2745 #[doc = "DMIC"]
2746 pub DMIC: DMIC,
2747 #[doc = "OWA"]
2748 pub OWA: OWA,
2749 #[doc = "AUDIO_CODEC"]
2750 pub AUDIO_CODEC: AUDIO_CODEC,
2751 #[doc = "TWI0"]
2752 pub TWI0: TWI0,
2753 #[doc = "TWI1"]
2754 pub TWI1: TWI1,
2755 #[doc = "TWI2"]
2756 pub TWI2: TWI2,
2757 #[doc = "TWI3"]
2758 pub TWI3: TWI3,
2759 #[doc = "UART0"]
2760 pub UART0: UART0,
2761 #[doc = "UART1"]
2762 pub UART1: UART1,
2763 #[doc = "UART2"]
2764 pub UART2: UART2,
2765 #[doc = "UART3"]
2766 pub UART3: UART3,
2767 #[doc = "UART4"]
2768 pub UART4: UART4,
2769 #[doc = "UART5"]
2770 pub UART5: UART5,
2771 #[doc = "SPI0"]
2772 pub SPI0: SPI0,
2773 #[doc = "SPI_DBI"]
2774 pub SPI_DBI: SPI_DBI,
2775 #[doc = "USB1"]
2776 pub USB1: USB1,
2777 #[doc = "GPIO"]
2778 pub GPIO: GPIO,
2779 #[doc = "GPADC"]
2780 pub GPADC: GPADC,
2781 #[doc = "TPADC"]
2782 pub TPADC: TPADC,
2783 #[doc = "LRADC"]
2784 pub LRADC: LRADC,
2785 #[doc = "PWM"]
2786 pub PWM: PWM,
2787 #[doc = "LEDC"]
2788 pub LEDC: LEDC,
2789 #[doc = "EMAC"]
2790 pub EMAC: EMAC,
2791 #[doc = "CIR_RX"]
2792 pub CIR_RX: CIR_RX,
2793 #[doc = "CIR_TX"]
2794 pub CIR_TX: CIR_TX,
2795 #[doc = "CE_NS"]
2796 pub CE_NS: CE_NS,
2797}
2798impl Peripherals {
2799 #[doc = r" Returns all the peripherals *once*."]
2800 #[cfg(feature = "critical-section")]
2801 #[inline]
2802 pub fn take() -> Option<Self> {
2803 critical_section::with(|_| {
2804 if unsafe { DEVICE_PERIPHERALS } {
2805 return None;
2806 }
2807 Some(unsafe { Peripherals::steal() })
2808 })
2809 }
2810 #[doc = r" Unchecked version of `Peripherals::take`."]
2811 #[doc = r""]
2812 #[doc = r" # Safety"]
2813 #[doc = r""]
2814 #[doc = r" Each of the returned peripherals must be used at most once."]
2815 #[inline]
2816 pub unsafe fn steal() -> Self {
2817 DEVICE_PERIPHERALS = true;
2818 Peripherals {
2819 CCU: CCU {
2820 _marker: PhantomData,
2821 },
2822 SYS_CFG: SYS_CFG {
2823 _marker: PhantomData,
2824 },
2825 RISCV_CFG: RISCV_CFG {
2826 _marker: PhantomData,
2827 },
2828 CLINT: CLINT {
2829 _marker: PhantomData,
2830 },
2831 TIMER: TIMER {
2832 _marker: PhantomData,
2833 },
2834 HS_TIMER: HS_TIMER {
2835 _marker: PhantomData,
2836 },
2837 PLIC: PLIC {
2838 _marker: PhantomData,
2839 },
2840 DMAC: DMAC {
2841 _marker: PhantomData,
2842 },
2843 THS: THS {
2844 _marker: PhantomData,
2845 },
2846 IOMMU: IOMMU {
2847 _marker: PhantomData,
2848 },
2849 DSP_MSGBOX: DSP_MSGBOX {
2850 _marker: PhantomData,
2851 },
2852 RV_MSGBOX: RV_MSGBOX {
2853 _marker: PhantomData,
2854 },
2855 SPINLOCK: SPINLOCK {
2856 _marker: PhantomData,
2857 },
2858 RTC: RTC {
2859 _marker: PhantomData,
2860 },
2861 TCON_LCD0: TCON_LCD0 {
2862 _marker: PhantomData,
2863 },
2864 TCON_TV0: TCON_TV0 {
2865 _marker: PhantomData,
2866 },
2867 TVE_TOP: TVE_TOP {
2868 _marker: PhantomData,
2869 },
2870 TVE: TVE {
2871 _marker: PhantomData,
2872 },
2873 CSIC: CSIC {
2874 _marker: PhantomData,
2875 },
2876 TVD_TOP: TVD_TOP {
2877 _marker: PhantomData,
2878 },
2879 TVD0: TVD0 {
2880 _marker: PhantomData,
2881 },
2882 SMHC0: SMHC0 {
2883 _marker: PhantomData,
2884 },
2885 SMHC1: SMHC1 {
2886 _marker: PhantomData,
2887 },
2888 SMHC2: SMHC2 {
2889 _marker: PhantomData,
2890 },
2891 I2S_PCM0: I2S_PCM0 {
2892 _marker: PhantomData,
2893 },
2894 I2S_PCM1: I2S_PCM1 {
2895 _marker: PhantomData,
2896 },
2897 I2S_PCM2: I2S_PCM2 {
2898 _marker: PhantomData,
2899 },
2900 DMIC: DMIC {
2901 _marker: PhantomData,
2902 },
2903 OWA: OWA {
2904 _marker: PhantomData,
2905 },
2906 AUDIO_CODEC: AUDIO_CODEC {
2907 _marker: PhantomData,
2908 },
2909 TWI0: TWI0 {
2910 _marker: PhantomData,
2911 },
2912 TWI1: TWI1 {
2913 _marker: PhantomData,
2914 },
2915 TWI2: TWI2 {
2916 _marker: PhantomData,
2917 },
2918 TWI3: TWI3 {
2919 _marker: PhantomData,
2920 },
2921 UART0: UART0 {
2922 _marker: PhantomData,
2923 },
2924 UART1: UART1 {
2925 _marker: PhantomData,
2926 },
2927 UART2: UART2 {
2928 _marker: PhantomData,
2929 },
2930 UART3: UART3 {
2931 _marker: PhantomData,
2932 },
2933 UART4: UART4 {
2934 _marker: PhantomData,
2935 },
2936 UART5: UART5 {
2937 _marker: PhantomData,
2938 },
2939 SPI0: SPI0 {
2940 _marker: PhantomData,
2941 },
2942 SPI_DBI: SPI_DBI {
2943 _marker: PhantomData,
2944 },
2945 USB1: USB1 {
2946 _marker: PhantomData,
2947 },
2948 GPIO: GPIO {
2949 _marker: PhantomData,
2950 },
2951 GPADC: GPADC {
2952 _marker: PhantomData,
2953 },
2954 TPADC: TPADC {
2955 _marker: PhantomData,
2956 },
2957 LRADC: LRADC {
2958 _marker: PhantomData,
2959 },
2960 PWM: PWM {
2961 _marker: PhantomData,
2962 },
2963 LEDC: LEDC {
2964 _marker: PhantomData,
2965 },
2966 EMAC: EMAC {
2967 _marker: PhantomData,
2968 },
2969 CIR_RX: CIR_RX {
2970 _marker: PhantomData,
2971 },
2972 CIR_TX: CIR_TX {
2973 _marker: PhantomData,
2974 },
2975 CE_NS: CE_NS {
2976 _marker: PhantomData,
2977 },
2978 }
2979 }
2980}