esp32c3/
lib.rs

1#![doc = "Peripheral access API for ESP32-C3 microcontrollers (generated using svd2rust v0.35.0 ( ))\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.35.0/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/46717278")]
5#![no_std]
6use core::marker::PhantomData;
7use core::ops::Deref;
8#[doc = r"Number available in the NVIC for configuring priority"]
9pub const NVIC_PRIO_BITS: u8 = 0;
10#[allow(unused_imports)]
11use generic::*;
12#[doc = r"Common register and bit access and modify traits"]
13pub mod generic;
14#[cfg(feature = "rt")]
15extern "C" {
16    fn WIFI_MAC();
17    fn WIFI_MAC_NMI();
18    fn WIFI_PWR();
19    fn WIFI_BB();
20    fn BT_MAC();
21    fn BT_BB();
22    fn BT_BB_NMI();
23    fn RWBT();
24    fn RWBLE();
25    fn RWBT_NMI();
26    fn RWBLE_NMI();
27    fn I2C_MASTER();
28    fn SLC0();
29    fn SLC1();
30    fn APB_CTRL();
31    fn UHCI0();
32    fn GPIO();
33    fn GPIO_NMI();
34    fn SPI1();
35    fn SPI2();
36    fn I2S0();
37    fn UART0();
38    fn UART1();
39    fn LEDC();
40    fn EFUSE();
41    fn TWAI0();
42    fn USB_DEVICE();
43    fn RTC_CORE();
44    fn RMT();
45    fn I2C_EXT0();
46    fn TIMER1();
47    fn TIMER2();
48    fn TG0_T0_LEVEL();
49    fn TG0_WDT_LEVEL();
50    fn TG1_T0_LEVEL();
51    fn TG1_WDT_LEVEL();
52    fn CACHE_IA();
53    fn SYSTIMER_TARGET0();
54    fn SYSTIMER_TARGET1();
55    fn SYSTIMER_TARGET2();
56    fn SPI_MEM_REJECT_CACHE();
57    fn ICACHE_PRELOAD0();
58    fn ICACHE_SYNC0();
59    fn APB_ADC();
60    fn DMA_CH0();
61    fn DMA_CH1();
62    fn DMA_CH2();
63    fn RSA();
64    fn AES();
65    fn SHA();
66    fn FROM_CPU_INTR0();
67    fn FROM_CPU_INTR1();
68    fn FROM_CPU_INTR2();
69    fn FROM_CPU_INTR3();
70    fn ASSIST_DEBUG();
71    fn DMA_APBPERI_PMS();
72    fn CORE0_IRAM0_PMS();
73    fn CORE0_DRAM0_PMS();
74    fn CORE0_PIF_PMS();
75    fn CORE0_PIF_PMS_SIZE();
76    fn BAK_PMS_VIOLATE();
77    fn CACHE_CORE0_ACS();
78}
79#[doc(hidden)]
80#[repr(C)]
81pub union Vector {
82    pub _handler: unsafe extern "C" fn(),
83    pub _reserved: usize,
84}
85#[cfg(feature = "rt")]
86#[doc(hidden)]
87#[link_section = ".rwtext"]
88#[no_mangle]
89pub static __EXTERNAL_INTERRUPTS: [Vector; 62] = [
90    Vector { _handler: WIFI_MAC },
91    Vector {
92        _handler: WIFI_MAC_NMI,
93    },
94    Vector { _handler: WIFI_PWR },
95    Vector { _handler: WIFI_BB },
96    Vector { _handler: BT_MAC },
97    Vector { _handler: BT_BB },
98    Vector {
99        _handler: BT_BB_NMI,
100    },
101    Vector { _handler: RWBT },
102    Vector { _handler: RWBLE },
103    Vector { _handler: RWBT_NMI },
104    Vector {
105        _handler: RWBLE_NMI,
106    },
107    Vector {
108        _handler: I2C_MASTER,
109    },
110    Vector { _handler: SLC0 },
111    Vector { _handler: SLC1 },
112    Vector { _handler: APB_CTRL },
113    Vector { _handler: UHCI0 },
114    Vector { _handler: GPIO },
115    Vector { _handler: GPIO_NMI },
116    Vector { _handler: SPI1 },
117    Vector { _handler: SPI2 },
118    Vector { _handler: I2S0 },
119    Vector { _handler: UART0 },
120    Vector { _handler: UART1 },
121    Vector { _handler: LEDC },
122    Vector { _handler: EFUSE },
123    Vector { _handler: TWAI0 },
124    Vector {
125        _handler: USB_DEVICE,
126    },
127    Vector { _handler: RTC_CORE },
128    Vector { _handler: RMT },
129    Vector { _handler: I2C_EXT0 },
130    Vector { _handler: TIMER1 },
131    Vector { _handler: TIMER2 },
132    Vector {
133        _handler: TG0_T0_LEVEL,
134    },
135    Vector {
136        _handler: TG0_WDT_LEVEL,
137    },
138    Vector {
139        _handler: TG1_T0_LEVEL,
140    },
141    Vector {
142        _handler: TG1_WDT_LEVEL,
143    },
144    Vector { _handler: CACHE_IA },
145    Vector {
146        _handler: SYSTIMER_TARGET0,
147    },
148    Vector {
149        _handler: SYSTIMER_TARGET1,
150    },
151    Vector {
152        _handler: SYSTIMER_TARGET2,
153    },
154    Vector {
155        _handler: SPI_MEM_REJECT_CACHE,
156    },
157    Vector {
158        _handler: ICACHE_PRELOAD0,
159    },
160    Vector {
161        _handler: ICACHE_SYNC0,
162    },
163    Vector { _handler: APB_ADC },
164    Vector { _handler: DMA_CH0 },
165    Vector { _handler: DMA_CH1 },
166    Vector { _handler: DMA_CH2 },
167    Vector { _handler: RSA },
168    Vector { _handler: AES },
169    Vector { _handler: SHA },
170    Vector {
171        _handler: FROM_CPU_INTR0,
172    },
173    Vector {
174        _handler: FROM_CPU_INTR1,
175    },
176    Vector {
177        _handler: FROM_CPU_INTR2,
178    },
179    Vector {
180        _handler: FROM_CPU_INTR3,
181    },
182    Vector {
183        _handler: ASSIST_DEBUG,
184    },
185    Vector {
186        _handler: DMA_APBPERI_PMS,
187    },
188    Vector {
189        _handler: CORE0_IRAM0_PMS,
190    },
191    Vector {
192        _handler: CORE0_DRAM0_PMS,
193    },
194    Vector {
195        _handler: CORE0_PIF_PMS,
196    },
197    Vector {
198        _handler: CORE0_PIF_PMS_SIZE,
199    },
200    Vector {
201        _handler: BAK_PMS_VIOLATE,
202    },
203    Vector {
204        _handler: CACHE_CORE0_ACS,
205    },
206];
207#[doc(hidden)]
208pub mod interrupt;
209pub use self::interrupt::Interrupt;
210#[doc = "AES (Advanced Encryption Standard) Accelerator"]
211pub struct AES {
212    _marker: PhantomData<*const ()>,
213}
214unsafe impl Send for AES {}
215impl AES {
216    #[doc = r"Pointer to the register block"]
217    pub const PTR: *const aes::RegisterBlock = 0x6003_a000 as *const _;
218    #[doc = r"Return the pointer to the register block"]
219    #[inline(always)]
220    pub const fn ptr() -> *const aes::RegisterBlock {
221        Self::PTR
222    }
223    #[doc = r" Steal an instance of this peripheral"]
224    #[doc = r""]
225    #[doc = r" # Safety"]
226    #[doc = r""]
227    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
228    #[doc = r" that may race with any existing instances, for example by only"]
229    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
230    #[doc = r" original peripheral and using critical sections to coordinate"]
231    #[doc = r" access between multiple new instances."]
232    #[doc = r""]
233    #[doc = r" Additionally, other software such as HALs may rely on only one"]
234    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
235    #[doc = r" no stolen instances are passed to such software."]
236    pub unsafe fn steal() -> Self {
237        Self {
238            _marker: PhantomData,
239        }
240    }
241}
242impl Deref for AES {
243    type Target = aes::RegisterBlock;
244    #[inline(always)]
245    fn deref(&self) -> &Self::Target {
246        unsafe { &*Self::PTR }
247    }
248}
249impl core::fmt::Debug for AES {
250    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
251        f.debug_struct("AES").finish()
252    }
253}
254#[doc = "AES (Advanced Encryption Standard) Accelerator"]
255pub mod aes;
256#[doc = "APB (Advanced Peripheral Bus) Controller"]
257pub struct APB_CTRL {
258    _marker: PhantomData<*const ()>,
259}
260unsafe impl Send for APB_CTRL {}
261impl APB_CTRL {
262    #[doc = r"Pointer to the register block"]
263    pub const PTR: *const apb_ctrl::RegisterBlock = 0x6002_6000 as *const _;
264    #[doc = r"Return the pointer to the register block"]
265    #[inline(always)]
266    pub const fn ptr() -> *const apb_ctrl::RegisterBlock {
267        Self::PTR
268    }
269    #[doc = r" Steal an instance of this peripheral"]
270    #[doc = r""]
271    #[doc = r" # Safety"]
272    #[doc = r""]
273    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
274    #[doc = r" that may race with any existing instances, for example by only"]
275    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
276    #[doc = r" original peripheral and using critical sections to coordinate"]
277    #[doc = r" access between multiple new instances."]
278    #[doc = r""]
279    #[doc = r" Additionally, other software such as HALs may rely on only one"]
280    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
281    #[doc = r" no stolen instances are passed to such software."]
282    pub unsafe fn steal() -> Self {
283        Self {
284            _marker: PhantomData,
285        }
286    }
287}
288impl Deref for APB_CTRL {
289    type Target = apb_ctrl::RegisterBlock;
290    #[inline(always)]
291    fn deref(&self) -> &Self::Target {
292        unsafe { &*Self::PTR }
293    }
294}
295impl core::fmt::Debug for APB_CTRL {
296    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
297        f.debug_struct("APB_CTRL").finish()
298    }
299}
300#[doc = "APB (Advanced Peripheral Bus) Controller"]
301pub mod apb_ctrl;
302#[doc = "SAR (Successive Approximation Register) Analog-to-Digital Converter"]
303pub struct APB_SARADC {
304    _marker: PhantomData<*const ()>,
305}
306unsafe impl Send for APB_SARADC {}
307impl APB_SARADC {
308    #[doc = r"Pointer to the register block"]
309    pub const PTR: *const apb_saradc::RegisterBlock = 0x6004_0000 as *const _;
310    #[doc = r"Return the pointer to the register block"]
311    #[inline(always)]
312    pub const fn ptr() -> *const apb_saradc::RegisterBlock {
313        Self::PTR
314    }
315    #[doc = r" Steal an instance of this peripheral"]
316    #[doc = r""]
317    #[doc = r" # Safety"]
318    #[doc = r""]
319    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
320    #[doc = r" that may race with any existing instances, for example by only"]
321    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
322    #[doc = r" original peripheral and using critical sections to coordinate"]
323    #[doc = r" access between multiple new instances."]
324    #[doc = r""]
325    #[doc = r" Additionally, other software such as HALs may rely on only one"]
326    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
327    #[doc = r" no stolen instances are passed to such software."]
328    pub unsafe fn steal() -> Self {
329        Self {
330            _marker: PhantomData,
331        }
332    }
333}
334impl Deref for APB_SARADC {
335    type Target = apb_saradc::RegisterBlock;
336    #[inline(always)]
337    fn deref(&self) -> &Self::Target {
338        unsafe { &*Self::PTR }
339    }
340}
341impl core::fmt::Debug for APB_SARADC {
342    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
343        f.debug_struct("APB_SARADC").finish()
344    }
345}
346#[doc = "SAR (Successive Approximation Register) Analog-to-Digital Converter"]
347pub mod apb_saradc;
348#[doc = "Debug Assist"]
349pub struct ASSIST_DEBUG {
350    _marker: PhantomData<*const ()>,
351}
352unsafe impl Send for ASSIST_DEBUG {}
353impl ASSIST_DEBUG {
354    #[doc = r"Pointer to the register block"]
355    pub const PTR: *const assist_debug::RegisterBlock = 0x600c_e000 as *const _;
356    #[doc = r"Return the pointer to the register block"]
357    #[inline(always)]
358    pub const fn ptr() -> *const assist_debug::RegisterBlock {
359        Self::PTR
360    }
361    #[doc = r" Steal an instance of this peripheral"]
362    #[doc = r""]
363    #[doc = r" # Safety"]
364    #[doc = r""]
365    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
366    #[doc = r" that may race with any existing instances, for example by only"]
367    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
368    #[doc = r" original peripheral and using critical sections to coordinate"]
369    #[doc = r" access between multiple new instances."]
370    #[doc = r""]
371    #[doc = r" Additionally, other software such as HALs may rely on only one"]
372    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
373    #[doc = r" no stolen instances are passed to such software."]
374    pub unsafe fn steal() -> Self {
375        Self {
376            _marker: PhantomData,
377        }
378    }
379}
380impl Deref for ASSIST_DEBUG {
381    type Target = assist_debug::RegisterBlock;
382    #[inline(always)]
383    fn deref(&self) -> &Self::Target {
384        unsafe { &*Self::PTR }
385    }
386}
387impl core::fmt::Debug for ASSIST_DEBUG {
388    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
389        f.debug_struct("ASSIST_DEBUG").finish()
390    }
391}
392#[doc = "Debug Assist"]
393pub mod assist_debug;
394#[doc = "BB Peripheral"]
395pub struct BB {
396    _marker: PhantomData<*const ()>,
397}
398unsafe impl Send for BB {}
399impl BB {
400    #[doc = r"Pointer to the register block"]
401    pub const PTR: *const bb::RegisterBlock = 0x6001_d000 as *const _;
402    #[doc = r"Return the pointer to the register block"]
403    #[inline(always)]
404    pub const fn ptr() -> *const bb::RegisterBlock {
405        Self::PTR
406    }
407    #[doc = r" Steal an instance of this peripheral"]
408    #[doc = r""]
409    #[doc = r" # Safety"]
410    #[doc = r""]
411    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
412    #[doc = r" that may race with any existing instances, for example by only"]
413    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
414    #[doc = r" original peripheral and using critical sections to coordinate"]
415    #[doc = r" access between multiple new instances."]
416    #[doc = r""]
417    #[doc = r" Additionally, other software such as HALs may rely on only one"]
418    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
419    #[doc = r" no stolen instances are passed to such software."]
420    pub unsafe fn steal() -> Self {
421        Self {
422            _marker: PhantomData,
423        }
424    }
425}
426impl Deref for BB {
427    type Target = bb::RegisterBlock;
428    #[inline(always)]
429    fn deref(&self) -> &Self::Target {
430        unsafe { &*Self::PTR }
431    }
432}
433impl core::fmt::Debug for BB {
434    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
435        f.debug_struct("BB").finish()
436    }
437}
438#[doc = "BB Peripheral"]
439pub mod bb;
440#[doc = "DMA (Direct Memory Access) Controller"]
441pub struct DMA {
442    _marker: PhantomData<*const ()>,
443}
444unsafe impl Send for DMA {}
445impl DMA {
446    #[doc = r"Pointer to the register block"]
447    pub const PTR: *const dma::RegisterBlock = 0x6003_f000 as *const _;
448    #[doc = r"Return the pointer to the register block"]
449    #[inline(always)]
450    pub const fn ptr() -> *const dma::RegisterBlock {
451        Self::PTR
452    }
453    #[doc = r" Steal an instance of this peripheral"]
454    #[doc = r""]
455    #[doc = r" # Safety"]
456    #[doc = r""]
457    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
458    #[doc = r" that may race with any existing instances, for example by only"]
459    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
460    #[doc = r" original peripheral and using critical sections to coordinate"]
461    #[doc = r" access between multiple new instances."]
462    #[doc = r""]
463    #[doc = r" Additionally, other software such as HALs may rely on only one"]
464    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
465    #[doc = r" no stolen instances are passed to such software."]
466    pub unsafe fn steal() -> Self {
467        Self {
468            _marker: PhantomData,
469        }
470    }
471}
472impl Deref for DMA {
473    type Target = dma::RegisterBlock;
474    #[inline(always)]
475    fn deref(&self) -> &Self::Target {
476        unsafe { &*Self::PTR }
477    }
478}
479impl core::fmt::Debug for DMA {
480    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
481        f.debug_struct("DMA").finish()
482    }
483}
484#[doc = "DMA (Direct Memory Access) Controller"]
485pub mod dma;
486#[doc = "Digital Signature"]
487pub struct DS {
488    _marker: PhantomData<*const ()>,
489}
490unsafe impl Send for DS {}
491impl DS {
492    #[doc = r"Pointer to the register block"]
493    pub const PTR: *const ds::RegisterBlock = 0x6003_d000 as *const _;
494    #[doc = r"Return the pointer to the register block"]
495    #[inline(always)]
496    pub const fn ptr() -> *const ds::RegisterBlock {
497        Self::PTR
498    }
499    #[doc = r" Steal an instance of this peripheral"]
500    #[doc = r""]
501    #[doc = r" # Safety"]
502    #[doc = r""]
503    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
504    #[doc = r" that may race with any existing instances, for example by only"]
505    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
506    #[doc = r" original peripheral and using critical sections to coordinate"]
507    #[doc = r" access between multiple new instances."]
508    #[doc = r""]
509    #[doc = r" Additionally, other software such as HALs may rely on only one"]
510    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
511    #[doc = r" no stolen instances are passed to such software."]
512    pub unsafe fn steal() -> Self {
513        Self {
514            _marker: PhantomData,
515        }
516    }
517}
518impl Deref for DS {
519    type Target = ds::RegisterBlock;
520    #[inline(always)]
521    fn deref(&self) -> &Self::Target {
522        unsafe { &*Self::PTR }
523    }
524}
525impl core::fmt::Debug for DS {
526    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
527        f.debug_struct("DS").finish()
528    }
529}
530#[doc = "Digital Signature"]
531pub mod ds;
532#[doc = "eFuse Controller"]
533pub struct EFUSE {
534    _marker: PhantomData<*const ()>,
535}
536unsafe impl Send for EFUSE {}
537impl EFUSE {
538    #[doc = r"Pointer to the register block"]
539    pub const PTR: *const efuse::RegisterBlock = 0x6000_8800 as *const _;
540    #[doc = r"Return the pointer to the register block"]
541    #[inline(always)]
542    pub const fn ptr() -> *const efuse::RegisterBlock {
543        Self::PTR
544    }
545    #[doc = r" Steal an instance of this peripheral"]
546    #[doc = r""]
547    #[doc = r" # Safety"]
548    #[doc = r""]
549    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
550    #[doc = r" that may race with any existing instances, for example by only"]
551    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
552    #[doc = r" original peripheral and using critical sections to coordinate"]
553    #[doc = r" access between multiple new instances."]
554    #[doc = r""]
555    #[doc = r" Additionally, other software such as HALs may rely on only one"]
556    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
557    #[doc = r" no stolen instances are passed to such software."]
558    pub unsafe fn steal() -> Self {
559        Self {
560            _marker: PhantomData,
561        }
562    }
563}
564impl Deref for EFUSE {
565    type Target = efuse::RegisterBlock;
566    #[inline(always)]
567    fn deref(&self) -> &Self::Target {
568        unsafe { &*Self::PTR }
569    }
570}
571impl core::fmt::Debug for EFUSE {
572    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
573        f.debug_struct("EFUSE").finish()
574    }
575}
576#[doc = "eFuse Controller"]
577pub mod efuse;
578#[doc = "External Memory"]
579pub struct EXTMEM {
580    _marker: PhantomData<*const ()>,
581}
582unsafe impl Send for EXTMEM {}
583impl EXTMEM {
584    #[doc = r"Pointer to the register block"]
585    pub const PTR: *const extmem::RegisterBlock = 0x600c_4000 as *const _;
586    #[doc = r"Return the pointer to the register block"]
587    #[inline(always)]
588    pub const fn ptr() -> *const extmem::RegisterBlock {
589        Self::PTR
590    }
591    #[doc = r" Steal an instance of this peripheral"]
592    #[doc = r""]
593    #[doc = r" # Safety"]
594    #[doc = r""]
595    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
596    #[doc = r" that may race with any existing instances, for example by only"]
597    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
598    #[doc = r" original peripheral and using critical sections to coordinate"]
599    #[doc = r" access between multiple new instances."]
600    #[doc = r""]
601    #[doc = r" Additionally, other software such as HALs may rely on only one"]
602    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
603    #[doc = r" no stolen instances are passed to such software."]
604    pub unsafe fn steal() -> Self {
605        Self {
606            _marker: PhantomData,
607        }
608    }
609}
610impl Deref for EXTMEM {
611    type Target = extmem::RegisterBlock;
612    #[inline(always)]
613    fn deref(&self) -> &Self::Target {
614        unsafe { &*Self::PTR }
615    }
616}
617impl core::fmt::Debug for EXTMEM {
618    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
619        f.debug_struct("EXTMEM").finish()
620    }
621}
622#[doc = "External Memory"]
623pub mod extmem;
624#[doc = "General Purpose Input/Output"]
625pub struct GPIO {
626    _marker: PhantomData<*const ()>,
627}
628unsafe impl Send for GPIO {}
629impl GPIO {
630    #[doc = r"Pointer to the register block"]
631    pub const PTR: *const gpio::RegisterBlock = 0x6000_4000 as *const _;
632    #[doc = r"Return the pointer to the register block"]
633    #[inline(always)]
634    pub const fn ptr() -> *const gpio::RegisterBlock {
635        Self::PTR
636    }
637    #[doc = r" Steal an instance of this peripheral"]
638    #[doc = r""]
639    #[doc = r" # Safety"]
640    #[doc = r""]
641    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
642    #[doc = r" that may race with any existing instances, for example by only"]
643    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
644    #[doc = r" original peripheral and using critical sections to coordinate"]
645    #[doc = r" access between multiple new instances."]
646    #[doc = r""]
647    #[doc = r" Additionally, other software such as HALs may rely on only one"]
648    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
649    #[doc = r" no stolen instances are passed to such software."]
650    pub unsafe fn steal() -> Self {
651        Self {
652            _marker: PhantomData,
653        }
654    }
655}
656impl Deref for GPIO {
657    type Target = gpio::RegisterBlock;
658    #[inline(always)]
659    fn deref(&self) -> &Self::Target {
660        unsafe { &*Self::PTR }
661    }
662}
663impl core::fmt::Debug for GPIO {
664    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
665        f.debug_struct("GPIO").finish()
666    }
667}
668#[doc = "General Purpose Input/Output"]
669pub mod gpio;
670#[doc = "Sigma-Delta Modulation"]
671pub struct GPIO_SD {
672    _marker: PhantomData<*const ()>,
673}
674unsafe impl Send for GPIO_SD {}
675impl GPIO_SD {
676    #[doc = r"Pointer to the register block"]
677    pub const PTR: *const gpio_sd::RegisterBlock = 0x6000_4f00 as *const _;
678    #[doc = r"Return the pointer to the register block"]
679    #[inline(always)]
680    pub const fn ptr() -> *const gpio_sd::RegisterBlock {
681        Self::PTR
682    }
683    #[doc = r" Steal an instance of this peripheral"]
684    #[doc = r""]
685    #[doc = r" # Safety"]
686    #[doc = r""]
687    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
688    #[doc = r" that may race with any existing instances, for example by only"]
689    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
690    #[doc = r" original peripheral and using critical sections to coordinate"]
691    #[doc = r" access between multiple new instances."]
692    #[doc = r""]
693    #[doc = r" Additionally, other software such as HALs may rely on only one"]
694    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
695    #[doc = r" no stolen instances are passed to such software."]
696    pub unsafe fn steal() -> Self {
697        Self {
698            _marker: PhantomData,
699        }
700    }
701}
702impl Deref for GPIO_SD {
703    type Target = gpio_sd::RegisterBlock;
704    #[inline(always)]
705    fn deref(&self) -> &Self::Target {
706        unsafe { &*Self::PTR }
707    }
708}
709impl core::fmt::Debug for GPIO_SD {
710    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
711        f.debug_struct("GPIO_SD").finish()
712    }
713}
714#[doc = "Sigma-Delta Modulation"]
715pub mod gpio_sd;
716#[doc = "HMAC (Hash-based Message Authentication Code) Accelerator"]
717pub struct HMAC {
718    _marker: PhantomData<*const ()>,
719}
720unsafe impl Send for HMAC {}
721impl HMAC {
722    #[doc = r"Pointer to the register block"]
723    pub const PTR: *const hmac::RegisterBlock = 0x6003_e000 as *const _;
724    #[doc = r"Return the pointer to the register block"]
725    #[inline(always)]
726    pub const fn ptr() -> *const hmac::RegisterBlock {
727        Self::PTR
728    }
729    #[doc = r" Steal an instance of this peripheral"]
730    #[doc = r""]
731    #[doc = r" # Safety"]
732    #[doc = r""]
733    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
734    #[doc = r" that may race with any existing instances, for example by only"]
735    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
736    #[doc = r" original peripheral and using critical sections to coordinate"]
737    #[doc = r" access between multiple new instances."]
738    #[doc = r""]
739    #[doc = r" Additionally, other software such as HALs may rely on only one"]
740    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
741    #[doc = r" no stolen instances are passed to such software."]
742    pub unsafe fn steal() -> Self {
743        Self {
744            _marker: PhantomData,
745        }
746    }
747}
748impl Deref for HMAC {
749    type Target = hmac::RegisterBlock;
750    #[inline(always)]
751    fn deref(&self) -> &Self::Target {
752        unsafe { &*Self::PTR }
753    }
754}
755impl core::fmt::Debug for HMAC {
756    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
757        f.debug_struct("HMAC").finish()
758    }
759}
760#[doc = "HMAC (Hash-based Message Authentication Code) Accelerator"]
761pub mod hmac;
762#[doc = "I2C (Inter-Integrated Circuit) Controller 0"]
763pub struct I2C0 {
764    _marker: PhantomData<*const ()>,
765}
766unsafe impl Send for I2C0 {}
767impl I2C0 {
768    #[doc = r"Pointer to the register block"]
769    pub const PTR: *const i2c0::RegisterBlock = 0x6001_3000 as *const _;
770    #[doc = r"Return the pointer to the register block"]
771    #[inline(always)]
772    pub const fn ptr() -> *const i2c0::RegisterBlock {
773        Self::PTR
774    }
775    #[doc = r" Steal an instance of this peripheral"]
776    #[doc = r""]
777    #[doc = r" # Safety"]
778    #[doc = r""]
779    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
780    #[doc = r" that may race with any existing instances, for example by only"]
781    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
782    #[doc = r" original peripheral and using critical sections to coordinate"]
783    #[doc = r" access between multiple new instances."]
784    #[doc = r""]
785    #[doc = r" Additionally, other software such as HALs may rely on only one"]
786    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
787    #[doc = r" no stolen instances are passed to such software."]
788    pub unsafe fn steal() -> Self {
789        Self {
790            _marker: PhantomData,
791        }
792    }
793}
794impl Deref for I2C0 {
795    type Target = i2c0::RegisterBlock;
796    #[inline(always)]
797    fn deref(&self) -> &Self::Target {
798        unsafe { &*Self::PTR }
799    }
800}
801impl core::fmt::Debug for I2C0 {
802    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
803        f.debug_struct("I2C0").finish()
804    }
805}
806#[doc = "I2C (Inter-Integrated Circuit) Controller 0"]
807pub mod i2c0;
808#[doc = "I2S (Inter-IC Sound) Controller 0"]
809pub struct I2S0 {
810    _marker: PhantomData<*const ()>,
811}
812unsafe impl Send for I2S0 {}
813impl I2S0 {
814    #[doc = r"Pointer to the register block"]
815    pub const PTR: *const i2s0::RegisterBlock = 0x6002_d000 as *const _;
816    #[doc = r"Return the pointer to the register block"]
817    #[inline(always)]
818    pub const fn ptr() -> *const i2s0::RegisterBlock {
819        Self::PTR
820    }
821    #[doc = r" Steal an instance of this peripheral"]
822    #[doc = r""]
823    #[doc = r" # Safety"]
824    #[doc = r""]
825    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
826    #[doc = r" that may race with any existing instances, for example by only"]
827    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
828    #[doc = r" original peripheral and using critical sections to coordinate"]
829    #[doc = r" access between multiple new instances."]
830    #[doc = r""]
831    #[doc = r" Additionally, other software such as HALs may rely on only one"]
832    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
833    #[doc = r" no stolen instances are passed to such software."]
834    pub unsafe fn steal() -> Self {
835        Self {
836            _marker: PhantomData,
837        }
838    }
839}
840impl Deref for I2S0 {
841    type Target = i2s0::RegisterBlock;
842    #[inline(always)]
843    fn deref(&self) -> &Self::Target {
844        unsafe { &*Self::PTR }
845    }
846}
847impl core::fmt::Debug for I2S0 {
848    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
849        f.debug_struct("I2S0").finish()
850    }
851}
852#[doc = "I2S (Inter-IC Sound) Controller 0"]
853pub mod i2s0;
854#[doc = "Interrupt Controller (Core 0)"]
855pub struct INTERRUPT_CORE0 {
856    _marker: PhantomData<*const ()>,
857}
858unsafe impl Send for INTERRUPT_CORE0 {}
859impl INTERRUPT_CORE0 {
860    #[doc = r"Pointer to the register block"]
861    pub const PTR: *const interrupt_core0::RegisterBlock = 0x600c_2000 as *const _;
862    #[doc = r"Return the pointer to the register block"]
863    #[inline(always)]
864    pub const fn ptr() -> *const interrupt_core0::RegisterBlock {
865        Self::PTR
866    }
867    #[doc = r" Steal an instance of this peripheral"]
868    #[doc = r""]
869    #[doc = r" # Safety"]
870    #[doc = r""]
871    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
872    #[doc = r" that may race with any existing instances, for example by only"]
873    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
874    #[doc = r" original peripheral and using critical sections to coordinate"]
875    #[doc = r" access between multiple new instances."]
876    #[doc = r""]
877    #[doc = r" Additionally, other software such as HALs may rely on only one"]
878    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
879    #[doc = r" no stolen instances are passed to such software."]
880    pub unsafe fn steal() -> Self {
881        Self {
882            _marker: PhantomData,
883        }
884    }
885}
886impl Deref for INTERRUPT_CORE0 {
887    type Target = interrupt_core0::RegisterBlock;
888    #[inline(always)]
889    fn deref(&self) -> &Self::Target {
890        unsafe { &*Self::PTR }
891    }
892}
893impl core::fmt::Debug for INTERRUPT_CORE0 {
894    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
895        f.debug_struct("INTERRUPT_CORE0").finish()
896    }
897}
898#[doc = "Interrupt Controller (Core 0)"]
899pub mod interrupt_core0;
900#[doc = "Input/Output Multiplexer"]
901pub struct IO_MUX {
902    _marker: PhantomData<*const ()>,
903}
904unsafe impl Send for IO_MUX {}
905impl IO_MUX {
906    #[doc = r"Pointer to the register block"]
907    pub const PTR: *const io_mux::RegisterBlock = 0x6000_9000 as *const _;
908    #[doc = r"Return the pointer to the register block"]
909    #[inline(always)]
910    pub const fn ptr() -> *const io_mux::RegisterBlock {
911        Self::PTR
912    }
913    #[doc = r" Steal an instance of this peripheral"]
914    #[doc = r""]
915    #[doc = r" # Safety"]
916    #[doc = r""]
917    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
918    #[doc = r" that may race with any existing instances, for example by only"]
919    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
920    #[doc = r" original peripheral and using critical sections to coordinate"]
921    #[doc = r" access between multiple new instances."]
922    #[doc = r""]
923    #[doc = r" Additionally, other software such as HALs may rely on only one"]
924    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
925    #[doc = r" no stolen instances are passed to such software."]
926    pub unsafe fn steal() -> Self {
927        Self {
928            _marker: PhantomData,
929        }
930    }
931}
932impl Deref for IO_MUX {
933    type Target = io_mux::RegisterBlock;
934    #[inline(always)]
935    fn deref(&self) -> &Self::Target {
936        unsafe { &*Self::PTR }
937    }
938}
939impl core::fmt::Debug for IO_MUX {
940    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
941        f.debug_struct("IO_MUX").finish()
942    }
943}
944#[doc = "Input/Output Multiplexer"]
945pub mod io_mux;
946#[doc = "LED Control PWM (Pulse Width Modulation)"]
947pub struct LEDC {
948    _marker: PhantomData<*const ()>,
949}
950unsafe impl Send for LEDC {}
951impl LEDC {
952    #[doc = r"Pointer to the register block"]
953    pub const PTR: *const ledc::RegisterBlock = 0x6001_9000 as *const _;
954    #[doc = r"Return the pointer to the register block"]
955    #[inline(always)]
956    pub const fn ptr() -> *const ledc::RegisterBlock {
957        Self::PTR
958    }
959    #[doc = r" Steal an instance of this peripheral"]
960    #[doc = r""]
961    #[doc = r" # Safety"]
962    #[doc = r""]
963    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
964    #[doc = r" that may race with any existing instances, for example by only"]
965    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
966    #[doc = r" original peripheral and using critical sections to coordinate"]
967    #[doc = r" access between multiple new instances."]
968    #[doc = r""]
969    #[doc = r" Additionally, other software such as HALs may rely on only one"]
970    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
971    #[doc = r" no stolen instances are passed to such software."]
972    pub unsafe fn steal() -> Self {
973        Self {
974            _marker: PhantomData,
975        }
976    }
977}
978impl Deref for LEDC {
979    type Target = ledc::RegisterBlock;
980    #[inline(always)]
981    fn deref(&self) -> &Self::Target {
982        unsafe { &*Self::PTR }
983    }
984}
985impl core::fmt::Debug for LEDC {
986    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
987        f.debug_struct("LEDC").finish()
988    }
989}
990#[doc = "LED Control PWM (Pulse Width Modulation)"]
991pub mod ledc;
992#[doc = "Remote Control"]
993pub struct RMT {
994    _marker: PhantomData<*const ()>,
995}
996unsafe impl Send for RMT {}
997impl RMT {
998    #[doc = r"Pointer to the register block"]
999    pub const PTR: *const rmt::RegisterBlock = 0x6001_6000 as *const _;
1000    #[doc = r"Return the pointer to the register block"]
1001    #[inline(always)]
1002    pub const fn ptr() -> *const rmt::RegisterBlock {
1003        Self::PTR
1004    }
1005    #[doc = r" Steal an instance of this peripheral"]
1006    #[doc = r""]
1007    #[doc = r" # Safety"]
1008    #[doc = r""]
1009    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1010    #[doc = r" that may race with any existing instances, for example by only"]
1011    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1012    #[doc = r" original peripheral and using critical sections to coordinate"]
1013    #[doc = r" access between multiple new instances."]
1014    #[doc = r""]
1015    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1016    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1017    #[doc = r" no stolen instances are passed to such software."]
1018    pub unsafe fn steal() -> Self {
1019        Self {
1020            _marker: PhantomData,
1021        }
1022    }
1023}
1024impl Deref for RMT {
1025    type Target = rmt::RegisterBlock;
1026    #[inline(always)]
1027    fn deref(&self) -> &Self::Target {
1028        unsafe { &*Self::PTR }
1029    }
1030}
1031impl core::fmt::Debug for RMT {
1032    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1033        f.debug_struct("RMT").finish()
1034    }
1035}
1036#[doc = "Remote Control"]
1037pub mod rmt;
1038#[doc = "Hardware Random Number Generator"]
1039pub struct RNG {
1040    _marker: PhantomData<*const ()>,
1041}
1042unsafe impl Send for RNG {}
1043impl RNG {
1044    #[doc = r"Pointer to the register block"]
1045    pub const PTR: *const rng::RegisterBlock = 0x6002_6000 as *const _;
1046    #[doc = r"Return the pointer to the register block"]
1047    #[inline(always)]
1048    pub const fn ptr() -> *const rng::RegisterBlock {
1049        Self::PTR
1050    }
1051    #[doc = r" Steal an instance of this peripheral"]
1052    #[doc = r""]
1053    #[doc = r" # Safety"]
1054    #[doc = r""]
1055    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1056    #[doc = r" that may race with any existing instances, for example by only"]
1057    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1058    #[doc = r" original peripheral and using critical sections to coordinate"]
1059    #[doc = r" access between multiple new instances."]
1060    #[doc = r""]
1061    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1062    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1063    #[doc = r" no stolen instances are passed to such software."]
1064    pub unsafe fn steal() -> Self {
1065        Self {
1066            _marker: PhantomData,
1067        }
1068    }
1069}
1070impl Deref for RNG {
1071    type Target = rng::RegisterBlock;
1072    #[inline(always)]
1073    fn deref(&self) -> &Self::Target {
1074        unsafe { &*Self::PTR }
1075    }
1076}
1077impl core::fmt::Debug for RNG {
1078    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1079        f.debug_struct("RNG").finish()
1080    }
1081}
1082#[doc = "Hardware Random Number Generator"]
1083pub mod rng;
1084#[doc = "RSA (Rivest Shamir Adleman) Accelerator"]
1085pub struct RSA {
1086    _marker: PhantomData<*const ()>,
1087}
1088unsafe impl Send for RSA {}
1089impl RSA {
1090    #[doc = r"Pointer to the register block"]
1091    pub const PTR: *const rsa::RegisterBlock = 0x6003_c000 as *const _;
1092    #[doc = r"Return the pointer to the register block"]
1093    #[inline(always)]
1094    pub const fn ptr() -> *const rsa::RegisterBlock {
1095        Self::PTR
1096    }
1097    #[doc = r" Steal an instance of this peripheral"]
1098    #[doc = r""]
1099    #[doc = r" # Safety"]
1100    #[doc = r""]
1101    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1102    #[doc = r" that may race with any existing instances, for example by only"]
1103    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1104    #[doc = r" original peripheral and using critical sections to coordinate"]
1105    #[doc = r" access between multiple new instances."]
1106    #[doc = r""]
1107    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1108    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1109    #[doc = r" no stolen instances are passed to such software."]
1110    pub unsafe fn steal() -> Self {
1111        Self {
1112            _marker: PhantomData,
1113        }
1114    }
1115}
1116impl Deref for RSA {
1117    type Target = rsa::RegisterBlock;
1118    #[inline(always)]
1119    fn deref(&self) -> &Self::Target {
1120        unsafe { &*Self::PTR }
1121    }
1122}
1123impl core::fmt::Debug for RSA {
1124    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1125        f.debug_struct("RSA").finish()
1126    }
1127}
1128#[doc = "RSA (Rivest Shamir Adleman) Accelerator"]
1129pub mod rsa;
1130#[doc = "Real-Time Clock Control"]
1131pub struct RTC_CNTL {
1132    _marker: PhantomData<*const ()>,
1133}
1134unsafe impl Send for RTC_CNTL {}
1135impl RTC_CNTL {
1136    #[doc = r"Pointer to the register block"]
1137    pub const PTR: *const rtc_cntl::RegisterBlock = 0x6000_8000 as *const _;
1138    #[doc = r"Return the pointer to the register block"]
1139    #[inline(always)]
1140    pub const fn ptr() -> *const rtc_cntl::RegisterBlock {
1141        Self::PTR
1142    }
1143    #[doc = r" Steal an instance of this peripheral"]
1144    #[doc = r""]
1145    #[doc = r" # Safety"]
1146    #[doc = r""]
1147    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1148    #[doc = r" that may race with any existing instances, for example by only"]
1149    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1150    #[doc = r" original peripheral and using critical sections to coordinate"]
1151    #[doc = r" access between multiple new instances."]
1152    #[doc = r""]
1153    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1154    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1155    #[doc = r" no stolen instances are passed to such software."]
1156    pub unsafe fn steal() -> Self {
1157        Self {
1158            _marker: PhantomData,
1159        }
1160    }
1161}
1162impl Deref for RTC_CNTL {
1163    type Target = rtc_cntl::RegisterBlock;
1164    #[inline(always)]
1165    fn deref(&self) -> &Self::Target {
1166        unsafe { &*Self::PTR }
1167    }
1168}
1169impl core::fmt::Debug for RTC_CNTL {
1170    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1171        f.debug_struct("RTC_CNTL").finish()
1172    }
1173}
1174#[doc = "Real-Time Clock Control"]
1175pub mod rtc_cntl;
1176#[doc = "SENSITIVE Peripheral"]
1177pub struct SENSITIVE {
1178    _marker: PhantomData<*const ()>,
1179}
1180unsafe impl Send for SENSITIVE {}
1181impl SENSITIVE {
1182    #[doc = r"Pointer to the register block"]
1183    pub const PTR: *const sensitive::RegisterBlock = 0x600c_1000 as *const _;
1184    #[doc = r"Return the pointer to the register block"]
1185    #[inline(always)]
1186    pub const fn ptr() -> *const sensitive::RegisterBlock {
1187        Self::PTR
1188    }
1189    #[doc = r" Steal an instance of this peripheral"]
1190    #[doc = r""]
1191    #[doc = r" # Safety"]
1192    #[doc = r""]
1193    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1194    #[doc = r" that may race with any existing instances, for example by only"]
1195    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1196    #[doc = r" original peripheral and using critical sections to coordinate"]
1197    #[doc = r" access between multiple new instances."]
1198    #[doc = r""]
1199    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1200    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1201    #[doc = r" no stolen instances are passed to such software."]
1202    pub unsafe fn steal() -> Self {
1203        Self {
1204            _marker: PhantomData,
1205        }
1206    }
1207}
1208impl Deref for SENSITIVE {
1209    type Target = sensitive::RegisterBlock;
1210    #[inline(always)]
1211    fn deref(&self) -> &Self::Target {
1212        unsafe { &*Self::PTR }
1213    }
1214}
1215impl core::fmt::Debug for SENSITIVE {
1216    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1217        f.debug_struct("SENSITIVE").finish()
1218    }
1219}
1220#[doc = "SENSITIVE Peripheral"]
1221pub mod sensitive;
1222#[doc = "SHA (Secure Hash Algorithm) Accelerator"]
1223pub struct SHA {
1224    _marker: PhantomData<*const ()>,
1225}
1226unsafe impl Send for SHA {}
1227impl SHA {
1228    #[doc = r"Pointer to the register block"]
1229    pub const PTR: *const sha::RegisterBlock = 0x6003_b000 as *const _;
1230    #[doc = r"Return the pointer to the register block"]
1231    #[inline(always)]
1232    pub const fn ptr() -> *const sha::RegisterBlock {
1233        Self::PTR
1234    }
1235    #[doc = r" Steal an instance of this peripheral"]
1236    #[doc = r""]
1237    #[doc = r" # Safety"]
1238    #[doc = r""]
1239    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1240    #[doc = r" that may race with any existing instances, for example by only"]
1241    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1242    #[doc = r" original peripheral and using critical sections to coordinate"]
1243    #[doc = r" access between multiple new instances."]
1244    #[doc = r""]
1245    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1246    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1247    #[doc = r" no stolen instances are passed to such software."]
1248    pub unsafe fn steal() -> Self {
1249        Self {
1250            _marker: PhantomData,
1251        }
1252    }
1253}
1254impl Deref for SHA {
1255    type Target = sha::RegisterBlock;
1256    #[inline(always)]
1257    fn deref(&self) -> &Self::Target {
1258        unsafe { &*Self::PTR }
1259    }
1260}
1261impl core::fmt::Debug for SHA {
1262    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1263        f.debug_struct("SHA").finish()
1264    }
1265}
1266#[doc = "SHA (Secure Hash Algorithm) Accelerator"]
1267pub mod sha;
1268#[doc = "SPI (Serial Peripheral Interface) Controller 0"]
1269pub struct SPI0 {
1270    _marker: PhantomData<*const ()>,
1271}
1272unsafe impl Send for SPI0 {}
1273impl SPI0 {
1274    #[doc = r"Pointer to the register block"]
1275    pub const PTR: *const spi0::RegisterBlock = 0x6000_3000 as *const _;
1276    #[doc = r"Return the pointer to the register block"]
1277    #[inline(always)]
1278    pub const fn ptr() -> *const spi0::RegisterBlock {
1279        Self::PTR
1280    }
1281    #[doc = r" Steal an instance of this peripheral"]
1282    #[doc = r""]
1283    #[doc = r" # Safety"]
1284    #[doc = r""]
1285    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1286    #[doc = r" that may race with any existing instances, for example by only"]
1287    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1288    #[doc = r" original peripheral and using critical sections to coordinate"]
1289    #[doc = r" access between multiple new instances."]
1290    #[doc = r""]
1291    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1292    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1293    #[doc = r" no stolen instances are passed to such software."]
1294    pub unsafe fn steal() -> Self {
1295        Self {
1296            _marker: PhantomData,
1297        }
1298    }
1299}
1300impl Deref for SPI0 {
1301    type Target = spi0::RegisterBlock;
1302    #[inline(always)]
1303    fn deref(&self) -> &Self::Target {
1304        unsafe { &*Self::PTR }
1305    }
1306}
1307impl core::fmt::Debug for SPI0 {
1308    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1309        f.debug_struct("SPI0").finish()
1310    }
1311}
1312#[doc = "SPI (Serial Peripheral Interface) Controller 0"]
1313pub mod spi0;
1314#[doc = "SPI (Serial Peripheral Interface) Controller 1"]
1315pub struct SPI1 {
1316    _marker: PhantomData<*const ()>,
1317}
1318unsafe impl Send for SPI1 {}
1319impl SPI1 {
1320    #[doc = r"Pointer to the register block"]
1321    pub const PTR: *const spi1::RegisterBlock = 0x6000_2000 as *const _;
1322    #[doc = r"Return the pointer to the register block"]
1323    #[inline(always)]
1324    pub const fn ptr() -> *const spi1::RegisterBlock {
1325        Self::PTR
1326    }
1327    #[doc = r" Steal an instance of this peripheral"]
1328    #[doc = r""]
1329    #[doc = r" # Safety"]
1330    #[doc = r""]
1331    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1332    #[doc = r" that may race with any existing instances, for example by only"]
1333    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1334    #[doc = r" original peripheral and using critical sections to coordinate"]
1335    #[doc = r" access between multiple new instances."]
1336    #[doc = r""]
1337    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1338    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1339    #[doc = r" no stolen instances are passed to such software."]
1340    pub unsafe fn steal() -> Self {
1341        Self {
1342            _marker: PhantomData,
1343        }
1344    }
1345}
1346impl Deref for SPI1 {
1347    type Target = spi1::RegisterBlock;
1348    #[inline(always)]
1349    fn deref(&self) -> &Self::Target {
1350        unsafe { &*Self::PTR }
1351    }
1352}
1353impl core::fmt::Debug for SPI1 {
1354    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1355        f.debug_struct("SPI1").finish()
1356    }
1357}
1358#[doc = "SPI (Serial Peripheral Interface) Controller 1"]
1359pub mod spi1;
1360#[doc = "SPI (Serial Peripheral Interface) Controller 2"]
1361pub struct SPI2 {
1362    _marker: PhantomData<*const ()>,
1363}
1364unsafe impl Send for SPI2 {}
1365impl SPI2 {
1366    #[doc = r"Pointer to the register block"]
1367    pub const PTR: *const spi2::RegisterBlock = 0x6002_4000 as *const _;
1368    #[doc = r"Return the pointer to the register block"]
1369    #[inline(always)]
1370    pub const fn ptr() -> *const spi2::RegisterBlock {
1371        Self::PTR
1372    }
1373    #[doc = r" Steal an instance of this peripheral"]
1374    #[doc = r""]
1375    #[doc = r" # Safety"]
1376    #[doc = r""]
1377    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1378    #[doc = r" that may race with any existing instances, for example by only"]
1379    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1380    #[doc = r" original peripheral and using critical sections to coordinate"]
1381    #[doc = r" access between multiple new instances."]
1382    #[doc = r""]
1383    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1384    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1385    #[doc = r" no stolen instances are passed to such software."]
1386    pub unsafe fn steal() -> Self {
1387        Self {
1388            _marker: PhantomData,
1389        }
1390    }
1391}
1392impl Deref for SPI2 {
1393    type Target = spi2::RegisterBlock;
1394    #[inline(always)]
1395    fn deref(&self) -> &Self::Target {
1396        unsafe { &*Self::PTR }
1397    }
1398}
1399impl core::fmt::Debug for SPI2 {
1400    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1401        f.debug_struct("SPI2").finish()
1402    }
1403}
1404#[doc = "SPI (Serial Peripheral Interface) Controller 2"]
1405pub mod spi2;
1406#[doc = "System Configuration Registers"]
1407pub struct SYSTEM {
1408    _marker: PhantomData<*const ()>,
1409}
1410unsafe impl Send for SYSTEM {}
1411impl SYSTEM {
1412    #[doc = r"Pointer to the register block"]
1413    pub const PTR: *const system::RegisterBlock = 0x600c_0000 as *const _;
1414    #[doc = r"Return the pointer to the register block"]
1415    #[inline(always)]
1416    pub const fn ptr() -> *const system::RegisterBlock {
1417        Self::PTR
1418    }
1419    #[doc = r" Steal an instance of this peripheral"]
1420    #[doc = r""]
1421    #[doc = r" # Safety"]
1422    #[doc = r""]
1423    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1424    #[doc = r" that may race with any existing instances, for example by only"]
1425    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1426    #[doc = r" original peripheral and using critical sections to coordinate"]
1427    #[doc = r" access between multiple new instances."]
1428    #[doc = r""]
1429    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1430    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1431    #[doc = r" no stolen instances are passed to such software."]
1432    pub unsafe fn steal() -> Self {
1433        Self {
1434            _marker: PhantomData,
1435        }
1436    }
1437}
1438impl Deref for SYSTEM {
1439    type Target = system::RegisterBlock;
1440    #[inline(always)]
1441    fn deref(&self) -> &Self::Target {
1442        unsafe { &*Self::PTR }
1443    }
1444}
1445impl core::fmt::Debug for SYSTEM {
1446    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1447        f.debug_struct("SYSTEM").finish()
1448    }
1449}
1450#[doc = "System Configuration Registers"]
1451pub mod system;
1452#[doc = "System Timer"]
1453pub struct SYSTIMER {
1454    _marker: PhantomData<*const ()>,
1455}
1456unsafe impl Send for SYSTIMER {}
1457impl SYSTIMER {
1458    #[doc = r"Pointer to the register block"]
1459    pub const PTR: *const systimer::RegisterBlock = 0x6002_3000 as *const _;
1460    #[doc = r"Return the pointer to the register block"]
1461    #[inline(always)]
1462    pub const fn ptr() -> *const systimer::RegisterBlock {
1463        Self::PTR
1464    }
1465    #[doc = r" Steal an instance of this peripheral"]
1466    #[doc = r""]
1467    #[doc = r" # Safety"]
1468    #[doc = r""]
1469    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1470    #[doc = r" that may race with any existing instances, for example by only"]
1471    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1472    #[doc = r" original peripheral and using critical sections to coordinate"]
1473    #[doc = r" access between multiple new instances."]
1474    #[doc = r""]
1475    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1476    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1477    #[doc = r" no stolen instances are passed to such software."]
1478    pub unsafe fn steal() -> Self {
1479        Self {
1480            _marker: PhantomData,
1481        }
1482    }
1483}
1484impl Deref for SYSTIMER {
1485    type Target = systimer::RegisterBlock;
1486    #[inline(always)]
1487    fn deref(&self) -> &Self::Target {
1488        unsafe { &*Self::PTR }
1489    }
1490}
1491impl core::fmt::Debug for SYSTIMER {
1492    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1493        f.debug_struct("SYSTIMER").finish()
1494    }
1495}
1496#[doc = "System Timer"]
1497pub mod systimer;
1498#[doc = "Timer Group 0"]
1499pub struct TIMG0 {
1500    _marker: PhantomData<*const ()>,
1501}
1502unsafe impl Send for TIMG0 {}
1503impl TIMG0 {
1504    #[doc = r"Pointer to the register block"]
1505    pub const PTR: *const timg0::RegisterBlock = 0x6001_f000 as *const _;
1506    #[doc = r"Return the pointer to the register block"]
1507    #[inline(always)]
1508    pub const fn ptr() -> *const timg0::RegisterBlock {
1509        Self::PTR
1510    }
1511    #[doc = r" Steal an instance of this peripheral"]
1512    #[doc = r""]
1513    #[doc = r" # Safety"]
1514    #[doc = r""]
1515    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1516    #[doc = r" that may race with any existing instances, for example by only"]
1517    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1518    #[doc = r" original peripheral and using critical sections to coordinate"]
1519    #[doc = r" access between multiple new instances."]
1520    #[doc = r""]
1521    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1522    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1523    #[doc = r" no stolen instances are passed to such software."]
1524    pub unsafe fn steal() -> Self {
1525        Self {
1526            _marker: PhantomData,
1527        }
1528    }
1529}
1530impl Deref for TIMG0 {
1531    type Target = timg0::RegisterBlock;
1532    #[inline(always)]
1533    fn deref(&self) -> &Self::Target {
1534        unsafe { &*Self::PTR }
1535    }
1536}
1537impl core::fmt::Debug for TIMG0 {
1538    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1539        f.debug_struct("TIMG0").finish()
1540    }
1541}
1542#[doc = "Timer Group 0"]
1543pub mod timg0;
1544#[doc = "Timer Group 1"]
1545pub struct TIMG1 {
1546    _marker: PhantomData<*const ()>,
1547}
1548unsafe impl Send for TIMG1 {}
1549impl TIMG1 {
1550    #[doc = r"Pointer to the register block"]
1551    pub const PTR: *const timg0::RegisterBlock = 0x6002_0000 as *const _;
1552    #[doc = r"Return the pointer to the register block"]
1553    #[inline(always)]
1554    pub const fn ptr() -> *const timg0::RegisterBlock {
1555        Self::PTR
1556    }
1557    #[doc = r" Steal an instance of this peripheral"]
1558    #[doc = r""]
1559    #[doc = r" # Safety"]
1560    #[doc = r""]
1561    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1562    #[doc = r" that may race with any existing instances, for example by only"]
1563    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1564    #[doc = r" original peripheral and using critical sections to coordinate"]
1565    #[doc = r" access between multiple new instances."]
1566    #[doc = r""]
1567    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1568    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1569    #[doc = r" no stolen instances are passed to such software."]
1570    pub unsafe fn steal() -> Self {
1571        Self {
1572            _marker: PhantomData,
1573        }
1574    }
1575}
1576impl Deref for TIMG1 {
1577    type Target = timg0::RegisterBlock;
1578    #[inline(always)]
1579    fn deref(&self) -> &Self::Target {
1580        unsafe { &*Self::PTR }
1581    }
1582}
1583impl core::fmt::Debug for TIMG1 {
1584    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1585        f.debug_struct("TIMG1").finish()
1586    }
1587}
1588#[doc = "Timer Group 1"]
1589pub use self::timg0 as timg1;
1590#[doc = "Two-Wire Automotive Interface"]
1591pub struct TWAI0 {
1592    _marker: PhantomData<*const ()>,
1593}
1594unsafe impl Send for TWAI0 {}
1595impl TWAI0 {
1596    #[doc = r"Pointer to the register block"]
1597    pub const PTR: *const twai0::RegisterBlock = 0x6002_b000 as *const _;
1598    #[doc = r"Return the pointer to the register block"]
1599    #[inline(always)]
1600    pub const fn ptr() -> *const twai0::RegisterBlock {
1601        Self::PTR
1602    }
1603    #[doc = r" Steal an instance of this peripheral"]
1604    #[doc = r""]
1605    #[doc = r" # Safety"]
1606    #[doc = r""]
1607    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1608    #[doc = r" that may race with any existing instances, for example by only"]
1609    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1610    #[doc = r" original peripheral and using critical sections to coordinate"]
1611    #[doc = r" access between multiple new instances."]
1612    #[doc = r""]
1613    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1614    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1615    #[doc = r" no stolen instances are passed to such software."]
1616    pub unsafe fn steal() -> Self {
1617        Self {
1618            _marker: PhantomData,
1619        }
1620    }
1621}
1622impl Deref for TWAI0 {
1623    type Target = twai0::RegisterBlock;
1624    #[inline(always)]
1625    fn deref(&self) -> &Self::Target {
1626        unsafe { &*Self::PTR }
1627    }
1628}
1629impl core::fmt::Debug for TWAI0 {
1630    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1631        f.debug_struct("TWAI0").finish()
1632    }
1633}
1634#[doc = "Two-Wire Automotive Interface"]
1635pub mod twai0;
1636#[doc = "UART (Universal Asynchronous Receiver-Transmitter) Controller 0"]
1637pub struct UART0 {
1638    _marker: PhantomData<*const ()>,
1639}
1640unsafe impl Send for UART0 {}
1641impl UART0 {
1642    #[doc = r"Pointer to the register block"]
1643    pub const PTR: *const uart0::RegisterBlock = 0x6000_0000 as *const _;
1644    #[doc = r"Return the pointer to the register block"]
1645    #[inline(always)]
1646    pub const fn ptr() -> *const uart0::RegisterBlock {
1647        Self::PTR
1648    }
1649    #[doc = r" Steal an instance of this peripheral"]
1650    #[doc = r""]
1651    #[doc = r" # Safety"]
1652    #[doc = r""]
1653    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1654    #[doc = r" that may race with any existing instances, for example by only"]
1655    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1656    #[doc = r" original peripheral and using critical sections to coordinate"]
1657    #[doc = r" access between multiple new instances."]
1658    #[doc = r""]
1659    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1660    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1661    #[doc = r" no stolen instances are passed to such software."]
1662    pub unsafe fn steal() -> Self {
1663        Self {
1664            _marker: PhantomData,
1665        }
1666    }
1667}
1668impl Deref for UART0 {
1669    type Target = uart0::RegisterBlock;
1670    #[inline(always)]
1671    fn deref(&self) -> &Self::Target {
1672        unsafe { &*Self::PTR }
1673    }
1674}
1675impl core::fmt::Debug for UART0 {
1676    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1677        f.debug_struct("UART0").finish()
1678    }
1679}
1680#[doc = "UART (Universal Asynchronous Receiver-Transmitter) Controller 0"]
1681pub mod uart0;
1682#[doc = "UART (Universal Asynchronous Receiver-Transmitter) Controller 1"]
1683pub struct UART1 {
1684    _marker: PhantomData<*const ()>,
1685}
1686unsafe impl Send for UART1 {}
1687impl UART1 {
1688    #[doc = r"Pointer to the register block"]
1689    pub const PTR: *const uart0::RegisterBlock = 0x6001_0000 as *const _;
1690    #[doc = r"Return the pointer to the register block"]
1691    #[inline(always)]
1692    pub const fn ptr() -> *const uart0::RegisterBlock {
1693        Self::PTR
1694    }
1695    #[doc = r" Steal an instance of this peripheral"]
1696    #[doc = r""]
1697    #[doc = r" # Safety"]
1698    #[doc = r""]
1699    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1700    #[doc = r" that may race with any existing instances, for example by only"]
1701    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1702    #[doc = r" original peripheral and using critical sections to coordinate"]
1703    #[doc = r" access between multiple new instances."]
1704    #[doc = r""]
1705    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1706    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1707    #[doc = r" no stolen instances are passed to such software."]
1708    pub unsafe fn steal() -> Self {
1709        Self {
1710            _marker: PhantomData,
1711        }
1712    }
1713}
1714impl Deref for UART1 {
1715    type Target = uart0::RegisterBlock;
1716    #[inline(always)]
1717    fn deref(&self) -> &Self::Target {
1718        unsafe { &*Self::PTR }
1719    }
1720}
1721impl core::fmt::Debug for UART1 {
1722    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1723        f.debug_struct("UART1").finish()
1724    }
1725}
1726#[doc = "UART (Universal Asynchronous Receiver-Transmitter) Controller 1"]
1727pub use self::uart0 as uart1;
1728#[doc = "Universal Host Controller Interface 0"]
1729pub struct UHCI0 {
1730    _marker: PhantomData<*const ()>,
1731}
1732unsafe impl Send for UHCI0 {}
1733impl UHCI0 {
1734    #[doc = r"Pointer to the register block"]
1735    pub const PTR: *const uhci0::RegisterBlock = 0x6001_4000 as *const _;
1736    #[doc = r"Return the pointer to the register block"]
1737    #[inline(always)]
1738    pub const fn ptr() -> *const uhci0::RegisterBlock {
1739        Self::PTR
1740    }
1741    #[doc = r" Steal an instance of this peripheral"]
1742    #[doc = r""]
1743    #[doc = r" # Safety"]
1744    #[doc = r""]
1745    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1746    #[doc = r" that may race with any existing instances, for example by only"]
1747    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1748    #[doc = r" original peripheral and using critical sections to coordinate"]
1749    #[doc = r" access between multiple new instances."]
1750    #[doc = r""]
1751    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1752    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1753    #[doc = r" no stolen instances are passed to such software."]
1754    pub unsafe fn steal() -> Self {
1755        Self {
1756            _marker: PhantomData,
1757        }
1758    }
1759}
1760impl Deref for UHCI0 {
1761    type Target = uhci0::RegisterBlock;
1762    #[inline(always)]
1763    fn deref(&self) -> &Self::Target {
1764        unsafe { &*Self::PTR }
1765    }
1766}
1767impl core::fmt::Debug for UHCI0 {
1768    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1769        f.debug_struct("UHCI0").finish()
1770    }
1771}
1772#[doc = "Universal Host Controller Interface 0"]
1773pub mod uhci0;
1774#[doc = "Universal Host Controller Interface 1"]
1775pub struct UHCI1 {
1776    _marker: PhantomData<*const ()>,
1777}
1778unsafe impl Send for UHCI1 {}
1779impl UHCI1 {
1780    #[doc = r"Pointer to the register block"]
1781    pub const PTR: *const uhci0::RegisterBlock = 0x6000_c000 as *const _;
1782    #[doc = r"Return the pointer to the register block"]
1783    #[inline(always)]
1784    pub const fn ptr() -> *const uhci0::RegisterBlock {
1785        Self::PTR
1786    }
1787    #[doc = r" Steal an instance of this peripheral"]
1788    #[doc = r""]
1789    #[doc = r" # Safety"]
1790    #[doc = r""]
1791    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1792    #[doc = r" that may race with any existing instances, for example by only"]
1793    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1794    #[doc = r" original peripheral and using critical sections to coordinate"]
1795    #[doc = r" access between multiple new instances."]
1796    #[doc = r""]
1797    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1798    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1799    #[doc = r" no stolen instances are passed to such software."]
1800    pub unsafe fn steal() -> Self {
1801        Self {
1802            _marker: PhantomData,
1803        }
1804    }
1805}
1806impl Deref for UHCI1 {
1807    type Target = uhci0::RegisterBlock;
1808    #[inline(always)]
1809    fn deref(&self) -> &Self::Target {
1810        unsafe { &*Self::PTR }
1811    }
1812}
1813impl core::fmt::Debug for UHCI1 {
1814    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1815        f.debug_struct("UHCI1").finish()
1816    }
1817}
1818#[doc = "Universal Host Controller Interface 1"]
1819pub use self::uhci0 as uhci1;
1820#[doc = "Full-speed USB Serial/JTAG Controller"]
1821pub struct USB_DEVICE {
1822    _marker: PhantomData<*const ()>,
1823}
1824unsafe impl Send for USB_DEVICE {}
1825impl USB_DEVICE {
1826    #[doc = r"Pointer to the register block"]
1827    pub const PTR: *const usb_device::RegisterBlock = 0x6004_3000 as *const _;
1828    #[doc = r"Return the pointer to the register block"]
1829    #[inline(always)]
1830    pub const fn ptr() -> *const usb_device::RegisterBlock {
1831        Self::PTR
1832    }
1833    #[doc = r" Steal an instance of this peripheral"]
1834    #[doc = r""]
1835    #[doc = r" # Safety"]
1836    #[doc = r""]
1837    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1838    #[doc = r" that may race with any existing instances, for example by only"]
1839    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1840    #[doc = r" original peripheral and using critical sections to coordinate"]
1841    #[doc = r" access between multiple new instances."]
1842    #[doc = r""]
1843    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1844    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1845    #[doc = r" no stolen instances are passed to such software."]
1846    pub unsafe fn steal() -> Self {
1847        Self {
1848            _marker: PhantomData,
1849        }
1850    }
1851}
1852impl Deref for USB_DEVICE {
1853    type Target = usb_device::RegisterBlock;
1854    #[inline(always)]
1855    fn deref(&self) -> &Self::Target {
1856        unsafe { &*Self::PTR }
1857    }
1858}
1859impl core::fmt::Debug for USB_DEVICE {
1860    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1861        f.debug_struct("USB_DEVICE").finish()
1862    }
1863}
1864#[doc = "Full-speed USB Serial/JTAG Controller"]
1865pub mod usb_device;
1866#[doc = "XTS-AES-128 Flash Encryption"]
1867pub struct XTS_AES {
1868    _marker: PhantomData<*const ()>,
1869}
1870unsafe impl Send for XTS_AES {}
1871impl XTS_AES {
1872    #[doc = r"Pointer to the register block"]
1873    pub const PTR: *const xts_aes::RegisterBlock = 0x600c_c000 as *const _;
1874    #[doc = r"Return the pointer to the register block"]
1875    #[inline(always)]
1876    pub const fn ptr() -> *const xts_aes::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 XTS_AES {
1899    type Target = xts_aes::RegisterBlock;
1900    #[inline(always)]
1901    fn deref(&self) -> &Self::Target {
1902        unsafe { &*Self::PTR }
1903    }
1904}
1905impl core::fmt::Debug for XTS_AES {
1906    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1907        f.debug_struct("XTS_AES").finish()
1908    }
1909}
1910#[doc = "XTS-AES-128 Flash Encryption"]
1911pub mod xts_aes;
1912#[doc = "NRX Peripheral"]
1913pub struct NRX {
1914    _marker: PhantomData<*const ()>,
1915}
1916unsafe impl Send for NRX {}
1917impl NRX {
1918    #[doc = r"Pointer to the register block"]
1919    pub const PTR: *const nrx::RegisterBlock = 0x6001_cc00 as *const _;
1920    #[doc = r"Return the pointer to the register block"]
1921    #[inline(always)]
1922    pub const fn ptr() -> *const nrx::RegisterBlock {
1923        Self::PTR
1924    }
1925    #[doc = r" Steal an instance of this peripheral"]
1926    #[doc = r""]
1927    #[doc = r" # Safety"]
1928    #[doc = r""]
1929    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1930    #[doc = r" that may race with any existing instances, for example by only"]
1931    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1932    #[doc = r" original peripheral and using critical sections to coordinate"]
1933    #[doc = r" access between multiple new instances."]
1934    #[doc = r""]
1935    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1936    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1937    #[doc = r" no stolen instances are passed to such software."]
1938    pub unsafe fn steal() -> Self {
1939        Self {
1940            _marker: PhantomData,
1941        }
1942    }
1943}
1944impl Deref for NRX {
1945    type Target = nrx::RegisterBlock;
1946    #[inline(always)]
1947    fn deref(&self) -> &Self::Target {
1948        unsafe { &*Self::PTR }
1949    }
1950}
1951impl core::fmt::Debug for NRX {
1952    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1953        f.debug_struct("NRX").finish()
1954    }
1955}
1956#[doc = "NRX Peripheral"]
1957pub mod nrx;
1958#[doc = "need des"]
1959pub struct FE {
1960    _marker: PhantomData<*const ()>,
1961}
1962unsafe impl Send for FE {}
1963impl FE {
1964    #[doc = r"Pointer to the register block"]
1965    pub const PTR: *const fe::RegisterBlock = 0x6000_6000 as *const _;
1966    #[doc = r"Return the pointer to the register block"]
1967    #[inline(always)]
1968    pub const fn ptr() -> *const fe::RegisterBlock {
1969        Self::PTR
1970    }
1971    #[doc = r" Steal an instance of this peripheral"]
1972    #[doc = r""]
1973    #[doc = r" # Safety"]
1974    #[doc = r""]
1975    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1976    #[doc = r" that may race with any existing instances, for example by only"]
1977    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1978    #[doc = r" original peripheral and using critical sections to coordinate"]
1979    #[doc = r" access between multiple new instances."]
1980    #[doc = r""]
1981    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1982    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1983    #[doc = r" no stolen instances are passed to such software."]
1984    pub unsafe fn steal() -> Self {
1985        Self {
1986            _marker: PhantomData,
1987        }
1988    }
1989}
1990impl Deref for FE {
1991    type Target = fe::RegisterBlock;
1992    #[inline(always)]
1993    fn deref(&self) -> &Self::Target {
1994        unsafe { &*Self::PTR }
1995    }
1996}
1997impl core::fmt::Debug for FE {
1998    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1999        f.debug_struct("FE").finish()
2000    }
2001}
2002#[doc = "need des"]
2003pub mod fe;
2004#[doc = "need des"]
2005pub struct FE2 {
2006    _marker: PhantomData<*const ()>,
2007}
2008unsafe impl Send for FE2 {}
2009impl FE2 {
2010    #[doc = r"Pointer to the register block"]
2011    pub const PTR: *const fe2::RegisterBlock = 0x6000_5000 as *const _;
2012    #[doc = r"Return the pointer to the register block"]
2013    #[inline(always)]
2014    pub const fn ptr() -> *const fe2::RegisterBlock {
2015        Self::PTR
2016    }
2017    #[doc = r" Steal an instance of this peripheral"]
2018    #[doc = r""]
2019    #[doc = r" # Safety"]
2020    #[doc = r""]
2021    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2022    #[doc = r" that may race with any existing instances, for example by only"]
2023    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2024    #[doc = r" original peripheral and using critical sections to coordinate"]
2025    #[doc = r" access between multiple new instances."]
2026    #[doc = r""]
2027    #[doc = r" Additionally, other software such as HALs may rely on only one"]
2028    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2029    #[doc = r" no stolen instances are passed to such software."]
2030    pub unsafe fn steal() -> Self {
2031        Self {
2032            _marker: PhantomData,
2033        }
2034    }
2035}
2036impl Deref for FE2 {
2037    type Target = fe2::RegisterBlock;
2038    #[inline(always)]
2039    fn deref(&self) -> &Self::Target {
2040        unsafe { &*Self::PTR }
2041    }
2042}
2043impl core::fmt::Debug for FE2 {
2044    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2045        f.debug_struct("FE2").finish()
2046    }
2047}
2048#[doc = "need des"]
2049pub mod fe2;
2050#[doc = "I2C_MST_ANA Peripheral"]
2051pub struct I2C_ANA_MST {
2052    _marker: PhantomData<*const ()>,
2053}
2054unsafe impl Send for I2C_ANA_MST {}
2055impl I2C_ANA_MST {
2056    #[doc = r"Pointer to the register block"]
2057    pub const PTR: *const i2c_ana_mst::RegisterBlock = 0x6000_e040 as *const _;
2058    #[doc = r"Return the pointer to the register block"]
2059    #[inline(always)]
2060    pub const fn ptr() -> *const i2c_ana_mst::RegisterBlock {
2061        Self::PTR
2062    }
2063    #[doc = r" Steal an instance of this peripheral"]
2064    #[doc = r""]
2065    #[doc = r" # Safety"]
2066    #[doc = r""]
2067    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2068    #[doc = r" that may race with any existing instances, for example by only"]
2069    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2070    #[doc = r" original peripheral and using critical sections to coordinate"]
2071    #[doc = r" access between multiple new instances."]
2072    #[doc = r""]
2073    #[doc = r" Additionally, other software such as HALs may rely on only one"]
2074    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2075    #[doc = r" no stolen instances are passed to such software."]
2076    pub unsafe fn steal() -> Self {
2077        Self {
2078            _marker: PhantomData,
2079        }
2080    }
2081}
2082impl Deref for I2C_ANA_MST {
2083    type Target = i2c_ana_mst::RegisterBlock;
2084    #[inline(always)]
2085    fn deref(&self) -> &Self::Target {
2086        unsafe { &*Self::PTR }
2087    }
2088}
2089impl core::fmt::Debug for I2C_ANA_MST {
2090    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2091        f.debug_struct("I2C_ANA_MST").finish()
2092    }
2093}
2094#[doc = "I2C_MST_ANA Peripheral"]
2095pub mod i2c_ana_mst;
2096#[no_mangle]
2097static mut DEVICE_PERIPHERALS: bool = false;
2098#[doc = r" All the peripherals."]
2099#[allow(non_snake_case)]
2100pub struct Peripherals {
2101    #[doc = "AES"]
2102    pub AES: AES,
2103    #[doc = "APB_CTRL"]
2104    pub APB_CTRL: APB_CTRL,
2105    #[doc = "APB_SARADC"]
2106    pub APB_SARADC: APB_SARADC,
2107    #[doc = "ASSIST_DEBUG"]
2108    pub ASSIST_DEBUG: ASSIST_DEBUG,
2109    #[doc = "BB"]
2110    pub BB: BB,
2111    #[doc = "DMA"]
2112    pub DMA: DMA,
2113    #[doc = "DS"]
2114    pub DS: DS,
2115    #[doc = "EFUSE"]
2116    pub EFUSE: EFUSE,
2117    #[doc = "EXTMEM"]
2118    pub EXTMEM: EXTMEM,
2119    #[doc = "GPIO"]
2120    pub GPIO: GPIO,
2121    #[doc = "GPIO_SD"]
2122    pub GPIO_SD: GPIO_SD,
2123    #[doc = "HMAC"]
2124    pub HMAC: HMAC,
2125    #[doc = "I2C0"]
2126    pub I2C0: I2C0,
2127    #[doc = "I2S0"]
2128    pub I2S0: I2S0,
2129    #[doc = "INTERRUPT_CORE0"]
2130    pub INTERRUPT_CORE0: INTERRUPT_CORE0,
2131    #[doc = "IO_MUX"]
2132    pub IO_MUX: IO_MUX,
2133    #[doc = "LEDC"]
2134    pub LEDC: LEDC,
2135    #[doc = "RMT"]
2136    pub RMT: RMT,
2137    #[doc = "RNG"]
2138    pub RNG: RNG,
2139    #[doc = "RSA"]
2140    pub RSA: RSA,
2141    #[doc = "RTC_CNTL"]
2142    pub RTC_CNTL: RTC_CNTL,
2143    #[doc = "SENSITIVE"]
2144    pub SENSITIVE: SENSITIVE,
2145    #[doc = "SHA"]
2146    pub SHA: SHA,
2147    #[doc = "SPI0"]
2148    pub SPI0: SPI0,
2149    #[doc = "SPI1"]
2150    pub SPI1: SPI1,
2151    #[doc = "SPI2"]
2152    pub SPI2: SPI2,
2153    #[doc = "SYSTEM"]
2154    pub SYSTEM: SYSTEM,
2155    #[doc = "SYSTIMER"]
2156    pub SYSTIMER: SYSTIMER,
2157    #[doc = "TIMG0"]
2158    pub TIMG0: TIMG0,
2159    #[doc = "TIMG1"]
2160    pub TIMG1: TIMG1,
2161    #[doc = "TWAI0"]
2162    pub TWAI0: TWAI0,
2163    #[doc = "UART0"]
2164    pub UART0: UART0,
2165    #[doc = "UART1"]
2166    pub UART1: UART1,
2167    #[doc = "UHCI0"]
2168    pub UHCI0: UHCI0,
2169    #[doc = "UHCI1"]
2170    pub UHCI1: UHCI1,
2171    #[doc = "USB_DEVICE"]
2172    pub USB_DEVICE: USB_DEVICE,
2173    #[doc = "XTS_AES"]
2174    pub XTS_AES: XTS_AES,
2175    #[doc = "NRX"]
2176    pub NRX: NRX,
2177    #[doc = "FE"]
2178    pub FE: FE,
2179    #[doc = "FE2"]
2180    pub FE2: FE2,
2181    #[doc = "I2C_ANA_MST"]
2182    pub I2C_ANA_MST: I2C_ANA_MST,
2183}
2184impl Peripherals {
2185    #[doc = r" Returns all the peripherals *once*."]
2186    #[cfg(feature = "critical-section")]
2187    #[inline]
2188    pub fn take() -> Option<Self> {
2189        critical_section::with(|_| {
2190            if unsafe { DEVICE_PERIPHERALS } {
2191                return None;
2192            }
2193            Some(unsafe { Peripherals::steal() })
2194        })
2195    }
2196    #[doc = r" Unchecked version of `Peripherals::take`."]
2197    #[doc = r""]
2198    #[doc = r" # Safety"]
2199    #[doc = r""]
2200    #[doc = r" Each of the returned peripherals must be used at most once."]
2201    #[inline]
2202    pub unsafe fn steal() -> Self {
2203        DEVICE_PERIPHERALS = true;
2204        Peripherals {
2205            AES: AES::steal(),
2206            APB_CTRL: APB_CTRL::steal(),
2207            APB_SARADC: APB_SARADC::steal(),
2208            ASSIST_DEBUG: ASSIST_DEBUG::steal(),
2209            BB: BB::steal(),
2210            DMA: DMA::steal(),
2211            DS: DS::steal(),
2212            EFUSE: EFUSE::steal(),
2213            EXTMEM: EXTMEM::steal(),
2214            GPIO: GPIO::steal(),
2215            GPIO_SD: GPIO_SD::steal(),
2216            HMAC: HMAC::steal(),
2217            I2C0: I2C0::steal(),
2218            I2S0: I2S0::steal(),
2219            INTERRUPT_CORE0: INTERRUPT_CORE0::steal(),
2220            IO_MUX: IO_MUX::steal(),
2221            LEDC: LEDC::steal(),
2222            RMT: RMT::steal(),
2223            RNG: RNG::steal(),
2224            RSA: RSA::steal(),
2225            RTC_CNTL: RTC_CNTL::steal(),
2226            SENSITIVE: SENSITIVE::steal(),
2227            SHA: SHA::steal(),
2228            SPI0: SPI0::steal(),
2229            SPI1: SPI1::steal(),
2230            SPI2: SPI2::steal(),
2231            SYSTEM: SYSTEM::steal(),
2232            SYSTIMER: SYSTIMER::steal(),
2233            TIMG0: TIMG0::steal(),
2234            TIMG1: TIMG1::steal(),
2235            TWAI0: TWAI0::steal(),
2236            UART0: UART0::steal(),
2237            UART1: UART1::steal(),
2238            UHCI0: UHCI0::steal(),
2239            UHCI1: UHCI1::steal(),
2240            USB_DEVICE: USB_DEVICE::steal(),
2241            XTS_AES: XTS_AES::steal(),
2242            NRX: NRX::steal(),
2243            FE: FE::steal(),
2244            FE2: FE2::steal(),
2245            I2C_ANA_MST: I2C_ANA_MST::steal(),
2246        }
2247    }
2248}