muscab1_pac/
lib.rs

1#![doc = "Peripheral access API for MUSCA_B1 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]
2svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.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"]
3#![allow(non_camel_case_types)]
4#![allow(non_snake_case)]
5#![no_std]
6use core::marker::PhantomData;
7use core::ops::Deref;
8#[doc = r"Number available in the NVIC for configuring priority"]
9pub const NVIC_PRIO_BITS: u8 = 4;
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 NONSEC_WATCHDOG_IRQ();
17    fn TIMER0();
18    fn DUALTIMER();
19    fn MHU0();
20    fn MHU1();
21    fn MPC();
22    fn GPTIMERINTR();
23    fn QSPIINTR();
24    fn UARTRXINTR0();
25    fn GPIO0();
26    fn PWMINT0();
27}
28#[doc(hidden)]
29#[repr(C)]
30pub union Vector {
31    _handler: unsafe extern "C" fn(),
32    _reserved: u32,
33}
34#[cfg(feature = "rt")]
35#[doc(hidden)]
36#[link_section = ".vector_table.interrupts"]
37#[no_mangle]
38pub static __INTERRUPTS: [Vector; 71] = [
39    Vector { _reserved: 0 },
40    Vector {
41        _handler: NONSEC_WATCHDOG_IRQ,
42    },
43    Vector { _reserved: 0 },
44    Vector { _handler: TIMER0 },
45    Vector { _reserved: 0 },
46    Vector {
47        _handler: DUALTIMER,
48    },
49    Vector { _handler: MHU0 },
50    Vector { _handler: MHU1 },
51    Vector { _reserved: 0 },
52    Vector { _handler: MPC },
53    Vector { _reserved: 0 },
54    Vector { _reserved: 0 },
55    Vector { _reserved: 0 },
56    Vector { _reserved: 0 },
57    Vector { _reserved: 0 },
58    Vector { _reserved: 0 },
59    Vector { _reserved: 0 },
60    Vector { _reserved: 0 },
61    Vector { _reserved: 0 },
62    Vector { _reserved: 0 },
63    Vector { _reserved: 0 },
64    Vector { _reserved: 0 },
65    Vector { _reserved: 0 },
66    Vector { _reserved: 0 },
67    Vector { _reserved: 0 },
68    Vector { _reserved: 0 },
69    Vector { _reserved: 0 },
70    Vector { _reserved: 0 },
71    Vector { _reserved: 0 },
72    Vector { _reserved: 0 },
73    Vector { _reserved: 0 },
74    Vector { _reserved: 0 },
75    Vector { _reserved: 0 },
76    Vector {
77        _handler: GPTIMERINTR,
78    },
79    Vector { _reserved: 0 },
80    Vector { _reserved: 0 },
81    Vector { _reserved: 0 },
82    Vector { _reserved: 0 },
83    Vector { _handler: QSPIINTR },
84    Vector {
85        _handler: UARTRXINTR0,
86    },
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 { _reserved: 0 },
99    Vector { _reserved: 0 },
100    Vector { _reserved: 0 },
101    Vector { _reserved: 0 },
102    Vector { _reserved: 0 },
103    Vector { _reserved: 0 },
104    Vector { _reserved: 0 },
105    Vector { _reserved: 0 },
106    Vector { _reserved: 0 },
107    Vector { _reserved: 0 },
108    Vector { _reserved: 0 },
109    Vector { _reserved: 0 },
110    Vector { _reserved: 0 },
111    Vector { _reserved: 0 },
112    Vector { _reserved: 0 },
113    Vector { _reserved: 0 },
114    Vector { _reserved: 0 },
115    Vector { _handler: GPIO0 },
116    Vector { _reserved: 0 },
117    Vector { _handler: PWMINT0 },
118];
119#[doc = r"Enumeration of all the interrupts."]
120#[derive(Copy, Clone, Debug, PartialEq, Eq)]
121#[repr(u16)]
122pub enum Interrupt {
123    #[doc = "1 - Non-Secure Watchdog Interrupt"]
124    NONSEC_WATCHDOG_IRQ = 1,
125    #[doc = "3 - Timer 0"]
126    TIMER0 = 3,
127    #[doc = "5 - Dual Timer"]
128    DUALTIMER = 5,
129    #[doc = "6 - MHU0 CPU0 Interrupt, MHU0 CPU1 Interrupt"]
130    MHU0 = 6,
131    #[doc = "7 - MHU1 CPU0 Interrupt, MHU1 CPU1 Interrupt"]
132    MHU1 = 7,
133    #[doc = "9 - MPC Combined"]
134    MPC = 9,
135    #[doc = "33 - General-Purpose Timer interrupt"]
136    GPTIMERINTR = 33,
137    #[doc = "38 - QSPI interrupt"]
138    QSPIINTR = 38,
139    #[doc = "39 - UART0 receive FIFO interrupt"]
140    UARTRXINTR0 = 39,
141    #[doc = "68 - GPIO 0 combined"]
142    GPIO0 = 68,
143    #[doc = "70 - PWM0 interrupt"]
144    PWMINT0 = 70,
145}
146unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
147    #[inline(always)]
148    fn number(self) -> u16 {
149        self as u16
150    }
151}
152#[doc = "System Information"]
153pub struct Sysinfo {
154    _marker: PhantomData<*const ()>,
155}
156unsafe impl Send for Sysinfo {}
157impl Sysinfo {
158    #[doc = r"Pointer to the register block"]
159    pub const PTR: *const sysinfo::RegisterBlock = 0x4002_0000 as *const _;
160    #[doc = r"Return the pointer to the register block"]
161    #[inline(always)]
162    pub const fn ptr() -> *const sysinfo::RegisterBlock {
163        Self::PTR
164    }
165    #[doc = r" Steal an instance of this peripheral"]
166    #[doc = r""]
167    #[doc = r" # Safety"]
168    #[doc = r""]
169    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
170    #[doc = r" that may race with any existing instances, for example by only"]
171    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
172    #[doc = r" original peripheral and using critical sections to coordinate"]
173    #[doc = r" access between multiple new instances."]
174    #[doc = r""]
175    #[doc = r" Additionally, other software such as HALs may rely on only one"]
176    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
177    #[doc = r" no stolen instances are passed to such software."]
178    pub unsafe fn steal() -> Self {
179        Self {
180            _marker: PhantomData,
181        }
182    }
183}
184impl Deref for Sysinfo {
185    type Target = sysinfo::RegisterBlock;
186    #[inline(always)]
187    fn deref(&self) -> &Self::Target {
188        unsafe { &*Self::PTR }
189    }
190}
191impl core::fmt::Debug for Sysinfo {
192    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
193        f.debug_struct("Sysinfo").finish()
194    }
195}
196#[doc = "System Information"]
197pub mod sysinfo;
198#[doc = "System Information (Secure)"]
199pub struct SysinfoSecure {
200    _marker: PhantomData<*const ()>,
201}
202unsafe impl Send for SysinfoSecure {}
203impl SysinfoSecure {
204    #[doc = r"Pointer to the register block"]
205    pub const PTR: *const sysinfo::RegisterBlock = 0x5002_0000 as *const _;
206    #[doc = r"Return the pointer to the register block"]
207    #[inline(always)]
208    pub const fn ptr() -> *const sysinfo::RegisterBlock {
209        Self::PTR
210    }
211    #[doc = r" Steal an instance of this peripheral"]
212    #[doc = r""]
213    #[doc = r" # Safety"]
214    #[doc = r""]
215    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
216    #[doc = r" that may race with any existing instances, for example by only"]
217    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
218    #[doc = r" original peripheral and using critical sections to coordinate"]
219    #[doc = r" access between multiple new instances."]
220    #[doc = r""]
221    #[doc = r" Additionally, other software such as HALs may rely on only one"]
222    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
223    #[doc = r" no stolen instances are passed to such software."]
224    pub unsafe fn steal() -> Self {
225        Self {
226            _marker: PhantomData,
227        }
228    }
229}
230impl Deref for SysinfoSecure {
231    type Target = sysinfo::RegisterBlock;
232    #[inline(always)]
233    fn deref(&self) -> &Self::Target {
234        unsafe { &*Self::PTR }
235    }
236}
237impl core::fmt::Debug for SysinfoSecure {
238    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
239        f.debug_struct("SysinfoSecure").finish()
240    }
241}
242#[doc = "System Information (Secure)"]
243pub use self::sysinfo as sysinfo_secure;
244#[doc = "System Control"]
245pub struct SystemControl {
246    _marker: PhantomData<*const ()>,
247}
248unsafe impl Send for SystemControl {}
249impl SystemControl {
250    #[doc = r"Pointer to the register block"]
251    pub const PTR: *const system_control::RegisterBlock = 0x5002_1000 as *const _;
252    #[doc = r"Return the pointer to the register block"]
253    #[inline(always)]
254    pub const fn ptr() -> *const system_control::RegisterBlock {
255        Self::PTR
256    }
257    #[doc = r" Steal an instance of this peripheral"]
258    #[doc = r""]
259    #[doc = r" # Safety"]
260    #[doc = r""]
261    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
262    #[doc = r" that may race with any existing instances, for example by only"]
263    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
264    #[doc = r" original peripheral and using critical sections to coordinate"]
265    #[doc = r" access between multiple new instances."]
266    #[doc = r""]
267    #[doc = r" Additionally, other software such as HALs may rely on only one"]
268    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
269    #[doc = r" no stolen instances are passed to such software."]
270    pub unsafe fn steal() -> Self {
271        Self {
272            _marker: PhantomData,
273        }
274    }
275}
276impl Deref for SystemControl {
277    type Target = system_control::RegisterBlock;
278    #[inline(always)]
279    fn deref(&self) -> &Self::Target {
280        unsafe { &*Self::PTR }
281    }
282}
283impl core::fmt::Debug for SystemControl {
284    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
285        f.debug_struct("SystemControl").finish()
286    }
287}
288#[doc = "System Control"]
289pub mod system_control;
290#[doc = "Security Attribution Unit"]
291pub struct Sau {
292    _marker: PhantomData<*const ()>,
293}
294unsafe impl Send for Sau {}
295impl Sau {
296    #[doc = r"Pointer to the register block"]
297    pub const PTR: *const sau::RegisterBlock = 0xe000_edd0 as *const _;
298    #[doc = r"Return the pointer to the register block"]
299    #[inline(always)]
300    pub const fn ptr() -> *const sau::RegisterBlock {
301        Self::PTR
302    }
303    #[doc = r" Steal an instance of this peripheral"]
304    #[doc = r""]
305    #[doc = r" # Safety"]
306    #[doc = r""]
307    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
308    #[doc = r" that may race with any existing instances, for example by only"]
309    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
310    #[doc = r" original peripheral and using critical sections to coordinate"]
311    #[doc = r" access between multiple new instances."]
312    #[doc = r""]
313    #[doc = r" Additionally, other software such as HALs may rely on only one"]
314    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
315    #[doc = r" no stolen instances are passed to such software."]
316    pub unsafe fn steal() -> Self {
317        Self {
318            _marker: PhantomData,
319        }
320    }
321}
322impl Deref for Sau {
323    type Target = sau::RegisterBlock;
324    #[inline(always)]
325    fn deref(&self) -> &Self::Target {
326        unsafe { &*Self::PTR }
327    }
328}
329impl core::fmt::Debug for Sau {
330    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
331        f.debug_struct("Sau").finish()
332    }
333}
334#[doc = "Security Attribution Unit"]
335pub mod sau;
336#[doc = "Timer 0"]
337pub struct Timer0 {
338    _marker: PhantomData<*const ()>,
339}
340unsafe impl Send for Timer0 {}
341impl Timer0 {
342    #[doc = r"Pointer to the register block"]
343    pub const PTR: *const timer0::RegisterBlock = 0x4000_0000 as *const _;
344    #[doc = r"Return the pointer to the register block"]
345    #[inline(always)]
346    pub const fn ptr() -> *const timer0::RegisterBlock {
347        Self::PTR
348    }
349    #[doc = r" Steal an instance of this peripheral"]
350    #[doc = r""]
351    #[doc = r" # Safety"]
352    #[doc = r""]
353    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
354    #[doc = r" that may race with any existing instances, for example by only"]
355    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
356    #[doc = r" original peripheral and using critical sections to coordinate"]
357    #[doc = r" access between multiple new instances."]
358    #[doc = r""]
359    #[doc = r" Additionally, other software such as HALs may rely on only one"]
360    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
361    #[doc = r" no stolen instances are passed to such software."]
362    pub unsafe fn steal() -> Self {
363        Self {
364            _marker: PhantomData,
365        }
366    }
367}
368impl Deref for Timer0 {
369    type Target = timer0::RegisterBlock;
370    #[inline(always)]
371    fn deref(&self) -> &Self::Target {
372        unsafe { &*Self::PTR }
373    }
374}
375impl core::fmt::Debug for Timer0 {
376    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
377        f.debug_struct("Timer0").finish()
378    }
379}
380#[doc = "Timer 0"]
381pub mod timer0;
382#[doc = "Dual Timer"]
383pub struct Dualtimer {
384    _marker: PhantomData<*const ()>,
385}
386unsafe impl Send for Dualtimer {}
387impl Dualtimer {
388    #[doc = r"Pointer to the register block"]
389    pub const PTR: *const dualtimer::RegisterBlock = 0x4000_2000 as *const _;
390    #[doc = r"Return the pointer to the register block"]
391    #[inline(always)]
392    pub const fn ptr() -> *const dualtimer::RegisterBlock {
393        Self::PTR
394    }
395    #[doc = r" Steal an instance of this peripheral"]
396    #[doc = r""]
397    #[doc = r" # Safety"]
398    #[doc = r""]
399    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
400    #[doc = r" that may race with any existing instances, for example by only"]
401    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
402    #[doc = r" original peripheral and using critical sections to coordinate"]
403    #[doc = r" access between multiple new instances."]
404    #[doc = r""]
405    #[doc = r" Additionally, other software such as HALs may rely on only one"]
406    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
407    #[doc = r" no stolen instances are passed to such software."]
408    pub unsafe fn steal() -> Self {
409        Self {
410            _marker: PhantomData,
411        }
412    }
413}
414impl Deref for Dualtimer {
415    type Target = dualtimer::RegisterBlock;
416    #[inline(always)]
417    fn deref(&self) -> &Self::Target {
418        unsafe { &*Self::PTR }
419    }
420}
421impl core::fmt::Debug for Dualtimer {
422    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
423        f.debug_struct("Dualtimer").finish()
424    }
425}
426#[doc = "Dual Timer"]
427pub mod dualtimer;
428#[doc = "General-Purpose Timer"]
429pub struct Gptimer {
430    _marker: PhantomData<*const ()>,
431}
432unsafe impl Send for Gptimer {}
433impl Gptimer {
434    #[doc = r"Pointer to the register block"]
435    pub const PTR: *const gptimer::RegisterBlock = 0x4010_c000 as *const _;
436    #[doc = r"Return the pointer to the register block"]
437    #[inline(always)]
438    pub const fn ptr() -> *const gptimer::RegisterBlock {
439        Self::PTR
440    }
441    #[doc = r" Steal an instance of this peripheral"]
442    #[doc = r""]
443    #[doc = r" # Safety"]
444    #[doc = r""]
445    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
446    #[doc = r" that may race with any existing instances, for example by only"]
447    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
448    #[doc = r" original peripheral and using critical sections to coordinate"]
449    #[doc = r" access between multiple new instances."]
450    #[doc = r""]
451    #[doc = r" Additionally, other software such as HALs may rely on only one"]
452    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
453    #[doc = r" no stolen instances are passed to such software."]
454    pub unsafe fn steal() -> Self {
455        Self {
456            _marker: PhantomData,
457        }
458    }
459}
460impl Deref for Gptimer {
461    type Target = gptimer::RegisterBlock;
462    #[inline(always)]
463    fn deref(&self) -> &Self::Target {
464        unsafe { &*Self::PTR }
465    }
466}
467impl core::fmt::Debug for Gptimer {
468    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
469        f.debug_struct("Gptimer").finish()
470    }
471}
472#[doc = "General-Purpose Timer"]
473pub mod gptimer;
474#[doc = "Timer 0 (Secure)"]
475pub struct Timer0Secure {
476    _marker: PhantomData<*const ()>,
477}
478unsafe impl Send for Timer0Secure {}
479impl Timer0Secure {
480    #[doc = r"Pointer to the register block"]
481    pub const PTR: *const timer0::RegisterBlock = 0x5000_0000 as *const _;
482    #[doc = r"Return the pointer to the register block"]
483    #[inline(always)]
484    pub const fn ptr() -> *const timer0::RegisterBlock {
485        Self::PTR
486    }
487    #[doc = r" Steal an instance of this peripheral"]
488    #[doc = r""]
489    #[doc = r" # Safety"]
490    #[doc = r""]
491    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
492    #[doc = r" that may race with any existing instances, for example by only"]
493    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
494    #[doc = r" original peripheral and using critical sections to coordinate"]
495    #[doc = r" access between multiple new instances."]
496    #[doc = r""]
497    #[doc = r" Additionally, other software such as HALs may rely on only one"]
498    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
499    #[doc = r" no stolen instances are passed to such software."]
500    pub unsafe fn steal() -> Self {
501        Self {
502            _marker: PhantomData,
503        }
504    }
505}
506impl Deref for Timer0Secure {
507    type Target = timer0::RegisterBlock;
508    #[inline(always)]
509    fn deref(&self) -> &Self::Target {
510        unsafe { &*Self::PTR }
511    }
512}
513impl core::fmt::Debug for Timer0Secure {
514    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
515        f.debug_struct("Timer0Secure").finish()
516    }
517}
518#[doc = "Timer 0 (Secure)"]
519pub use self::timer0 as timer0_secure;
520#[doc = "Dual Timer (Secure)"]
521pub struct DualtimerSecure {
522    _marker: PhantomData<*const ()>,
523}
524unsafe impl Send for DualtimerSecure {}
525impl DualtimerSecure {
526    #[doc = r"Pointer to the register block"]
527    pub const PTR: *const dualtimer::RegisterBlock = 0x5000_2000 as *const _;
528    #[doc = r"Return the pointer to the register block"]
529    #[inline(always)]
530    pub const fn ptr() -> *const dualtimer::RegisterBlock {
531        Self::PTR
532    }
533    #[doc = r" Steal an instance of this peripheral"]
534    #[doc = r""]
535    #[doc = r" # Safety"]
536    #[doc = r""]
537    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
538    #[doc = r" that may race with any existing instances, for example by only"]
539    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
540    #[doc = r" original peripheral and using critical sections to coordinate"]
541    #[doc = r" access between multiple new instances."]
542    #[doc = r""]
543    #[doc = r" Additionally, other software such as HALs may rely on only one"]
544    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
545    #[doc = r" no stolen instances are passed to such software."]
546    pub unsafe fn steal() -> Self {
547        Self {
548            _marker: PhantomData,
549        }
550    }
551}
552impl Deref for DualtimerSecure {
553    type Target = dualtimer::RegisterBlock;
554    #[inline(always)]
555    fn deref(&self) -> &Self::Target {
556        unsafe { &*Self::PTR }
557    }
558}
559impl core::fmt::Debug for DualtimerSecure {
560    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
561        f.debug_struct("DualtimerSecure").finish()
562    }
563}
564#[doc = "Dual Timer (Secure)"]
565pub use self::dualtimer as dualtimer_secure;
566#[doc = "General-Purpose Timer (Secure)"]
567pub struct GptimerSecure {
568    _marker: PhantomData<*const ()>,
569}
570unsafe impl Send for GptimerSecure {}
571impl GptimerSecure {
572    #[doc = r"Pointer to the register block"]
573    pub const PTR: *const gptimer::RegisterBlock = 0x5010_c000 as *const _;
574    #[doc = r"Return the pointer to the register block"]
575    #[inline(always)]
576    pub const fn ptr() -> *const gptimer::RegisterBlock {
577        Self::PTR
578    }
579    #[doc = r" Steal an instance of this peripheral"]
580    #[doc = r""]
581    #[doc = r" # Safety"]
582    #[doc = r""]
583    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
584    #[doc = r" that may race with any existing instances, for example by only"]
585    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
586    #[doc = r" original peripheral and using critical sections to coordinate"]
587    #[doc = r" access between multiple new instances."]
588    #[doc = r""]
589    #[doc = r" Additionally, other software such as HALs may rely on only one"]
590    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
591    #[doc = r" no stolen instances are passed to such software."]
592    pub unsafe fn steal() -> Self {
593        Self {
594            _marker: PhantomData,
595        }
596    }
597}
598impl Deref for GptimerSecure {
599    type Target = gptimer::RegisterBlock;
600    #[inline(always)]
601    fn deref(&self) -> &Self::Target {
602        unsafe { &*Self::PTR }
603    }
604}
605impl core::fmt::Debug for GptimerSecure {
606    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
607        f.debug_struct("GptimerSecure").finish()
608    }
609}
610#[doc = "General-Purpose Timer (Secure)"]
611pub use self::gptimer as gptimer_secure;
612#[doc = "General-purpose I/O 0"]
613pub struct Gpio0 {
614    _marker: PhantomData<*const ()>,
615}
616unsafe impl Send for Gpio0 {}
617impl Gpio0 {
618    #[doc = r"Pointer to the register block"]
619    pub const PTR: *const gpio0::RegisterBlock = 0x4100_0000 as *const _;
620    #[doc = r"Return the pointer to the register block"]
621    #[inline(always)]
622    pub const fn ptr() -> *const gpio0::RegisterBlock {
623        Self::PTR
624    }
625    #[doc = r" Steal an instance of this peripheral"]
626    #[doc = r""]
627    #[doc = r" # Safety"]
628    #[doc = r""]
629    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
630    #[doc = r" that may race with any existing instances, for example by only"]
631    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
632    #[doc = r" original peripheral and using critical sections to coordinate"]
633    #[doc = r" access between multiple new instances."]
634    #[doc = r""]
635    #[doc = r" Additionally, other software such as HALs may rely on only one"]
636    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
637    #[doc = r" no stolen instances are passed to such software."]
638    pub unsafe fn steal() -> Self {
639        Self {
640            _marker: PhantomData,
641        }
642    }
643}
644impl Deref for Gpio0 {
645    type Target = gpio0::RegisterBlock;
646    #[inline(always)]
647    fn deref(&self) -> &Self::Target {
648        unsafe { &*Self::PTR }
649    }
650}
651impl core::fmt::Debug for Gpio0 {
652    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
653        f.debug_struct("Gpio0").finish()
654    }
655}
656#[doc = "General-purpose I/O 0"]
657pub mod gpio0;
658#[doc = "General-purpose I/O 0 (Secure)"]
659pub struct Gpio0Secure {
660    _marker: PhantomData<*const ()>,
661}
662unsafe impl Send for Gpio0Secure {}
663impl Gpio0Secure {
664    #[doc = r"Pointer to the register block"]
665    pub const PTR: *const gpio0::RegisterBlock = 0x5100_0000 as *const _;
666    #[doc = r"Return the pointer to the register block"]
667    #[inline(always)]
668    pub const fn ptr() -> *const gpio0::RegisterBlock {
669        Self::PTR
670    }
671    #[doc = r" Steal an instance of this peripheral"]
672    #[doc = r""]
673    #[doc = r" # Safety"]
674    #[doc = r""]
675    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
676    #[doc = r" that may race with any existing instances, for example by only"]
677    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
678    #[doc = r" original peripheral and using critical sections to coordinate"]
679    #[doc = r" access between multiple new instances."]
680    #[doc = r""]
681    #[doc = r" Additionally, other software such as HALs may rely on only one"]
682    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
683    #[doc = r" no stolen instances are passed to such software."]
684    pub unsafe fn steal() -> Self {
685        Self {
686            _marker: PhantomData,
687        }
688    }
689}
690impl Deref for Gpio0Secure {
691    type Target = gpio0::RegisterBlock;
692    #[inline(always)]
693    fn deref(&self) -> &Self::Target {
694        unsafe { &*Self::PTR }
695    }
696}
697impl core::fmt::Debug for Gpio0Secure {
698    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
699        f.debug_struct("Gpio0Secure").finish()
700    }
701}
702#[doc = "General-purpose I/O 0 (Secure)"]
703pub use self::gpio0 as gpio0_secure;
704#[doc = "UART 0"]
705pub struct Uart0 {
706    _marker: PhantomData<*const ()>,
707}
708unsafe impl Send for Uart0 {}
709impl Uart0 {
710    #[doc = r"Pointer to the register block"]
711    pub const PTR: *const uart0::RegisterBlock = 0x4010_5000 as *const _;
712    #[doc = r"Return the pointer to the register block"]
713    #[inline(always)]
714    pub const fn ptr() -> *const uart0::RegisterBlock {
715        Self::PTR
716    }
717    #[doc = r" Steal an instance of this peripheral"]
718    #[doc = r""]
719    #[doc = r" # Safety"]
720    #[doc = r""]
721    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
722    #[doc = r" that may race with any existing instances, for example by only"]
723    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
724    #[doc = r" original peripheral and using critical sections to coordinate"]
725    #[doc = r" access between multiple new instances."]
726    #[doc = r""]
727    #[doc = r" Additionally, other software such as HALs may rely on only one"]
728    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
729    #[doc = r" no stolen instances are passed to such software."]
730    pub unsafe fn steal() -> Self {
731        Self {
732            _marker: PhantomData,
733        }
734    }
735}
736impl Deref for Uart0 {
737    type Target = uart0::RegisterBlock;
738    #[inline(always)]
739    fn deref(&self) -> &Self::Target {
740        unsafe { &*Self::PTR }
741    }
742}
743impl core::fmt::Debug for Uart0 {
744    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
745        f.debug_struct("Uart0").finish()
746    }
747}
748#[doc = "UART 0"]
749pub mod uart0;
750#[doc = "UART 0 (Secure)"]
751pub struct Uart0Secure {
752    _marker: PhantomData<*const ()>,
753}
754unsafe impl Send for Uart0Secure {}
755impl Uart0Secure {
756    #[doc = r"Pointer to the register block"]
757    pub const PTR: *const uart0::RegisterBlock = 0x5010_5000 as *const _;
758    #[doc = r"Return the pointer to the register block"]
759    #[inline(always)]
760    pub const fn ptr() -> *const uart0::RegisterBlock {
761        Self::PTR
762    }
763    #[doc = r" Steal an instance of this peripheral"]
764    #[doc = r""]
765    #[doc = r" # Safety"]
766    #[doc = r""]
767    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
768    #[doc = r" that may race with any existing instances, for example by only"]
769    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
770    #[doc = r" original peripheral and using critical sections to coordinate"]
771    #[doc = r" access between multiple new instances."]
772    #[doc = r""]
773    #[doc = r" Additionally, other software such as HALs may rely on only one"]
774    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
775    #[doc = r" no stolen instances are passed to such software."]
776    pub unsafe fn steal() -> Self {
777        Self {
778            _marker: PhantomData,
779        }
780    }
781}
782impl Deref for Uart0Secure {
783    type Target = uart0::RegisterBlock;
784    #[inline(always)]
785    fn deref(&self) -> &Self::Target {
786        unsafe { &*Self::PTR }
787    }
788}
789impl core::fmt::Debug for Uart0Secure {
790    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
791        f.debug_struct("Uart0Secure").finish()
792    }
793}
794#[doc = "UART 0 (Secure)"]
795pub use self::uart0 as uart0_secure;
796#[doc = "Non-secure Watchdog Timer"]
797pub struct Watchdog {
798    _marker: PhantomData<*const ()>,
799}
800unsafe impl Send for Watchdog {}
801impl Watchdog {
802    #[doc = r"Pointer to the register block"]
803    pub const PTR: *const watchdog::RegisterBlock = 0x4008_1000 as *const _;
804    #[doc = r"Return the pointer to the register block"]
805    #[inline(always)]
806    pub const fn ptr() -> *const watchdog::RegisterBlock {
807        Self::PTR
808    }
809    #[doc = r" Steal an instance of this peripheral"]
810    #[doc = r""]
811    #[doc = r" # Safety"]
812    #[doc = r""]
813    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
814    #[doc = r" that may race with any existing instances, for example by only"]
815    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
816    #[doc = r" original peripheral and using critical sections to coordinate"]
817    #[doc = r" access between multiple new instances."]
818    #[doc = r""]
819    #[doc = r" Additionally, other software such as HALs may rely on only one"]
820    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
821    #[doc = r" no stolen instances are passed to such software."]
822    pub unsafe fn steal() -> Self {
823        Self {
824            _marker: PhantomData,
825        }
826    }
827}
828impl Deref for Watchdog {
829    type Target = watchdog::RegisterBlock;
830    #[inline(always)]
831    fn deref(&self) -> &Self::Target {
832        unsafe { &*Self::PTR }
833    }
834}
835impl core::fmt::Debug for Watchdog {
836    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
837        f.debug_struct("Watchdog").finish()
838    }
839}
840#[doc = "Non-secure Watchdog Timer"]
841pub mod watchdog;
842#[doc = "Cache"]
843pub struct ICache {
844    _marker: PhantomData<*const ()>,
845}
846unsafe impl Send for ICache {}
847impl ICache {
848    #[doc = r"Pointer to the register block"]
849    pub const PTR: *const i_cache::RegisterBlock = 0x5001_0000 as *const _;
850    #[doc = r"Return the pointer to the register block"]
851    #[inline(always)]
852    pub const fn ptr() -> *const i_cache::RegisterBlock {
853        Self::PTR
854    }
855    #[doc = r" Steal an instance of this peripheral"]
856    #[doc = r""]
857    #[doc = r" # Safety"]
858    #[doc = r""]
859    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
860    #[doc = r" that may race with any existing instances, for example by only"]
861    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
862    #[doc = r" original peripheral and using critical sections to coordinate"]
863    #[doc = r" access between multiple new instances."]
864    #[doc = r""]
865    #[doc = r" Additionally, other software such as HALs may rely on only one"]
866    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
867    #[doc = r" no stolen instances are passed to such software."]
868    pub unsafe fn steal() -> Self {
869        Self {
870            _marker: PhantomData,
871        }
872    }
873}
874impl Deref for ICache {
875    type Target = i_cache::RegisterBlock;
876    #[inline(always)]
877    fn deref(&self) -> &Self::Target {
878        unsafe { &*Self::PTR }
879    }
880}
881impl core::fmt::Debug for ICache {
882    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
883        f.debug_struct("ICache").finish()
884    }
885}
886#[doc = "Cache"]
887pub mod i_cache;
888#[doc = "PWM_IP6512"]
889pub struct Pwm {
890    _marker: PhantomData<*const ()>,
891}
892unsafe impl Send for Pwm {}
893impl Pwm {
894    #[doc = r"Pointer to the register block"]
895    pub const PTR: *const pwm::RegisterBlock = 0x4010_7000 as *const _;
896    #[doc = r"Return the pointer to the register block"]
897    #[inline(always)]
898    pub const fn ptr() -> *const pwm::RegisterBlock {
899        Self::PTR
900    }
901    #[doc = r" Steal an instance of this peripheral"]
902    #[doc = r""]
903    #[doc = r" # Safety"]
904    #[doc = r""]
905    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
906    #[doc = r" that may race with any existing instances, for example by only"]
907    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
908    #[doc = r" original peripheral and using critical sections to coordinate"]
909    #[doc = r" access between multiple new instances."]
910    #[doc = r""]
911    #[doc = r" Additionally, other software such as HALs may rely on only one"]
912    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
913    #[doc = r" no stolen instances are passed to such software."]
914    pub unsafe fn steal() -> Self {
915        Self {
916            _marker: PhantomData,
917        }
918    }
919}
920impl Deref for Pwm {
921    type Target = pwm::RegisterBlock;
922    #[inline(always)]
923    fn deref(&self) -> &Self::Target {
924        unsafe { &*Self::PTR }
925    }
926}
927impl core::fmt::Debug for Pwm {
928    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
929        f.debug_struct("Pwm").finish()
930    }
931}
932#[doc = "PWM_IP6512"]
933pub mod pwm;
934#[doc = "Watchdog (Secure)"]
935pub struct WatchdogSecure {
936    _marker: PhantomData<*const ()>,
937}
938unsafe impl Send for WatchdogSecure {}
939impl WatchdogSecure {
940    #[doc = r"Pointer to the register block"]
941    pub const PTR: *const watchdog::RegisterBlock = 0x5008_1000 as *const _;
942    #[doc = r"Return the pointer to the register block"]
943    #[inline(always)]
944    pub const fn ptr() -> *const watchdog::RegisterBlock {
945        Self::PTR
946    }
947    #[doc = r" Steal an instance of this peripheral"]
948    #[doc = r""]
949    #[doc = r" # Safety"]
950    #[doc = r""]
951    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
952    #[doc = r" that may race with any existing instances, for example by only"]
953    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
954    #[doc = r" original peripheral and using critical sections to coordinate"]
955    #[doc = r" access between multiple new instances."]
956    #[doc = r""]
957    #[doc = r" Additionally, other software such as HALs may rely on only one"]
958    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
959    #[doc = r" no stolen instances are passed to such software."]
960    pub unsafe fn steal() -> Self {
961        Self {
962            _marker: PhantomData,
963        }
964    }
965}
966impl Deref for WatchdogSecure {
967    type Target = watchdog::RegisterBlock;
968    #[inline(always)]
969    fn deref(&self) -> &Self::Target {
970        unsafe { &*Self::PTR }
971    }
972}
973impl core::fmt::Debug for WatchdogSecure {
974    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
975        f.debug_struct("WatchdogSecure").finish()
976    }
977}
978#[doc = "Watchdog (Secure)"]
979pub use self::watchdog as watchdog_secure;
980#[doc = "S32K Watchdog (Secure)"]
981pub struct S32kwatchdog {
982    _marker: PhantomData<*const ()>,
983}
984unsafe impl Send for S32kwatchdog {}
985impl S32kwatchdog {
986    #[doc = r"Pointer to the register block"]
987    pub const PTR: *const watchdog::RegisterBlock = 0x5002_e000 as *const _;
988    #[doc = r"Return the pointer to the register block"]
989    #[inline(always)]
990    pub const fn ptr() -> *const watchdog::RegisterBlock {
991        Self::PTR
992    }
993    #[doc = r" Steal an instance of this peripheral"]
994    #[doc = r""]
995    #[doc = r" # Safety"]
996    #[doc = r""]
997    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
998    #[doc = r" that may race with any existing instances, for example by only"]
999    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1000    #[doc = r" original peripheral and using critical sections to coordinate"]
1001    #[doc = r" access between multiple new instances."]
1002    #[doc = r""]
1003    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1004    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1005    #[doc = r" no stolen instances are passed to such software."]
1006    pub unsafe fn steal() -> Self {
1007        Self {
1008            _marker: PhantomData,
1009        }
1010    }
1011}
1012impl Deref for S32kwatchdog {
1013    type Target = watchdog::RegisterBlock;
1014    #[inline(always)]
1015    fn deref(&self) -> &Self::Target {
1016        unsafe { &*Self::PTR }
1017    }
1018}
1019impl core::fmt::Debug for S32kwatchdog {
1020    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1021        f.debug_struct("S32kwatchdog").finish()
1022    }
1023}
1024#[doc = "S32K Watchdog (Secure)"]
1025pub use self::watchdog as s32kwatchdog;
1026#[doc = "Serial Communication Controller"]
1027pub struct Scc {
1028    _marker: PhantomData<*const ()>,
1029}
1030unsafe impl Send for Scc {}
1031impl Scc {
1032    #[doc = r"Pointer to the register block"]
1033    pub const PTR: *const scc::RegisterBlock = 0x5010_b000 as *const _;
1034    #[doc = r"Return the pointer to the register block"]
1035    #[inline(always)]
1036    pub const fn ptr() -> *const scc::RegisterBlock {
1037        Self::PTR
1038    }
1039    #[doc = r" Steal an instance of this peripheral"]
1040    #[doc = r""]
1041    #[doc = r" # Safety"]
1042    #[doc = r""]
1043    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1044    #[doc = r" that may race with any existing instances, for example by only"]
1045    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1046    #[doc = r" original peripheral and using critical sections to coordinate"]
1047    #[doc = r" access between multiple new instances."]
1048    #[doc = r""]
1049    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1050    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1051    #[doc = r" no stolen instances are passed to such software."]
1052    pub unsafe fn steal() -> Self {
1053        Self {
1054            _marker: PhantomData,
1055        }
1056    }
1057}
1058impl Deref for Scc {
1059    type Target = scc::RegisterBlock;
1060    #[inline(always)]
1061    fn deref(&self) -> &Self::Target {
1062        unsafe { &*Self::PTR }
1063    }
1064}
1065impl core::fmt::Debug for Scc {
1066    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1067        f.debug_struct("Scc").finish()
1068    }
1069}
1070#[doc = "Serial Communication Controller"]
1071pub mod scc;
1072#[doc = "Secure Privilege Control Block"]
1073pub struct Spctrl {
1074    _marker: PhantomData<*const ()>,
1075}
1076unsafe impl Send for Spctrl {}
1077impl Spctrl {
1078    #[doc = r"Pointer to the register block"]
1079    pub const PTR: *const spctrl::RegisterBlock = 0x5008_0000 as *const _;
1080    #[doc = r"Return the pointer to the register block"]
1081    #[inline(always)]
1082    pub const fn ptr() -> *const spctrl::RegisterBlock {
1083        Self::PTR
1084    }
1085    #[doc = r" Steal an instance of this peripheral"]
1086    #[doc = r""]
1087    #[doc = r" # Safety"]
1088    #[doc = r""]
1089    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1090    #[doc = r" that may race with any existing instances, for example by only"]
1091    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1092    #[doc = r" original peripheral and using critical sections to coordinate"]
1093    #[doc = r" access between multiple new instances."]
1094    #[doc = r""]
1095    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1096    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1097    #[doc = r" no stolen instances are passed to such software."]
1098    pub unsafe fn steal() -> Self {
1099        Self {
1100            _marker: PhantomData,
1101        }
1102    }
1103}
1104impl Deref for Spctrl {
1105    type Target = spctrl::RegisterBlock;
1106    #[inline(always)]
1107    fn deref(&self) -> &Self::Target {
1108        unsafe { &*Self::PTR }
1109    }
1110}
1111impl core::fmt::Debug for Spctrl {
1112    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1113        f.debug_struct("Spctrl").finish()
1114    }
1115}
1116#[doc = "Secure Privilege Control Block"]
1117pub mod spctrl;
1118#[doc = "Non-secure Privilege Control Block"]
1119pub struct Nspctrl {
1120    _marker: PhantomData<*const ()>,
1121}
1122unsafe impl Send for Nspctrl {}
1123impl Nspctrl {
1124    #[doc = r"Pointer to the register block"]
1125    pub const PTR: *const nspctrl::RegisterBlock = 0x4008_0000 as *const _;
1126    #[doc = r"Return the pointer to the register block"]
1127    #[inline(always)]
1128    pub const fn ptr() -> *const nspctrl::RegisterBlock {
1129        Self::PTR
1130    }
1131    #[doc = r" Steal an instance of this peripheral"]
1132    #[doc = r""]
1133    #[doc = r" # Safety"]
1134    #[doc = r""]
1135    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1136    #[doc = r" that may race with any existing instances, for example by only"]
1137    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1138    #[doc = r" original peripheral and using critical sections to coordinate"]
1139    #[doc = r" access between multiple new instances."]
1140    #[doc = r""]
1141    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1142    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1143    #[doc = r" no stolen instances are passed to such software."]
1144    pub unsafe fn steal() -> Self {
1145        Self {
1146            _marker: PhantomData,
1147        }
1148    }
1149}
1150impl Deref for Nspctrl {
1151    type Target = nspctrl::RegisterBlock;
1152    #[inline(always)]
1153    fn deref(&self) -> &Self::Target {
1154        unsafe { &*Self::PTR }
1155    }
1156}
1157impl core::fmt::Debug for Nspctrl {
1158    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1159        f.debug_struct("Nspctrl").finish()
1160    }
1161}
1162#[doc = "Non-secure Privilege Control Block"]
1163pub mod nspctrl;
1164#[doc = "Memory Protection Controller 0"]
1165pub struct Sram0mpc {
1166    _marker: PhantomData<*const ()>,
1167}
1168unsafe impl Send for Sram0mpc {}
1169impl Sram0mpc {
1170    #[doc = r"Pointer to the register block"]
1171    pub const PTR: *const sram0mpc::RegisterBlock = 0x5008_3000 as *const _;
1172    #[doc = r"Return the pointer to the register block"]
1173    #[inline(always)]
1174    pub const fn ptr() -> *const sram0mpc::RegisterBlock {
1175        Self::PTR
1176    }
1177    #[doc = r" Steal an instance of this peripheral"]
1178    #[doc = r""]
1179    #[doc = r" # Safety"]
1180    #[doc = r""]
1181    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1182    #[doc = r" that may race with any existing instances, for example by only"]
1183    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1184    #[doc = r" original peripheral and using critical sections to coordinate"]
1185    #[doc = r" access between multiple new instances."]
1186    #[doc = r""]
1187    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1188    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1189    #[doc = r" no stolen instances are passed to such software."]
1190    pub unsafe fn steal() -> Self {
1191        Self {
1192            _marker: PhantomData,
1193        }
1194    }
1195}
1196impl Deref for Sram0mpc {
1197    type Target = sram0mpc::RegisterBlock;
1198    #[inline(always)]
1199    fn deref(&self) -> &Self::Target {
1200        unsafe { &*Self::PTR }
1201    }
1202}
1203impl core::fmt::Debug for Sram0mpc {
1204    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1205        f.debug_struct("Sram0mpc").finish()
1206    }
1207}
1208#[doc = "Memory Protection Controller 0"]
1209pub mod sram0mpc;
1210#[doc = "SRAM 1 Memory Protection Controller"]
1211pub struct Sram1mpc {
1212    _marker: PhantomData<*const ()>,
1213}
1214unsafe impl Send for Sram1mpc {}
1215impl Sram1mpc {
1216    #[doc = r"Pointer to the register block"]
1217    pub const PTR: *const sram0mpc::RegisterBlock = 0x5008_4000 as *const _;
1218    #[doc = r"Return the pointer to the register block"]
1219    #[inline(always)]
1220    pub const fn ptr() -> *const sram0mpc::RegisterBlock {
1221        Self::PTR
1222    }
1223    #[doc = r" Steal an instance of this peripheral"]
1224    #[doc = r""]
1225    #[doc = r" # Safety"]
1226    #[doc = r""]
1227    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1228    #[doc = r" that may race with any existing instances, for example by only"]
1229    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1230    #[doc = r" original peripheral and using critical sections to coordinate"]
1231    #[doc = r" access between multiple new instances."]
1232    #[doc = r""]
1233    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1234    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1235    #[doc = r" no stolen instances are passed to such software."]
1236    pub unsafe fn steal() -> Self {
1237        Self {
1238            _marker: PhantomData,
1239        }
1240    }
1241}
1242impl Deref for Sram1mpc {
1243    type Target = sram0mpc::RegisterBlock;
1244    #[inline(always)]
1245    fn deref(&self) -> &Self::Target {
1246        unsafe { &*Self::PTR }
1247    }
1248}
1249impl core::fmt::Debug for Sram1mpc {
1250    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1251        f.debug_struct("Sram1mpc").finish()
1252    }
1253}
1254#[doc = "SRAM 1 Memory Protection Controller"]
1255pub use self::sram0mpc as sram1mpc;
1256#[doc = "SRAM 2 Memory Protection Controller"]
1257pub struct Sram2mpc {
1258    _marker: PhantomData<*const ()>,
1259}
1260unsafe impl Send for Sram2mpc {}
1261impl Sram2mpc {
1262    #[doc = r"Pointer to the register block"]
1263    pub const PTR: *const sram0mpc::RegisterBlock = 0x5008_5000 as *const _;
1264    #[doc = r"Return the pointer to the register block"]
1265    #[inline(always)]
1266    pub const fn ptr() -> *const sram0mpc::RegisterBlock {
1267        Self::PTR
1268    }
1269    #[doc = r" Steal an instance of this peripheral"]
1270    #[doc = r""]
1271    #[doc = r" # Safety"]
1272    #[doc = r""]
1273    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1274    #[doc = r" that may race with any existing instances, for example by only"]
1275    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1276    #[doc = r" original peripheral and using critical sections to coordinate"]
1277    #[doc = r" access between multiple new instances."]
1278    #[doc = r""]
1279    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1280    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1281    #[doc = r" no stolen instances are passed to such software."]
1282    pub unsafe fn steal() -> Self {
1283        Self {
1284            _marker: PhantomData,
1285        }
1286    }
1287}
1288impl Deref for Sram2mpc {
1289    type Target = sram0mpc::RegisterBlock;
1290    #[inline(always)]
1291    fn deref(&self) -> &Self::Target {
1292        unsafe { &*Self::PTR }
1293    }
1294}
1295impl core::fmt::Debug for Sram2mpc {
1296    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1297        f.debug_struct("Sram2mpc").finish()
1298    }
1299}
1300#[doc = "SRAM 2 Memory Protection Controller"]
1301pub use self::sram0mpc as sram2mpc;
1302#[doc = "SRAM 3 Memory Protection Controller"]
1303pub struct Sram3mpc {
1304    _marker: PhantomData<*const ()>,
1305}
1306unsafe impl Send for Sram3mpc {}
1307impl Sram3mpc {
1308    #[doc = r"Pointer to the register block"]
1309    pub const PTR: *const sram0mpc::RegisterBlock = 0x5008_6000 as *const _;
1310    #[doc = r"Return the pointer to the register block"]
1311    #[inline(always)]
1312    pub const fn ptr() -> *const sram0mpc::RegisterBlock {
1313        Self::PTR
1314    }
1315    #[doc = r" Steal an instance of this peripheral"]
1316    #[doc = r""]
1317    #[doc = r" # Safety"]
1318    #[doc = r""]
1319    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1320    #[doc = r" that may race with any existing instances, for example by only"]
1321    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1322    #[doc = r" original peripheral and using critical sections to coordinate"]
1323    #[doc = r" access between multiple new instances."]
1324    #[doc = r""]
1325    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1326    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1327    #[doc = r" no stolen instances are passed to such software."]
1328    pub unsafe fn steal() -> Self {
1329        Self {
1330            _marker: PhantomData,
1331        }
1332    }
1333}
1334impl Deref for Sram3mpc {
1335    type Target = sram0mpc::RegisterBlock;
1336    #[inline(always)]
1337    fn deref(&self) -> &Self::Target {
1338        unsafe { &*Self::PTR }
1339    }
1340}
1341impl core::fmt::Debug for Sram3mpc {
1342    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1343        f.debug_struct("Sram3mpc").finish()
1344    }
1345}
1346#[doc = "SRAM 3 Memory Protection Controller"]
1347pub use self::sram0mpc as sram3mpc;
1348#[doc = "Code SRAM Memory Protection Controller"]
1349pub struct CodeSramMpc {
1350    _marker: PhantomData<*const ()>,
1351}
1352unsafe impl Send for CodeSramMpc {}
1353impl CodeSramMpc {
1354    #[doc = r"Pointer to the register block"]
1355    pub const PTR: *const sram0mpc::RegisterBlock = 0x5210_0000 as *const _;
1356    #[doc = r"Return the pointer to the register block"]
1357    #[inline(always)]
1358    pub const fn ptr() -> *const sram0mpc::RegisterBlock {
1359        Self::PTR
1360    }
1361    #[doc = r" Steal an instance of this peripheral"]
1362    #[doc = r""]
1363    #[doc = r" # Safety"]
1364    #[doc = r""]
1365    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1366    #[doc = r" that may race with any existing instances, for example by only"]
1367    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1368    #[doc = r" original peripheral and using critical sections to coordinate"]
1369    #[doc = r" access between multiple new instances."]
1370    #[doc = r""]
1371    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1372    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1373    #[doc = r" no stolen instances are passed to such software."]
1374    pub unsafe fn steal() -> Self {
1375        Self {
1376            _marker: PhantomData,
1377        }
1378    }
1379}
1380impl Deref for CodeSramMpc {
1381    type Target = sram0mpc::RegisterBlock;
1382    #[inline(always)]
1383    fn deref(&self) -> &Self::Target {
1384        unsafe { &*Self::PTR }
1385    }
1386}
1387impl core::fmt::Debug for CodeSramMpc {
1388    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1389        f.debug_struct("CodeSramMpc").finish()
1390    }
1391}
1392#[doc = "Code SRAM Memory Protection Controller"]
1393pub use self::sram0mpc as code_sram_mpc;
1394#[doc = "QSPI Flash Memory Protection Controller"]
1395pub struct QspiMpc {
1396    _marker: PhantomData<*const ()>,
1397}
1398unsafe impl Send for QspiMpc {}
1399impl QspiMpc {
1400    #[doc = r"Pointer to the register block"]
1401    pub const PTR: *const sram0mpc::RegisterBlock = 0x5200_0000 as *const _;
1402    #[doc = r"Return the pointer to the register block"]
1403    #[inline(always)]
1404    pub const fn ptr() -> *const sram0mpc::RegisterBlock {
1405        Self::PTR
1406    }
1407    #[doc = r" Steal an instance of this peripheral"]
1408    #[doc = r""]
1409    #[doc = r" # Safety"]
1410    #[doc = r""]
1411    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1412    #[doc = r" that may race with any existing instances, for example by only"]
1413    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1414    #[doc = r" original peripheral and using critical sections to coordinate"]
1415    #[doc = r" access between multiple new instances."]
1416    #[doc = r""]
1417    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1418    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1419    #[doc = r" no stolen instances are passed to such software."]
1420    pub unsafe fn steal() -> Self {
1421        Self {
1422            _marker: PhantomData,
1423        }
1424    }
1425}
1426impl Deref for QspiMpc {
1427    type Target = sram0mpc::RegisterBlock;
1428    #[inline(always)]
1429    fn deref(&self) -> &Self::Target {
1430        unsafe { &*Self::PTR }
1431    }
1432}
1433impl core::fmt::Debug for QspiMpc {
1434    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1435        f.debug_struct("QspiMpc").finish()
1436    }
1437}
1438#[doc = "QSPI Flash Memory Protection Controller"]
1439pub use self::sram0mpc as qspi_mpc;
1440#[doc = "EFlash0 Memory Protection Controller"]
1441pub struct Eflash0Mpc {
1442    _marker: PhantomData<*const ()>,
1443}
1444unsafe impl Send for Eflash0Mpc {}
1445impl Eflash0Mpc {
1446    #[doc = r"Pointer to the register block"]
1447    pub const PTR: *const sram0mpc::RegisterBlock = 0x5220_0000 as *const _;
1448    #[doc = r"Return the pointer to the register block"]
1449    #[inline(always)]
1450    pub const fn ptr() -> *const sram0mpc::RegisterBlock {
1451        Self::PTR
1452    }
1453    #[doc = r" Steal an instance of this peripheral"]
1454    #[doc = r""]
1455    #[doc = r" # Safety"]
1456    #[doc = r""]
1457    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1458    #[doc = r" that may race with any existing instances, for example by only"]
1459    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1460    #[doc = r" original peripheral and using critical sections to coordinate"]
1461    #[doc = r" access between multiple new instances."]
1462    #[doc = r""]
1463    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1464    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1465    #[doc = r" no stolen instances are passed to such software."]
1466    pub unsafe fn steal() -> Self {
1467        Self {
1468            _marker: PhantomData,
1469        }
1470    }
1471}
1472impl Deref for Eflash0Mpc {
1473    type Target = sram0mpc::RegisterBlock;
1474    #[inline(always)]
1475    fn deref(&self) -> &Self::Target {
1476        unsafe { &*Self::PTR }
1477    }
1478}
1479impl core::fmt::Debug for Eflash0Mpc {
1480    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1481        f.debug_struct("Eflash0Mpc").finish()
1482    }
1483}
1484#[doc = "EFlash0 Memory Protection Controller"]
1485pub use self::sram0mpc as eflash0_mpc;
1486#[doc = "EFlash1 Memory Protection Controller"]
1487pub struct Eflash1Mpc {
1488    _marker: PhantomData<*const ()>,
1489}
1490unsafe impl Send for Eflash1Mpc {}
1491impl Eflash1Mpc {
1492    #[doc = r"Pointer to the register block"]
1493    pub const PTR: *const sram0mpc::RegisterBlock = 0x5230_0000 as *const _;
1494    #[doc = r"Return the pointer to the register block"]
1495    #[inline(always)]
1496    pub const fn ptr() -> *const sram0mpc::RegisterBlock {
1497        Self::PTR
1498    }
1499    #[doc = r" Steal an instance of this peripheral"]
1500    #[doc = r""]
1501    #[doc = r" # Safety"]
1502    #[doc = r""]
1503    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1504    #[doc = r" that may race with any existing instances, for example by only"]
1505    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1506    #[doc = r" original peripheral and using critical sections to coordinate"]
1507    #[doc = r" access between multiple new instances."]
1508    #[doc = r""]
1509    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1510    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1511    #[doc = r" no stolen instances are passed to such software."]
1512    pub unsafe fn steal() -> Self {
1513        Self {
1514            _marker: PhantomData,
1515        }
1516    }
1517}
1518impl Deref for Eflash1Mpc {
1519    type Target = sram0mpc::RegisterBlock;
1520    #[inline(always)]
1521    fn deref(&self) -> &Self::Target {
1522        unsafe { &*Self::PTR }
1523    }
1524}
1525impl core::fmt::Debug for Eflash1Mpc {
1526    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1527        f.debug_struct("Eflash1Mpc").finish()
1528    }
1529}
1530#[doc = "EFlash1 Memory Protection Controller"]
1531pub use self::sram0mpc as eflash1_mpc;
1532#[doc = "QSPI Flash Controller"]
1533pub struct Qspifctrl {
1534    _marker: PhantomData<*const ()>,
1535}
1536unsafe impl Send for Qspifctrl {}
1537impl Qspifctrl {
1538    #[doc = r"Pointer to the register block"]
1539    pub const PTR: *const qspifctrl::RegisterBlock = 0x4280_0000 as *const _;
1540    #[doc = r"Return the pointer to the register block"]
1541    #[inline(always)]
1542    pub const fn ptr() -> *const qspifctrl::RegisterBlock {
1543        Self::PTR
1544    }
1545    #[doc = r" Steal an instance of this peripheral"]
1546    #[doc = r""]
1547    #[doc = r" # Safety"]
1548    #[doc = r""]
1549    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1550    #[doc = r" that may race with any existing instances, for example by only"]
1551    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1552    #[doc = r" original peripheral and using critical sections to coordinate"]
1553    #[doc = r" access between multiple new instances."]
1554    #[doc = r""]
1555    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1556    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1557    #[doc = r" no stolen instances are passed to such software."]
1558    pub unsafe fn steal() -> Self {
1559        Self {
1560            _marker: PhantomData,
1561        }
1562    }
1563}
1564impl Deref for Qspifctrl {
1565    type Target = qspifctrl::RegisterBlock;
1566    #[inline(always)]
1567    fn deref(&self) -> &Self::Target {
1568        unsafe { &*Self::PTR }
1569    }
1570}
1571impl core::fmt::Debug for Qspifctrl {
1572    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1573        f.debug_struct("Qspifctrl").finish()
1574    }
1575}
1576#[doc = "QSPI Flash Controller"]
1577pub mod qspifctrl;
1578#[doc = "QSPI Flash Controller (Secure)"]
1579pub struct QspifctrlSecure {
1580    _marker: PhantomData<*const ()>,
1581}
1582unsafe impl Send for QspifctrlSecure {}
1583impl QspifctrlSecure {
1584    #[doc = r"Pointer to the register block"]
1585    pub const PTR: *const qspifctrl::RegisterBlock = 0x5280_0000 as *const _;
1586    #[doc = r"Return the pointer to the register block"]
1587    #[inline(always)]
1588    pub const fn ptr() -> *const qspifctrl::RegisterBlock {
1589        Self::PTR
1590    }
1591    #[doc = r" Steal an instance of this peripheral"]
1592    #[doc = r""]
1593    #[doc = r" # Safety"]
1594    #[doc = r""]
1595    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1596    #[doc = r" that may race with any existing instances, for example by only"]
1597    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1598    #[doc = r" original peripheral and using critical sections to coordinate"]
1599    #[doc = r" access between multiple new instances."]
1600    #[doc = r""]
1601    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1602    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1603    #[doc = r" no stolen instances are passed to such software."]
1604    pub unsafe fn steal() -> Self {
1605        Self {
1606            _marker: PhantomData,
1607        }
1608    }
1609}
1610impl Deref for QspifctrlSecure {
1611    type Target = qspifctrl::RegisterBlock;
1612    #[inline(always)]
1613    fn deref(&self) -> &Self::Target {
1614        unsafe { &*Self::PTR }
1615    }
1616}
1617impl core::fmt::Debug for QspifctrlSecure {
1618    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1619        f.debug_struct("QspifctrlSecure").finish()
1620    }
1621}
1622#[doc = "QSPI Flash Controller (Secure)"]
1623pub use self::qspifctrl as qspifctrl_secure;
1624#[doc = "Message Handling Unit 0"]
1625pub struct Mhu0 {
1626    _marker: PhantomData<*const ()>,
1627}
1628unsafe impl Send for Mhu0 {}
1629impl Mhu0 {
1630    #[doc = r"Pointer to the register block"]
1631    pub const PTR: *const mhu0::RegisterBlock = 0x4000_3000 as *const _;
1632    #[doc = r"Return the pointer to the register block"]
1633    #[inline(always)]
1634    pub const fn ptr() -> *const mhu0::RegisterBlock {
1635        Self::PTR
1636    }
1637    #[doc = r" Steal an instance of this peripheral"]
1638    #[doc = r""]
1639    #[doc = r" # Safety"]
1640    #[doc = r""]
1641    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1642    #[doc = r" that may race with any existing instances, for example by only"]
1643    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1644    #[doc = r" original peripheral and using critical sections to coordinate"]
1645    #[doc = r" access between multiple new instances."]
1646    #[doc = r""]
1647    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1648    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1649    #[doc = r" no stolen instances are passed to such software."]
1650    pub unsafe fn steal() -> Self {
1651        Self {
1652            _marker: PhantomData,
1653        }
1654    }
1655}
1656impl Deref for Mhu0 {
1657    type Target = mhu0::RegisterBlock;
1658    #[inline(always)]
1659    fn deref(&self) -> &Self::Target {
1660        unsafe { &*Self::PTR }
1661    }
1662}
1663impl core::fmt::Debug for Mhu0 {
1664    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1665        f.debug_struct("Mhu0").finish()
1666    }
1667}
1668#[doc = "Message Handling Unit 0"]
1669pub mod mhu0;
1670#[doc = "Message Handling Unit 0 (Secure)"]
1671pub struct Mhu0Secure {
1672    _marker: PhantomData<*const ()>,
1673}
1674unsafe impl Send for Mhu0Secure {}
1675impl Mhu0Secure {
1676    #[doc = r"Pointer to the register block"]
1677    pub const PTR: *const mhu0::RegisterBlock = 0x5000_3000 as *const _;
1678    #[doc = r"Return the pointer to the register block"]
1679    #[inline(always)]
1680    pub const fn ptr() -> *const mhu0::RegisterBlock {
1681        Self::PTR
1682    }
1683    #[doc = r" Steal an instance of this peripheral"]
1684    #[doc = r""]
1685    #[doc = r" # Safety"]
1686    #[doc = r""]
1687    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1688    #[doc = r" that may race with any existing instances, for example by only"]
1689    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1690    #[doc = r" original peripheral and using critical sections to coordinate"]
1691    #[doc = r" access between multiple new instances."]
1692    #[doc = r""]
1693    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1694    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1695    #[doc = r" no stolen instances are passed to such software."]
1696    pub unsafe fn steal() -> Self {
1697        Self {
1698            _marker: PhantomData,
1699        }
1700    }
1701}
1702impl Deref for Mhu0Secure {
1703    type Target = mhu0::RegisterBlock;
1704    #[inline(always)]
1705    fn deref(&self) -> &Self::Target {
1706        unsafe { &*Self::PTR }
1707    }
1708}
1709impl core::fmt::Debug for Mhu0Secure {
1710    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1711        f.debug_struct("Mhu0Secure").finish()
1712    }
1713}
1714#[doc = "Message Handling Unit 0 (Secure)"]
1715pub use self::mhu0 as mhu0_secure;
1716#[doc = "Message Handling Unit 1"]
1717pub struct Mhu1 {
1718    _marker: PhantomData<*const ()>,
1719}
1720unsafe impl Send for Mhu1 {}
1721impl Mhu1 {
1722    #[doc = r"Pointer to the register block"]
1723    pub const PTR: *const mhu0::RegisterBlock = 0x4000_4000 as *const _;
1724    #[doc = r"Return the pointer to the register block"]
1725    #[inline(always)]
1726    pub const fn ptr() -> *const mhu0::RegisterBlock {
1727        Self::PTR
1728    }
1729    #[doc = r" Steal an instance of this peripheral"]
1730    #[doc = r""]
1731    #[doc = r" # Safety"]
1732    #[doc = r""]
1733    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1734    #[doc = r" that may race with any existing instances, for example by only"]
1735    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1736    #[doc = r" original peripheral and using critical sections to coordinate"]
1737    #[doc = r" access between multiple new instances."]
1738    #[doc = r""]
1739    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1740    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1741    #[doc = r" no stolen instances are passed to such software."]
1742    pub unsafe fn steal() -> Self {
1743        Self {
1744            _marker: PhantomData,
1745        }
1746    }
1747}
1748impl Deref for Mhu1 {
1749    type Target = mhu0::RegisterBlock;
1750    #[inline(always)]
1751    fn deref(&self) -> &Self::Target {
1752        unsafe { &*Self::PTR }
1753    }
1754}
1755impl core::fmt::Debug for Mhu1 {
1756    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1757        f.debug_struct("Mhu1").finish()
1758    }
1759}
1760#[doc = "Message Handling Unit 1"]
1761pub use self::mhu0 as mhu1;
1762#[doc = "Message Handling Unit 1 (Secure)"]
1763pub struct Mhu1Secure {
1764    _marker: PhantomData<*const ()>,
1765}
1766unsafe impl Send for Mhu1Secure {}
1767impl Mhu1Secure {
1768    #[doc = r"Pointer to the register block"]
1769    pub const PTR: *const mhu0::RegisterBlock = 0x5000_4000 as *const _;
1770    #[doc = r"Return the pointer to the register block"]
1771    #[inline(always)]
1772    pub const fn ptr() -> *const mhu0::RegisterBlock {
1773        Self::PTR
1774    }
1775    #[doc = r" Steal an instance of this peripheral"]
1776    #[doc = r""]
1777    #[doc = r" # Safety"]
1778    #[doc = r""]
1779    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1780    #[doc = r" that may race with any existing instances, for example by only"]
1781    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1782    #[doc = r" original peripheral and using critical sections to coordinate"]
1783    #[doc = r" access between multiple new instances."]
1784    #[doc = r""]
1785    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1786    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1787    #[doc = r" no stolen instances are passed to such software."]
1788    pub unsafe fn steal() -> Self {
1789        Self {
1790            _marker: PhantomData,
1791        }
1792    }
1793}
1794impl Deref for Mhu1Secure {
1795    type Target = mhu0::RegisterBlock;
1796    #[inline(always)]
1797    fn deref(&self) -> &Self::Target {
1798        unsafe { &*Self::PTR }
1799    }
1800}
1801impl core::fmt::Debug for Mhu1Secure {
1802    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1803        f.debug_struct("Mhu1Secure").finish()
1804    }
1805}
1806#[doc = "Message Handling Unit 1 (Secure)"]
1807pub use self::mhu0 as mhu1_secure;
1808#[doc = "CPU Identity"]
1809pub struct CpuIdentity {
1810    _marker: PhantomData<*const ()>,
1811}
1812unsafe impl Send for CpuIdentity {}
1813impl CpuIdentity {
1814    #[doc = r"Pointer to the register block"]
1815    pub const PTR: *const cpu_identity::RegisterBlock = 0x4001_f000 as *const _;
1816    #[doc = r"Return the pointer to the register block"]
1817    #[inline(always)]
1818    pub const fn ptr() -> *const cpu_identity::RegisterBlock {
1819        Self::PTR
1820    }
1821    #[doc = r" Steal an instance of this peripheral"]
1822    #[doc = r""]
1823    #[doc = r" # Safety"]
1824    #[doc = r""]
1825    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1826    #[doc = r" that may race with any existing instances, for example by only"]
1827    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1828    #[doc = r" original peripheral and using critical sections to coordinate"]
1829    #[doc = r" access between multiple new instances."]
1830    #[doc = r""]
1831    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1832    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1833    #[doc = r" no stolen instances are passed to such software."]
1834    pub unsafe fn steal() -> Self {
1835        Self {
1836            _marker: PhantomData,
1837        }
1838    }
1839}
1840impl Deref for CpuIdentity {
1841    type Target = cpu_identity::RegisterBlock;
1842    #[inline(always)]
1843    fn deref(&self) -> &Self::Target {
1844        unsafe { &*Self::PTR }
1845    }
1846}
1847impl core::fmt::Debug for CpuIdentity {
1848    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1849        f.debug_struct("CpuIdentity").finish()
1850    }
1851}
1852#[doc = "CPU Identity"]
1853pub mod cpu_identity;
1854#[no_mangle]
1855static mut DEVICE_PERIPHERALS: bool = false;
1856#[doc = r" All the peripherals."]
1857#[allow(non_snake_case)]
1858pub struct Peripherals {
1859    #[doc = "SYSINFO"]
1860    pub sysinfo: Sysinfo,
1861    #[doc = "SYSINFO_Secure"]
1862    pub sysinfo_secure: SysinfoSecure,
1863    #[doc = "SystemControl"]
1864    pub system_control: SystemControl,
1865    #[doc = "SAU"]
1866    pub sau: Sau,
1867    #[doc = "TIMER0"]
1868    pub timer0: Timer0,
1869    #[doc = "DUALTIMER"]
1870    pub dualtimer: Dualtimer,
1871    #[doc = "GPTIMER"]
1872    pub gptimer: Gptimer,
1873    #[doc = "TIMER0_Secure"]
1874    pub timer0_secure: Timer0Secure,
1875    #[doc = "DUALTIMER_Secure"]
1876    pub dualtimer_secure: DualtimerSecure,
1877    #[doc = "GPTIMER_Secure"]
1878    pub gptimer_secure: GptimerSecure,
1879    #[doc = "GPIO0"]
1880    pub gpio0: Gpio0,
1881    #[doc = "GPIO0_Secure"]
1882    pub gpio0_secure: Gpio0Secure,
1883    #[doc = "UART0"]
1884    pub uart0: Uart0,
1885    #[doc = "UART0_Secure"]
1886    pub uart0_secure: Uart0Secure,
1887    #[doc = "WATCHDOG"]
1888    pub watchdog: Watchdog,
1889    #[doc = "iCache"]
1890    pub i_cache: ICache,
1891    #[doc = "PWM"]
1892    pub pwm: Pwm,
1893    #[doc = "WATCHDOG_Secure"]
1894    pub watchdog_secure: WatchdogSecure,
1895    #[doc = "S32KWATCHDOG"]
1896    pub s32kwatchdog: S32kwatchdog,
1897    #[doc = "SCC"]
1898    pub scc: Scc,
1899    #[doc = "SPCTRL"]
1900    pub spctrl: Spctrl,
1901    #[doc = "NSPCTRL"]
1902    pub nspctrl: Nspctrl,
1903    #[doc = "SRAM0MPC"]
1904    pub sram0mpc: Sram0mpc,
1905    #[doc = "SRAM1MPC"]
1906    pub sram1mpc: Sram1mpc,
1907    #[doc = "SRAM2MPC"]
1908    pub sram2mpc: Sram2mpc,
1909    #[doc = "SRAM3MPC"]
1910    pub sram3mpc: Sram3mpc,
1911    #[doc = "CODE_SRAM_MPC"]
1912    pub code_sram_mpc: CodeSramMpc,
1913    #[doc = "QSPI_MPC"]
1914    pub qspi_mpc: QspiMpc,
1915    #[doc = "EFLASH0_MPC"]
1916    pub eflash0_mpc: Eflash0Mpc,
1917    #[doc = "EFLASH1_MPC"]
1918    pub eflash1_mpc: Eflash1Mpc,
1919    #[doc = "QSPIFCTRL"]
1920    pub qspifctrl: Qspifctrl,
1921    #[doc = "QSPIFCTRL_Secure"]
1922    pub qspifctrl_secure: QspifctrlSecure,
1923    #[doc = "MHU0"]
1924    pub mhu0: Mhu0,
1925    #[doc = "MHU0_Secure"]
1926    pub mhu0_secure: Mhu0Secure,
1927    #[doc = "MHU1"]
1928    pub mhu1: Mhu1,
1929    #[doc = "MHU1_Secure"]
1930    pub mhu1_secure: Mhu1Secure,
1931    #[doc = "CPU_IDENTITY"]
1932    pub cpu_identity: CpuIdentity,
1933}
1934impl Peripherals {
1935    #[doc = r" Returns all the peripherals *once*."]
1936    #[cfg(feature = "critical-section")]
1937    #[inline]
1938    pub fn take() -> Option<Self> {
1939        critical_section::with(|_| {
1940            if unsafe { DEVICE_PERIPHERALS } {
1941                return None;
1942            }
1943            Some(unsafe { Peripherals::steal() })
1944        })
1945    }
1946    #[doc = r" Unchecked version of `Peripherals::take`."]
1947    #[doc = r""]
1948    #[doc = r" # Safety"]
1949    #[doc = r""]
1950    #[doc = r" Each of the returned peripherals must be used at most once."]
1951    #[inline]
1952    pub unsafe fn steal() -> Self {
1953        DEVICE_PERIPHERALS = true;
1954        Peripherals {
1955            sysinfo: Sysinfo::steal(),
1956            sysinfo_secure: SysinfoSecure::steal(),
1957            system_control: SystemControl::steal(),
1958            sau: Sau::steal(),
1959            timer0: Timer0::steal(),
1960            dualtimer: Dualtimer::steal(),
1961            gptimer: Gptimer::steal(),
1962            timer0_secure: Timer0Secure::steal(),
1963            dualtimer_secure: DualtimerSecure::steal(),
1964            gptimer_secure: GptimerSecure::steal(),
1965            gpio0: Gpio0::steal(),
1966            gpio0_secure: Gpio0Secure::steal(),
1967            uart0: Uart0::steal(),
1968            uart0_secure: Uart0Secure::steal(),
1969            watchdog: Watchdog::steal(),
1970            i_cache: ICache::steal(),
1971            pwm: Pwm::steal(),
1972            watchdog_secure: WatchdogSecure::steal(),
1973            s32kwatchdog: S32kwatchdog::steal(),
1974            scc: Scc::steal(),
1975            spctrl: Spctrl::steal(),
1976            nspctrl: Nspctrl::steal(),
1977            sram0mpc: Sram0mpc::steal(),
1978            sram1mpc: Sram1mpc::steal(),
1979            sram2mpc: Sram2mpc::steal(),
1980            sram3mpc: Sram3mpc::steal(),
1981            code_sram_mpc: CodeSramMpc::steal(),
1982            qspi_mpc: QspiMpc::steal(),
1983            eflash0_mpc: Eflash0Mpc::steal(),
1984            eflash1_mpc: Eflash1Mpc::steal(),
1985            qspifctrl: Qspifctrl::steal(),
1986            qspifctrl_secure: QspifctrlSecure::steal(),
1987            mhu0: Mhu0::steal(),
1988            mhu0_secure: Mhu0Secure::steal(),
1989            mhu1: Mhu1::steal(),
1990            mhu1_secure: Mhu1Secure::steal(),
1991            cpu_identity: CpuIdentity::steal(),
1992        }
1993    }
1994}