bl61x_pac/
lib.rs

1#![doc = "Peripheral access API for BL616/BL618 microcontrollers (generated using svd2rust v0.31.3 ( ))\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.31.3/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#[allow(unused_imports)]
9use generic::*;
10#[doc = r"Common register and bit access and modify traits"]
11pub mod generic;
12extern "C" {}
13#[doc(hidden)]
14#[repr(C)]
15pub union Vector {
16    pub _handler: unsafe extern "C" fn(),
17    pub _reserved: usize,
18}
19#[doc(hidden)]
20#[no_mangle]
21pub static __EXTERNAL_INTERRUPTS: [Vector; 0] = [];
22#[doc = "Global configuration register"]
23pub struct GLB {
24    _marker: PhantomData<*const ()>,
25}
26unsafe impl Send for GLB {}
27impl GLB {
28    #[doc = r"Pointer to the register block"]
29    pub const PTR: *const glb::RegisterBlock = 0x2000_0000 as *const _;
30    #[doc = r"Return the pointer to the register block"]
31    #[inline(always)]
32    pub const fn ptr() -> *const glb::RegisterBlock {
33        Self::PTR
34    }
35    #[doc = r" Steal an instance of this peripheral"]
36    #[doc = r""]
37    #[doc = r" # Safety"]
38    #[doc = r""]
39    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
40    #[doc = r" that may race with any existing instances, for example by only"]
41    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
42    #[doc = r" original peripheral and using critical sections to coordinate"]
43    #[doc = r" access between multiple new instances."]
44    #[doc = r""]
45    #[doc = r" Additionally, other software such as HALs may rely on only one"]
46    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
47    #[doc = r" no stolen instances are passed to such software."]
48    pub unsafe fn steal() -> Self {
49        Self {
50            _marker: PhantomData,
51        }
52    }
53}
54impl Deref for GLB {
55    type Target = glb::RegisterBlock;
56    #[inline(always)]
57    fn deref(&self) -> &Self::Target {
58        unsafe { &*Self::PTR }
59    }
60}
61impl core::fmt::Debug for GLB {
62    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
63        f.debug_struct("GLB").finish()
64    }
65}
66#[doc = "Global configuration register"]
67pub mod glb;
68#[doc = "Generic DAC and ADC interface control"]
69pub struct GPIP {
70    _marker: PhantomData<*const ()>,
71}
72unsafe impl Send for GPIP {}
73impl GPIP {
74    #[doc = r"Pointer to the register block"]
75    pub const PTR: *const gpip::RegisterBlock = 0x2000_2000 as *const _;
76    #[doc = r"Return the pointer to the register block"]
77    #[inline(always)]
78    pub const fn ptr() -> *const gpip::RegisterBlock {
79        Self::PTR
80    }
81    #[doc = r" Steal an instance of this peripheral"]
82    #[doc = r""]
83    #[doc = r" # Safety"]
84    #[doc = r""]
85    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
86    #[doc = r" that may race with any existing instances, for example by only"]
87    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
88    #[doc = r" original peripheral and using critical sections to coordinate"]
89    #[doc = r" access between multiple new instances."]
90    #[doc = r""]
91    #[doc = r" Additionally, other software such as HALs may rely on only one"]
92    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
93    #[doc = r" no stolen instances are passed to such software."]
94    pub unsafe fn steal() -> Self {
95        Self {
96            _marker: PhantomData,
97        }
98    }
99}
100impl Deref for GPIP {
101    type Target = gpip::RegisterBlock;
102    #[inline(always)]
103    fn deref(&self) -> &Self::Target {
104        unsafe { &*Self::PTR }
105    }
106}
107impl core::fmt::Debug for GPIP {
108    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
109        f.debug_struct("GPIP").finish()
110    }
111}
112#[doc = "Generic DAC and ADC interface control"]
113pub mod gpip;
114#[doc = "Automatic Gain Control"]
115pub struct AGC {
116    _marker: PhantomData<*const ()>,
117}
118unsafe impl Send for AGC {}
119impl AGC {
120    #[doc = r"Pointer to the register block"]
121    pub const PTR: *const agc::RegisterBlock = 0x2000_2c00 as *const _;
122    #[doc = r"Return the pointer to the register block"]
123    #[inline(always)]
124    pub const fn ptr() -> *const agc::RegisterBlock {
125        Self::PTR
126    }
127    #[doc = r" Steal an instance of this peripheral"]
128    #[doc = r""]
129    #[doc = r" # Safety"]
130    #[doc = r""]
131    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
132    #[doc = r" that may race with any existing instances, for example by only"]
133    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
134    #[doc = r" original peripheral and using critical sections to coordinate"]
135    #[doc = r" access between multiple new instances."]
136    #[doc = r""]
137    #[doc = r" Additionally, other software such as HALs may rely on only one"]
138    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
139    #[doc = r" no stolen instances are passed to such software."]
140    pub unsafe fn steal() -> Self {
141        Self {
142            _marker: PhantomData,
143        }
144    }
145}
146impl Deref for AGC {
147    type Target = agc::RegisterBlock;
148    #[inline(always)]
149    fn deref(&self) -> &Self::Target {
150        unsafe { &*Self::PTR }
151    }
152}
153impl core::fmt::Debug for AGC {
154    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
155        f.debug_struct("AGC").finish()
156    }
157}
158#[doc = "Automatic Gain Control"]
159pub mod agc;
160#[doc = "Digest, Encryption and Signing accelerator"]
161pub struct SEC {
162    _marker: PhantomData<*const ()>,
163}
164unsafe impl Send for SEC {}
165impl SEC {
166    #[doc = r"Pointer to the register block"]
167    pub const PTR: *const sec::RegisterBlock = 0x2000_4000 as *const _;
168    #[doc = r"Return the pointer to the register block"]
169    #[inline(always)]
170    pub const fn ptr() -> *const sec::RegisterBlock {
171        Self::PTR
172    }
173    #[doc = r" Steal an instance of this peripheral"]
174    #[doc = r""]
175    #[doc = r" # Safety"]
176    #[doc = r""]
177    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
178    #[doc = r" that may race with any existing instances, for example by only"]
179    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
180    #[doc = r" original peripheral and using critical sections to coordinate"]
181    #[doc = r" access between multiple new instances."]
182    #[doc = r""]
183    #[doc = r" Additionally, other software such as HALs may rely on only one"]
184    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
185    #[doc = r" no stolen instances are passed to such software."]
186    pub unsafe fn steal() -> Self {
187        Self {
188            _marker: PhantomData,
189        }
190    }
191}
192impl Deref for SEC {
193    type Target = sec::RegisterBlock;
194    #[inline(always)]
195    fn deref(&self) -> &Self::Target {
196        unsafe { &*Self::PTR }
197    }
198}
199impl core::fmt::Debug for SEC {
200    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
201        f.debug_struct("SEC").finish()
202    }
203}
204#[doc = "Digest, Encryption and Signing accelerator"]
205pub mod sec;
206#[doc = "Peripheral and memory access permission"]
207pub struct PERMIT {
208    _marker: PhantomData<*const ()>,
209}
210unsafe impl Send for PERMIT {}
211impl PERMIT {
212    #[doc = r"Pointer to the register block"]
213    pub const PTR: *const permit::RegisterBlock = 0x2000_5000 as *const _;
214    #[doc = r"Return the pointer to the register block"]
215    #[inline(always)]
216    pub const fn ptr() -> *const permit::RegisterBlock {
217        Self::PTR
218    }
219    #[doc = r" Steal an instance of this peripheral"]
220    #[doc = r""]
221    #[doc = r" # Safety"]
222    #[doc = r""]
223    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
224    #[doc = r" that may race with any existing instances, for example by only"]
225    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
226    #[doc = r" original peripheral and using critical sections to coordinate"]
227    #[doc = r" access between multiple new instances."]
228    #[doc = r""]
229    #[doc = r" Additionally, other software such as HALs may rely on only one"]
230    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
231    #[doc = r" no stolen instances are passed to such software."]
232    pub unsafe fn steal() -> Self {
233        Self {
234            _marker: PhantomData,
235        }
236    }
237}
238impl Deref for PERMIT {
239    type Target = permit::RegisterBlock;
240    #[inline(always)]
241    fn deref(&self) -> &Self::Target {
242        unsafe { &*Self::PTR }
243    }
244}
245impl core::fmt::Debug for PERMIT {
246    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
247        f.debug_struct("PERMIT").finish()
248    }
249}
250#[doc = "Peripheral and memory access permission"]
251pub mod permit;
252#[doc = "Universal Asynchronous Receiver Transmitter"]
253pub struct UART0 {
254    _marker: PhantomData<*const ()>,
255}
256unsafe impl Send for UART0 {}
257impl UART0 {
258    #[doc = r"Pointer to the register block"]
259    pub const PTR: *const uart::RegisterBlock = 0x2000_a000 as *const _;
260    #[doc = r"Return the pointer to the register block"]
261    #[inline(always)]
262    pub const fn ptr() -> *const uart::RegisterBlock {
263        Self::PTR
264    }
265    #[doc = r" Steal an instance of this peripheral"]
266    #[doc = r""]
267    #[doc = r" # Safety"]
268    #[doc = r""]
269    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
270    #[doc = r" that may race with any existing instances, for example by only"]
271    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
272    #[doc = r" original peripheral and using critical sections to coordinate"]
273    #[doc = r" access between multiple new instances."]
274    #[doc = r""]
275    #[doc = r" Additionally, other software such as HALs may rely on only one"]
276    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
277    #[doc = r" no stolen instances are passed to such software."]
278    pub unsafe fn steal() -> Self {
279        Self {
280            _marker: PhantomData,
281        }
282    }
283}
284impl Deref for UART0 {
285    type Target = uart::RegisterBlock;
286    #[inline(always)]
287    fn deref(&self) -> &Self::Target {
288        unsafe { &*Self::PTR }
289    }
290}
291impl core::fmt::Debug for UART0 {
292    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
293        f.debug_struct("UART0").finish()
294    }
295}
296#[doc = "Universal Asynchronous Receiver Transmitter"]
297pub struct UART1 {
298    _marker: PhantomData<*const ()>,
299}
300unsafe impl Send for UART1 {}
301impl UART1 {
302    #[doc = r"Pointer to the register block"]
303    pub const PTR: *const uart::RegisterBlock = 0x2000_a100 as *const _;
304    #[doc = r"Return the pointer to the register block"]
305    #[inline(always)]
306    pub const fn ptr() -> *const uart::RegisterBlock {
307        Self::PTR
308    }
309    #[doc = r" Steal an instance of this peripheral"]
310    #[doc = r""]
311    #[doc = r" # Safety"]
312    #[doc = r""]
313    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
314    #[doc = r" that may race with any existing instances, for example by only"]
315    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
316    #[doc = r" original peripheral and using critical sections to coordinate"]
317    #[doc = r" access between multiple new instances."]
318    #[doc = r""]
319    #[doc = r" Additionally, other software such as HALs may rely on only one"]
320    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
321    #[doc = r" no stolen instances are passed to such software."]
322    pub unsafe fn steal() -> Self {
323        Self {
324            _marker: PhantomData,
325        }
326    }
327}
328impl Deref for UART1 {
329    type Target = uart::RegisterBlock;
330    #[inline(always)]
331    fn deref(&self) -> &Self::Target {
332        unsafe { &*Self::PTR }
333    }
334}
335impl core::fmt::Debug for UART1 {
336    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
337        f.debug_struct("UART1").finish()
338    }
339}
340#[doc = "Universal Asynchronous Receiver Transmitter"]
341pub mod uart;
342#[doc = "Serial Peripheral Interface"]
343pub struct SPI0 {
344    _marker: PhantomData<*const ()>,
345}
346unsafe impl Send for SPI0 {}
347impl SPI0 {
348    #[doc = r"Pointer to the register block"]
349    pub const PTR: *const spi::RegisterBlock = 0x2000_a200 as *const _;
350    #[doc = r"Return the pointer to the register block"]
351    #[inline(always)]
352    pub const fn ptr() -> *const spi::RegisterBlock {
353        Self::PTR
354    }
355    #[doc = r" Steal an instance of this peripheral"]
356    #[doc = r""]
357    #[doc = r" # Safety"]
358    #[doc = r""]
359    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
360    #[doc = r" that may race with any existing instances, for example by only"]
361    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
362    #[doc = r" original peripheral and using critical sections to coordinate"]
363    #[doc = r" access between multiple new instances."]
364    #[doc = r""]
365    #[doc = r" Additionally, other software such as HALs may rely on only one"]
366    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
367    #[doc = r" no stolen instances are passed to such software."]
368    pub unsafe fn steal() -> Self {
369        Self {
370            _marker: PhantomData,
371        }
372    }
373}
374impl Deref for SPI0 {
375    type Target = spi::RegisterBlock;
376    #[inline(always)]
377    fn deref(&self) -> &Self::Target {
378        unsafe { &*Self::PTR }
379    }
380}
381impl core::fmt::Debug for SPI0 {
382    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
383        f.debug_struct("SPI0").finish()
384    }
385}
386#[doc = "Serial Peripheral Interface"]
387pub mod spi;
388#[doc = "Inter-Integrated Circuit bus"]
389pub struct I2C0 {
390    _marker: PhantomData<*const ()>,
391}
392unsafe impl Send for I2C0 {}
393impl I2C0 {
394    #[doc = r"Pointer to the register block"]
395    pub const PTR: *const i2c::RegisterBlock = 0x2000_a300 as *const _;
396    #[doc = r"Return the pointer to the register block"]
397    #[inline(always)]
398    pub const fn ptr() -> *const i2c::RegisterBlock {
399        Self::PTR
400    }
401    #[doc = r" Steal an instance of this peripheral"]
402    #[doc = r""]
403    #[doc = r" # Safety"]
404    #[doc = r""]
405    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
406    #[doc = r" that may race with any existing instances, for example by only"]
407    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
408    #[doc = r" original peripheral and using critical sections to coordinate"]
409    #[doc = r" access between multiple new instances."]
410    #[doc = r""]
411    #[doc = r" Additionally, other software such as HALs may rely on only one"]
412    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
413    #[doc = r" no stolen instances are passed to such software."]
414    pub unsafe fn steal() -> Self {
415        Self {
416            _marker: PhantomData,
417        }
418    }
419}
420impl Deref for I2C0 {
421    type Target = i2c::RegisterBlock;
422    #[inline(always)]
423    fn deref(&self) -> &Self::Target {
424        unsafe { &*Self::PTR }
425    }
426}
427impl core::fmt::Debug for I2C0 {
428    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
429        f.debug_struct("I2C0").finish()
430    }
431}
432#[doc = "Inter-Integrated Circuit bus"]
433pub struct I2C1 {
434    _marker: PhantomData<*const ()>,
435}
436unsafe impl Send for I2C1 {}
437impl I2C1 {
438    #[doc = r"Pointer to the register block"]
439    pub const PTR: *const i2c::RegisterBlock = 0x2000_a900 as *const _;
440    #[doc = r"Return the pointer to the register block"]
441    #[inline(always)]
442    pub const fn ptr() -> *const i2c::RegisterBlock {
443        Self::PTR
444    }
445    #[doc = r" Steal an instance of this peripheral"]
446    #[doc = r""]
447    #[doc = r" # Safety"]
448    #[doc = r""]
449    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
450    #[doc = r" that may race with any existing instances, for example by only"]
451    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
452    #[doc = r" original peripheral and using critical sections to coordinate"]
453    #[doc = r" access between multiple new instances."]
454    #[doc = r""]
455    #[doc = r" Additionally, other software such as HALs may rely on only one"]
456    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
457    #[doc = r" no stolen instances are passed to such software."]
458    pub unsafe fn steal() -> Self {
459        Self {
460            _marker: PhantomData,
461        }
462    }
463}
464impl Deref for I2C1 {
465    type Target = i2c::RegisterBlock;
466    #[inline(always)]
467    fn deref(&self) -> &Self::Target {
468        unsafe { &*Self::PTR }
469    }
470}
471impl core::fmt::Debug for I2C1 {
472    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
473        f.debug_struct("I2C1").finish()
474    }
475}
476#[doc = "Inter-Integrated Circuit bus"]
477pub mod i2c;
478#[doc = "Pulse-Width Modulation module"]
479pub struct PWM {
480    _marker: PhantomData<*const ()>,
481}
482unsafe impl Send for PWM {}
483impl PWM {
484    #[doc = r"Pointer to the register block"]
485    pub const PTR: *const pwm::RegisterBlock = 0x2000_a400 as *const _;
486    #[doc = r"Return the pointer to the register block"]
487    #[inline(always)]
488    pub const fn ptr() -> *const pwm::RegisterBlock {
489        Self::PTR
490    }
491    #[doc = r" Steal an instance of this peripheral"]
492    #[doc = r""]
493    #[doc = r" # Safety"]
494    #[doc = r""]
495    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
496    #[doc = r" that may race with any existing instances, for example by only"]
497    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
498    #[doc = r" original peripheral and using critical sections to coordinate"]
499    #[doc = r" access between multiple new instances."]
500    #[doc = r""]
501    #[doc = r" Additionally, other software such as HALs may rely on only one"]
502    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
503    #[doc = r" no stolen instances are passed to such software."]
504    pub unsafe fn steal() -> Self {
505        Self {
506            _marker: PhantomData,
507        }
508    }
509}
510impl Deref for PWM {
511    type Target = pwm::RegisterBlock;
512    #[inline(always)]
513    fn deref(&self) -> &Self::Target {
514        unsafe { &*Self::PTR }
515    }
516}
517impl core::fmt::Debug for PWM {
518    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
519        f.debug_struct("PWM").finish()
520    }
521}
522#[doc = "Pulse-Width Modulation module"]
523pub mod pwm;
524#[doc = "Timer control"]
525pub struct TIMER {
526    _marker: PhantomData<*const ()>,
527}
528unsafe impl Send for TIMER {}
529impl TIMER {
530    #[doc = r"Pointer to the register block"]
531    pub const PTR: *const timer::RegisterBlock = 0x2000_a500 as *const _;
532    #[doc = r"Return the pointer to the register block"]
533    #[inline(always)]
534    pub const fn ptr() -> *const timer::RegisterBlock {
535        Self::PTR
536    }
537    #[doc = r" Steal an instance of this peripheral"]
538    #[doc = r""]
539    #[doc = r" # Safety"]
540    #[doc = r""]
541    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
542    #[doc = r" that may race with any existing instances, for example by only"]
543    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
544    #[doc = r" original peripheral and using critical sections to coordinate"]
545    #[doc = r" access between multiple new instances."]
546    #[doc = r""]
547    #[doc = r" Additionally, other software such as HALs may rely on only one"]
548    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
549    #[doc = r" no stolen instances are passed to such software."]
550    pub unsafe fn steal() -> Self {
551        Self {
552            _marker: PhantomData,
553        }
554    }
555}
556impl Deref for TIMER {
557    type Target = timer::RegisterBlock;
558    #[inline(always)]
559    fn deref(&self) -> &Self::Target {
560        unsafe { &*Self::PTR }
561    }
562}
563impl core::fmt::Debug for TIMER {
564    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
565        f.debug_struct("TIMER").finish()
566    }
567}
568#[doc = "Timer control"]
569pub mod timer;
570#[doc = "Infrared receiver module"]
571pub struct IR {
572    _marker: PhantomData<*const ()>,
573}
574unsafe impl Send for IR {}
575impl IR {
576    #[doc = r"Pointer to the register block"]
577    pub const PTR: *const ir::RegisterBlock = 0x2000_a600 as *const _;
578    #[doc = r"Return the pointer to the register block"]
579    #[inline(always)]
580    pub const fn ptr() -> *const ir::RegisterBlock {
581        Self::PTR
582    }
583    #[doc = r" Steal an instance of this peripheral"]
584    #[doc = r""]
585    #[doc = r" # Safety"]
586    #[doc = r""]
587    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
588    #[doc = r" that may race with any existing instances, for example by only"]
589    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
590    #[doc = r" original peripheral and using critical sections to coordinate"]
591    #[doc = r" access between multiple new instances."]
592    #[doc = r""]
593    #[doc = r" Additionally, other software such as HALs may rely on only one"]
594    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
595    #[doc = r" no stolen instances are passed to such software."]
596    pub unsafe fn steal() -> Self {
597        Self {
598            _marker: PhantomData,
599        }
600    }
601}
602impl Deref for IR {
603    type Target = ir::RegisterBlock;
604    #[inline(always)]
605    fn deref(&self) -> &Self::Target {
606        unsafe { &*Self::PTR }
607    }
608}
609impl core::fmt::Debug for IR {
610    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
611        f.debug_struct("IR").finish()
612    }
613}
614#[doc = "Infrared receiver module"]
615pub mod ir;
616#[doc = "Checksum peripheral"]
617pub struct CRC {
618    _marker: PhantomData<*const ()>,
619}
620unsafe impl Send for CRC {}
621impl CRC {
622    #[doc = r"Pointer to the register block"]
623    pub const PTR: *const crc::RegisterBlock = 0x2000_a700 as *const _;
624    #[doc = r"Return the pointer to the register block"]
625    #[inline(always)]
626    pub const fn ptr() -> *const crc::RegisterBlock {
627        Self::PTR
628    }
629    #[doc = r" Steal an instance of this peripheral"]
630    #[doc = r""]
631    #[doc = r" # Safety"]
632    #[doc = r""]
633    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
634    #[doc = r" that may race with any existing instances, for example by only"]
635    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
636    #[doc = r" original peripheral and using critical sections to coordinate"]
637    #[doc = r" access between multiple new instances."]
638    #[doc = r""]
639    #[doc = r" Additionally, other software such as HALs may rely on only one"]
640    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
641    #[doc = r" no stolen instances are passed to such software."]
642    pub unsafe fn steal() -> Self {
643        Self {
644            _marker: PhantomData,
645        }
646    }
647}
648impl Deref for CRC {
649    type Target = crc::RegisterBlock;
650    #[inline(always)]
651    fn deref(&self) -> &Self::Target {
652        unsafe { &*Self::PTR }
653    }
654}
655impl core::fmt::Debug for CRC {
656    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
657        f.debug_struct("CRC").finish()
658    }
659}
660#[doc = "Checksum peripheral"]
661pub mod crc;
662#[doc = "MIPI Display Bus Interface"]
663pub struct DBI {
664    _marker: PhantomData<*const ()>,
665}
666unsafe impl Send for DBI {}
667impl DBI {
668    #[doc = r"Pointer to the register block"]
669    pub const PTR: *const dbi::RegisterBlock = 0x2000_a800 as *const _;
670    #[doc = r"Return the pointer to the register block"]
671    #[inline(always)]
672    pub const fn ptr() -> *const dbi::RegisterBlock {
673        Self::PTR
674    }
675    #[doc = r" Steal an instance of this peripheral"]
676    #[doc = r""]
677    #[doc = r" # Safety"]
678    #[doc = r""]
679    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
680    #[doc = r" that may race with any existing instances, for example by only"]
681    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
682    #[doc = r" original peripheral and using critical sections to coordinate"]
683    #[doc = r" access between multiple new instances."]
684    #[doc = r""]
685    #[doc = r" Additionally, other software such as HALs may rely on only one"]
686    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
687    #[doc = r" no stolen instances are passed to such software."]
688    pub unsafe fn steal() -> Self {
689        Self {
690            _marker: PhantomData,
691        }
692    }
693}
694impl Deref for DBI {
695    type Target = dbi::RegisterBlock;
696    #[inline(always)]
697    fn deref(&self) -> &Self::Target {
698        unsafe { &*Self::PTR }
699    }
700}
701impl core::fmt::Debug for DBI {
702    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
703        f.debug_struct("DBI").finish()
704    }
705}
706#[doc = "MIPI Display Bus Interface"]
707pub mod dbi;
708#[doc = "ISO 11898 communication protocol"]
709pub struct ISO11898 {
710    _marker: PhantomData<*const ()>,
711}
712unsafe impl Send for ISO11898 {}
713impl ISO11898 {
714    #[doc = r"Pointer to the register block"]
715    pub const PTR: *const iso11898::RegisterBlock = 0x2000_aa00 as *const _;
716    #[doc = r"Return the pointer to the register block"]
717    #[inline(always)]
718    pub const fn ptr() -> *const iso11898::RegisterBlock {
719        Self::PTR
720    }
721    #[doc = r" Steal an instance of this peripheral"]
722    #[doc = r""]
723    #[doc = r" # Safety"]
724    #[doc = r""]
725    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
726    #[doc = r" that may race with any existing instances, for example by only"]
727    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
728    #[doc = r" original peripheral and using critical sections to coordinate"]
729    #[doc = r" access between multiple new instances."]
730    #[doc = r""]
731    #[doc = r" Additionally, other software such as HALs may rely on only one"]
732    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
733    #[doc = r" no stolen instances are passed to such software."]
734    pub unsafe fn steal() -> Self {
735        Self {
736            _marker: PhantomData,
737        }
738    }
739}
740impl Deref for ISO11898 {
741    type Target = iso11898::RegisterBlock;
742    #[inline(always)]
743    fn deref(&self) -> &Self::Target {
744        unsafe { &*Self::PTR }
745    }
746}
747impl core::fmt::Debug for ISO11898 {
748    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
749        f.debug_struct("ISO11898").finish()
750    }
751}
752#[doc = "ISO 11898 communication protocol"]
753pub mod iso11898;
754#[doc = "Inter-IC Sound controller"]
755pub struct I2S {
756    _marker: PhantomData<*const ()>,
757}
758unsafe impl Send for I2S {}
759impl I2S {
760    #[doc = r"Pointer to the register block"]
761    pub const PTR: *const i2s::RegisterBlock = 0x2000_ab00 as *const _;
762    #[doc = r"Return the pointer to the register block"]
763    #[inline(always)]
764    pub const fn ptr() -> *const i2s::RegisterBlock {
765        Self::PTR
766    }
767    #[doc = r" Steal an instance of this peripheral"]
768    #[doc = r""]
769    #[doc = r" # Safety"]
770    #[doc = r""]
771    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
772    #[doc = r" that may race with any existing instances, for example by only"]
773    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
774    #[doc = r" original peripheral and using critical sections to coordinate"]
775    #[doc = r" access between multiple new instances."]
776    #[doc = r""]
777    #[doc = r" Additionally, other software such as HALs may rely on only one"]
778    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
779    #[doc = r" no stolen instances are passed to such software."]
780    pub unsafe fn steal() -> Self {
781        Self {
782            _marker: PhantomData,
783        }
784    }
785}
786impl Deref for I2S {
787    type Target = i2s::RegisterBlock;
788    #[inline(always)]
789    fn deref(&self) -> &Self::Target {
790        unsafe { &*Self::PTR }
791    }
792}
793impl core::fmt::Debug for I2S {
794    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
795        f.debug_struct("I2S").finish()
796    }
797}
798#[doc = "Inter-IC Sound controller"]
799pub mod i2s;
800#[doc = "Analog-to-Digital or Pulse-Density audio input"]
801pub struct AUADC {
802    _marker: PhantomData<*const ()>,
803}
804unsafe impl Send for AUADC {}
805impl AUADC {
806    #[doc = r"Pointer to the register block"]
807    pub const PTR: *const auadc::RegisterBlock = 0x2000_ac00 as *const _;
808    #[doc = r"Return the pointer to the register block"]
809    #[inline(always)]
810    pub const fn ptr() -> *const auadc::RegisterBlock {
811        Self::PTR
812    }
813    #[doc = r" Steal an instance of this peripheral"]
814    #[doc = r""]
815    #[doc = r" # Safety"]
816    #[doc = r""]
817    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
818    #[doc = r" that may race with any existing instances, for example by only"]
819    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
820    #[doc = r" original peripheral and using critical sections to coordinate"]
821    #[doc = r" access between multiple new instances."]
822    #[doc = r""]
823    #[doc = r" Additionally, other software such as HALs may rely on only one"]
824    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
825    #[doc = r" no stolen instances are passed to such software."]
826    pub unsafe fn steal() -> Self {
827        Self {
828            _marker: PhantomData,
829        }
830    }
831}
832impl Deref for AUADC {
833    type Target = auadc::RegisterBlock;
834    #[inline(always)]
835    fn deref(&self) -> &Self::Target {
836        unsafe { &*Self::PTR }
837    }
838}
839impl core::fmt::Debug for AUADC {
840    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
841        f.debug_struct("AUADC").finish()
842    }
843}
844#[doc = "Analog-to-Digital or Pulse-Density audio input"]
845pub mod auadc;
846#[doc = "Quad Serial Flash control"]
847pub struct FLASH {
848    _marker: PhantomData<*const ()>,
849}
850unsafe impl Send for FLASH {}
851impl FLASH {
852    #[doc = r"Pointer to the register block"]
853    pub const PTR: *const flash::RegisterBlock = 0x2000_b000 as *const _;
854    #[doc = r"Return the pointer to the register block"]
855    #[inline(always)]
856    pub const fn ptr() -> *const flash::RegisterBlock {
857        Self::PTR
858    }
859    #[doc = r" Steal an instance of this peripheral"]
860    #[doc = r""]
861    #[doc = r" # Safety"]
862    #[doc = r""]
863    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
864    #[doc = r" that may race with any existing instances, for example by only"]
865    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
866    #[doc = r" original peripheral and using critical sections to coordinate"]
867    #[doc = r" access between multiple new instances."]
868    #[doc = r""]
869    #[doc = r" Additionally, other software such as HALs may rely on only one"]
870    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
871    #[doc = r" no stolen instances are passed to such software."]
872    pub unsafe fn steal() -> Self {
873        Self {
874            _marker: PhantomData,
875        }
876    }
877}
878impl Deref for FLASH {
879    type Target = flash::RegisterBlock;
880    #[inline(always)]
881    fn deref(&self) -> &Self::Target {
882        unsafe { &*Self::PTR }
883    }
884}
885impl core::fmt::Debug for FLASH {
886    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
887        f.debug_struct("FLASH").finish()
888    }
889}
890#[doc = "Quad Serial Flash control"]
891pub mod flash;
892#[doc = "Direct Memory Access module"]
893pub struct DMA {
894    _marker: PhantomData<*const ()>,
895}
896unsafe impl Send for DMA {}
897impl DMA {
898    #[doc = r"Pointer to the register block"]
899    pub const PTR: *const dma::RegisterBlock = 0x2000_c000 as *const _;
900    #[doc = r"Return the pointer to the register block"]
901    #[inline(always)]
902    pub const fn ptr() -> *const dma::RegisterBlock {
903        Self::PTR
904    }
905    #[doc = r" Steal an instance of this peripheral"]
906    #[doc = r""]
907    #[doc = r" # Safety"]
908    #[doc = r""]
909    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
910    #[doc = r" that may race with any existing instances, for example by only"]
911    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
912    #[doc = r" original peripheral and using critical sections to coordinate"]
913    #[doc = r" access between multiple new instances."]
914    #[doc = r""]
915    #[doc = r" Additionally, other software such as HALs may rely on only one"]
916    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
917    #[doc = r" no stolen instances are passed to such software."]
918    pub unsafe fn steal() -> Self {
919        Self {
920            _marker: PhantomData,
921        }
922    }
923}
924impl Deref for DMA {
925    type Target = dma::RegisterBlock;
926    #[inline(always)]
927    fn deref(&self) -> &Self::Target {
928        unsafe { &*Self::PTR }
929    }
930}
931impl core::fmt::Debug for DMA {
932    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
933        f.debug_struct("DMA").finish()
934    }
935}
936#[doc = "Direct Memory Access module"]
937pub mod dma;
938#[doc = "Secure Digital User interface"]
939pub struct SDU {
940    _marker: PhantomData<*const ()>,
941}
942unsafe impl Send for SDU {}
943impl SDU {
944    #[doc = r"Pointer to the register block"]
945    pub const PTR: *const sdu::RegisterBlock = 0x2000_d000 as *const _;
946    #[doc = r"Return the pointer to the register block"]
947    #[inline(always)]
948    pub const fn ptr() -> *const sdu::RegisterBlock {
949        Self::PTR
950    }
951    #[doc = r" Steal an instance of this peripheral"]
952    #[doc = r""]
953    #[doc = r" # Safety"]
954    #[doc = r""]
955    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
956    #[doc = r" that may race with any existing instances, for example by only"]
957    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
958    #[doc = r" original peripheral and using critical sections to coordinate"]
959    #[doc = r" access between multiple new instances."]
960    #[doc = r""]
961    #[doc = r" Additionally, other software such as HALs may rely on only one"]
962    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
963    #[doc = r" no stolen instances are passed to such software."]
964    pub unsafe fn steal() -> Self {
965        Self {
966            _marker: PhantomData,
967        }
968    }
969}
970impl Deref for SDU {
971    type Target = sdu::RegisterBlock;
972    #[inline(always)]
973    fn deref(&self) -> &Self::Target {
974        unsafe { &*Self::PTR }
975    }
976}
977impl core::fmt::Debug for SDU {
978    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
979        f.debug_struct("SDU").finish()
980    }
981}
982#[doc = "Secure Digital User interface"]
983pub mod sdu;
984#[doc = "Hibernate (Deep sleep) control"]
985pub struct HBN {
986    _marker: PhantomData<*const ()>,
987}
988unsafe impl Send for HBN {}
989impl HBN {
990    #[doc = r"Pointer to the register block"]
991    pub const PTR: *const hbn::RegisterBlock = 0x2000_f000 as *const _;
992    #[doc = r"Return the pointer to the register block"]
993    #[inline(always)]
994    pub const fn ptr() -> *const hbn::RegisterBlock {
995        Self::PTR
996    }
997    #[doc = r" Steal an instance of this peripheral"]
998    #[doc = r""]
999    #[doc = r" # Safety"]
1000    #[doc = r""]
1001    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1002    #[doc = r" that may race with any existing instances, for example by only"]
1003    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1004    #[doc = r" original peripheral and using critical sections to coordinate"]
1005    #[doc = r" access between multiple new instances."]
1006    #[doc = r""]
1007    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1008    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1009    #[doc = r" no stolen instances are passed to such software."]
1010    pub unsafe fn steal() -> Self {
1011        Self {
1012            _marker: PhantomData,
1013        }
1014    }
1015}
1016impl Deref for HBN {
1017    type Target = hbn::RegisterBlock;
1018    #[inline(always)]
1019    fn deref(&self) -> &Self::Target {
1020        unsafe { &*Self::PTR }
1021    }
1022}
1023impl core::fmt::Debug for HBN {
1024    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1025        f.debug_struct("HBN").finish()
1026    }
1027}
1028#[doc = "Hibernate (Deep sleep) control"]
1029pub mod hbn;
1030#[doc = "Pseudo Static Random Access Memory control"]
1031pub struct PSRAM {
1032    _marker: PhantomData<*const ()>,
1033}
1034unsafe impl Send for PSRAM {}
1035impl PSRAM {
1036    #[doc = r"Pointer to the register block"]
1037    pub const PTR: *const psram::RegisterBlock = 0x2005_2000 as *const _;
1038    #[doc = r"Return the pointer to the register block"]
1039    #[inline(always)]
1040    pub const fn ptr() -> *const psram::RegisterBlock {
1041        Self::PTR
1042    }
1043    #[doc = r" Steal an instance of this peripheral"]
1044    #[doc = r""]
1045    #[doc = r" # Safety"]
1046    #[doc = r""]
1047    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1048    #[doc = r" that may race with any existing instances, for example by only"]
1049    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1050    #[doc = r" original peripheral and using critical sections to coordinate"]
1051    #[doc = r" access between multiple new instances."]
1052    #[doc = r""]
1053    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1054    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1055    #[doc = r" no stolen instances are passed to such software."]
1056    pub unsafe fn steal() -> Self {
1057        Self {
1058            _marker: PhantomData,
1059        }
1060    }
1061}
1062impl Deref for PSRAM {
1063    type Target = psram::RegisterBlock;
1064    #[inline(always)]
1065    fn deref(&self) -> &Self::Target {
1066        unsafe { &*Self::PTR }
1067    }
1068}
1069impl core::fmt::Debug for PSRAM {
1070    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1071        f.debug_struct("PSRAM").finish()
1072    }
1073}
1074#[doc = "Pseudo Static Random Access Memory control"]
1075pub mod psram;
1076#[doc = "Pulse-Width or Digital-to-Analog audio output"]
1077pub struct AUDAC {
1078    _marker: PhantomData<*const ()>,
1079}
1080unsafe impl Send for AUDAC {}
1081impl AUDAC {
1082    #[doc = r"Pointer to the register block"]
1083    pub const PTR: *const audac::RegisterBlock = 0x2005_5000 as *const _;
1084    #[doc = r"Return the pointer to the register block"]
1085    #[inline(always)]
1086    pub const fn ptr() -> *const audac::RegisterBlock {
1087        Self::PTR
1088    }
1089    #[doc = r" Steal an instance of this peripheral"]
1090    #[doc = r""]
1091    #[doc = r" # Safety"]
1092    #[doc = r""]
1093    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1094    #[doc = r" that may race with any existing instances, for example by only"]
1095    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1096    #[doc = r" original peripheral and using critical sections to coordinate"]
1097    #[doc = r" access between multiple new instances."]
1098    #[doc = r""]
1099    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1100    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1101    #[doc = r" no stolen instances are passed to such software."]
1102    pub unsafe fn steal() -> Self {
1103        Self {
1104            _marker: PhantomData,
1105        }
1106    }
1107}
1108impl Deref for AUDAC {
1109    type Target = audac::RegisterBlock;
1110    #[inline(always)]
1111    fn deref(&self) -> &Self::Target {
1112        unsafe { &*Self::PTR }
1113    }
1114}
1115impl core::fmt::Debug for AUDAC {
1116    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1117        f.debug_struct("AUDAC").finish()
1118    }
1119}
1120#[doc = "Pulse-Width or Digital-to-Analog audio output"]
1121pub mod audac;
1122#[doc = "eFuse memory control"]
1123pub struct EFUSE {
1124    _marker: PhantomData<*const ()>,
1125}
1126unsafe impl Send for EFUSE {}
1127impl EFUSE {
1128    #[doc = r"Pointer to the register block"]
1129    pub const PTR: *const efuse::RegisterBlock = 0x2005_6000 as *const _;
1130    #[doc = r"Return the pointer to the register block"]
1131    #[inline(always)]
1132    pub const fn ptr() -> *const efuse::RegisterBlock {
1133        Self::PTR
1134    }
1135    #[doc = r" Steal an instance of this peripheral"]
1136    #[doc = r""]
1137    #[doc = r" # Safety"]
1138    #[doc = r""]
1139    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1140    #[doc = r" that may race with any existing instances, for example by only"]
1141    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1142    #[doc = r" original peripheral and using critical sections to coordinate"]
1143    #[doc = r" access between multiple new instances."]
1144    #[doc = r""]
1145    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1146    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1147    #[doc = r" no stolen instances are passed to such software."]
1148    pub unsafe fn steal() -> Self {
1149        Self {
1150            _marker: PhantomData,
1151        }
1152    }
1153}
1154impl Deref for EFUSE {
1155    type Target = efuse::RegisterBlock;
1156    #[inline(always)]
1157    fn deref(&self) -> &Self::Target {
1158        unsafe { &*Self::PTR }
1159    }
1160}
1161impl core::fmt::Debug for EFUSE {
1162    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1163        f.debug_struct("EFUSE").finish()
1164    }
1165}
1166#[doc = "eFuse memory control"]
1167pub mod efuse;
1168#[doc = "Digital Video Port control"]
1169pub struct DVP0 {
1170    _marker: PhantomData<*const ()>,
1171}
1172unsafe impl Send for DVP0 {}
1173impl DVP0 {
1174    #[doc = r"Pointer to the register block"]
1175    pub const PTR: *const dvp::RegisterBlock = 0x2005_7000 as *const _;
1176    #[doc = r"Return the pointer to the register block"]
1177    #[inline(always)]
1178    pub const fn ptr() -> *const dvp::RegisterBlock {
1179        Self::PTR
1180    }
1181    #[doc = r" Steal an instance of this peripheral"]
1182    #[doc = r""]
1183    #[doc = r" # Safety"]
1184    #[doc = r""]
1185    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1186    #[doc = r" that may race with any existing instances, for example by only"]
1187    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1188    #[doc = r" original peripheral and using critical sections to coordinate"]
1189    #[doc = r" access between multiple new instances."]
1190    #[doc = r""]
1191    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1192    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1193    #[doc = r" no stolen instances are passed to such software."]
1194    pub unsafe fn steal() -> Self {
1195        Self {
1196            _marker: PhantomData,
1197        }
1198    }
1199}
1200impl Deref for DVP0 {
1201    type Target = dvp::RegisterBlock;
1202    #[inline(always)]
1203    fn deref(&self) -> &Self::Target {
1204        unsafe { &*Self::PTR }
1205    }
1206}
1207impl core::fmt::Debug for DVP0 {
1208    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1209        f.debug_struct("DVP0").finish()
1210    }
1211}
1212#[doc = "Digital Video Port control"]
1213pub mod dvp;
1214#[doc = "Motion JPEG encoder"]
1215pub struct MJPEG {
1216    _marker: PhantomData<*const ()>,
1217}
1218unsafe impl Send for MJPEG {}
1219impl MJPEG {
1220    #[doc = r"Pointer to the register block"]
1221    pub const PTR: *const mjpeg::RegisterBlock = 0x2005_9000 as *const _;
1222    #[doc = r"Return the pointer to the register block"]
1223    #[inline(always)]
1224    pub const fn ptr() -> *const mjpeg::RegisterBlock {
1225        Self::PTR
1226    }
1227    #[doc = r" Steal an instance of this peripheral"]
1228    #[doc = r""]
1229    #[doc = r" # Safety"]
1230    #[doc = r""]
1231    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1232    #[doc = r" that may race with any existing instances, for example by only"]
1233    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1234    #[doc = r" original peripheral and using critical sections to coordinate"]
1235    #[doc = r" access between multiple new instances."]
1236    #[doc = r""]
1237    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1238    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1239    #[doc = r" no stolen instances are passed to such software."]
1240    pub unsafe fn steal() -> Self {
1241        Self {
1242            _marker: PhantomData,
1243        }
1244    }
1245}
1246impl Deref for MJPEG {
1247    type Target = mjpeg::RegisterBlock;
1248    #[inline(always)]
1249    fn deref(&self) -> &Self::Target {
1250        unsafe { &*Self::PTR }
1251    }
1252}
1253impl core::fmt::Debug for MJPEG {
1254    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1255        f.debug_struct("MJPEG").finish()
1256    }
1257}
1258#[doc = "Motion JPEG encoder"]
1259pub mod mjpeg;
1260#[doc = "Secure Digital host control"]
1261pub struct SDH {
1262    _marker: PhantomData<*const ()>,
1263}
1264unsafe impl Send for SDH {}
1265impl SDH {
1266    #[doc = r"Pointer to the register block"]
1267    pub const PTR: *const sdh::RegisterBlock = 0x2006_0000 as *const _;
1268    #[doc = r"Return the pointer to the register block"]
1269    #[inline(always)]
1270    pub const fn ptr() -> *const sdh::RegisterBlock {
1271        Self::PTR
1272    }
1273    #[doc = r" Steal an instance of this peripheral"]
1274    #[doc = r""]
1275    #[doc = r" # Safety"]
1276    #[doc = r""]
1277    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1278    #[doc = r" that may race with any existing instances, for example by only"]
1279    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1280    #[doc = r" original peripheral and using critical sections to coordinate"]
1281    #[doc = r" access between multiple new instances."]
1282    #[doc = r""]
1283    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1284    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1285    #[doc = r" no stolen instances are passed to such software."]
1286    pub unsafe fn steal() -> Self {
1287        Self {
1288            _marker: PhantomData,
1289        }
1290    }
1291}
1292impl Deref for SDH {
1293    type Target = sdh::RegisterBlock;
1294    #[inline(always)]
1295    fn deref(&self) -> &Self::Target {
1296        unsafe { &*Self::PTR }
1297    }
1298}
1299impl core::fmt::Debug for SDH {
1300    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1301        f.debug_struct("SDH").finish()
1302    }
1303}
1304#[doc = "Secure Digital host control"]
1305pub mod sdh;
1306#[doc = "Ethernet Media Access Control"]
1307pub struct EMAC {
1308    _marker: PhantomData<*const ()>,
1309}
1310unsafe impl Send for EMAC {}
1311impl EMAC {
1312    #[doc = r"Pointer to the register block"]
1313    pub const PTR: *const emac::RegisterBlock = 0x2007_0000 as *const _;
1314    #[doc = r"Return the pointer to the register block"]
1315    #[inline(always)]
1316    pub const fn ptr() -> *const emac::RegisterBlock {
1317        Self::PTR
1318    }
1319    #[doc = r" Steal an instance of this peripheral"]
1320    #[doc = r""]
1321    #[doc = r" # Safety"]
1322    #[doc = r""]
1323    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1324    #[doc = r" that may race with any existing instances, for example by only"]
1325    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1326    #[doc = r" original peripheral and using critical sections to coordinate"]
1327    #[doc = r" access between multiple new instances."]
1328    #[doc = r""]
1329    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1330    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1331    #[doc = r" no stolen instances are passed to such software."]
1332    pub unsafe fn steal() -> Self {
1333        Self {
1334            _marker: PhantomData,
1335        }
1336    }
1337}
1338impl Deref for EMAC {
1339    type Target = emac::RegisterBlock;
1340    #[inline(always)]
1341    fn deref(&self) -> &Self::Target {
1342        unsafe { &*Self::PTR }
1343    }
1344}
1345impl core::fmt::Debug for EMAC {
1346    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1347        f.debug_struct("EMAC").finish()
1348    }
1349}
1350#[doc = "Ethernet Media Access Control"]
1351pub mod emac;
1352#[doc = "Universal Serial Bus host"]
1353pub struct USB {
1354    _marker: PhantomData<*const ()>,
1355}
1356unsafe impl Send for USB {}
1357impl USB {
1358    #[doc = r"Pointer to the register block"]
1359    pub const PTR: *const usb::RegisterBlock = 0x2007_2000 as *const _;
1360    #[doc = r"Return the pointer to the register block"]
1361    #[inline(always)]
1362    pub const fn ptr() -> *const usb::RegisterBlock {
1363        Self::PTR
1364    }
1365    #[doc = r" Steal an instance of this peripheral"]
1366    #[doc = r""]
1367    #[doc = r" # Safety"]
1368    #[doc = r""]
1369    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1370    #[doc = r" that may race with any existing instances, for example by only"]
1371    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1372    #[doc = r" original peripheral and using critical sections to coordinate"]
1373    #[doc = r" access between multiple new instances."]
1374    #[doc = r""]
1375    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1376    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1377    #[doc = r" no stolen instances are passed to such software."]
1378    pub unsafe fn steal() -> Self {
1379        Self {
1380            _marker: PhantomData,
1381        }
1382    }
1383}
1384impl Deref for USB {
1385    type Target = usb::RegisterBlock;
1386    #[inline(always)]
1387    fn deref(&self) -> &Self::Target {
1388        unsafe { &*Self::PTR }
1389    }
1390}
1391impl core::fmt::Debug for USB {
1392    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1393        f.debug_struct("USB").finish()
1394    }
1395}
1396#[doc = "Universal Serial Bus host"]
1397pub mod usb;
1398#[doc = "Always-ON periherals"]
1399pub struct AON {
1400    _marker: PhantomData<*const ()>,
1401}
1402unsafe impl Send for AON {}
1403impl AON {
1404    #[doc = r"Pointer to the register block"]
1405    pub const PTR: *const aon::RegisterBlock = 0x2000_f000 as *const _;
1406    #[doc = r"Return the pointer to the register block"]
1407    #[inline(always)]
1408    pub const fn ptr() -> *const aon::RegisterBlock {
1409        Self::PTR
1410    }
1411    #[doc = r" Steal an instance of this peripheral"]
1412    #[doc = r""]
1413    #[doc = r" # Safety"]
1414    #[doc = r""]
1415    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1416    #[doc = r" that may race with any existing instances, for example by only"]
1417    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1418    #[doc = r" original peripheral and using critical sections to coordinate"]
1419    #[doc = r" access between multiple new instances."]
1420    #[doc = r""]
1421    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1422    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1423    #[doc = r" no stolen instances are passed to such software."]
1424    pub unsafe fn steal() -> Self {
1425        Self {
1426            _marker: PhantomData,
1427        }
1428    }
1429}
1430impl Deref for AON {
1431    type Target = aon::RegisterBlock;
1432    #[inline(always)]
1433    fn deref(&self) -> &Self::Target {
1434        unsafe { &*Self::PTR }
1435    }
1436}
1437impl core::fmt::Debug for AON {
1438    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1439        f.debug_struct("AON").finish()
1440    }
1441}
1442#[doc = "Always-ON periherals"]
1443pub mod aon;
1444#[doc = "Power-Down Sleep control"]
1445pub struct PDS {
1446    _marker: PhantomData<*const ()>,
1447}
1448unsafe impl Send for PDS {}
1449impl PDS {
1450    #[doc = r"Pointer to the register block"]
1451    pub const PTR: *const pds::RegisterBlock = 0x2000_e000 as *const _;
1452    #[doc = r"Return the pointer to the register block"]
1453    #[inline(always)]
1454    pub const fn ptr() -> *const pds::RegisterBlock {
1455        Self::PTR
1456    }
1457    #[doc = r" Steal an instance of this peripheral"]
1458    #[doc = r""]
1459    #[doc = r" # Safety"]
1460    #[doc = r""]
1461    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1462    #[doc = r" that may race with any existing instances, for example by only"]
1463    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1464    #[doc = r" original peripheral and using critical sections to coordinate"]
1465    #[doc = r" access between multiple new instances."]
1466    #[doc = r""]
1467    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1468    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1469    #[doc = r" no stolen instances are passed to such software."]
1470    pub unsafe fn steal() -> Self {
1471        Self {
1472            _marker: PhantomData,
1473        }
1474    }
1475}
1476impl Deref for PDS {
1477    type Target = pds::RegisterBlock;
1478    #[inline(always)]
1479    fn deref(&self) -> &Self::Target {
1480        unsafe { &*Self::PTR }
1481    }
1482}
1483impl core::fmt::Debug for PDS {
1484    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1485        f.debug_struct("PDS").finish()
1486    }
1487}
1488#[doc = "Power-Down Sleep control"]
1489pub mod pds;
1490#[doc = "CCI"]
1491pub struct CCI {
1492    _marker: PhantomData<*const ()>,
1493}
1494unsafe impl Send for CCI {}
1495impl CCI {
1496    #[doc = r"Pointer to the register block"]
1497    pub const PTR: *const cci::RegisterBlock = 0x2000_8000 as *const _;
1498    #[doc = r"Return the pointer to the register block"]
1499    #[inline(always)]
1500    pub const fn ptr() -> *const cci::RegisterBlock {
1501        Self::PTR
1502    }
1503    #[doc = r" Steal an instance of this peripheral"]
1504    #[doc = r""]
1505    #[doc = r" # Safety"]
1506    #[doc = r""]
1507    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1508    #[doc = r" that may race with any existing instances, for example by only"]
1509    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1510    #[doc = r" original peripheral and using critical sections to coordinate"]
1511    #[doc = r" access between multiple new instances."]
1512    #[doc = r""]
1513    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1514    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1515    #[doc = r" no stolen instances are passed to such software."]
1516    pub unsafe fn steal() -> Self {
1517        Self {
1518            _marker: PhantomData,
1519        }
1520    }
1521}
1522impl Deref for CCI {
1523    type Target = cci::RegisterBlock;
1524    #[inline(always)]
1525    fn deref(&self) -> &Self::Target {
1526        unsafe { &*Self::PTR }
1527    }
1528}
1529impl core::fmt::Debug for CCI {
1530    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1531        f.debug_struct("CCI").finish()
1532    }
1533}
1534#[doc = "CCI"]
1535pub mod cci;
1536#[doc = "MCU Miscellaneous Registers"]
1537pub struct MCU_MISC {
1538    _marker: PhantomData<*const ()>,
1539}
1540unsafe impl Send for MCU_MISC {}
1541impl MCU_MISC {
1542    #[doc = r"Pointer to the register block"]
1543    pub const PTR: *const mcu_misc::RegisterBlock = 0x2000_9000 as *const _;
1544    #[doc = r"Return the pointer to the register block"]
1545    #[inline(always)]
1546    pub const fn ptr() -> *const mcu_misc::RegisterBlock {
1547        Self::PTR
1548    }
1549    #[doc = r" Steal an instance of this peripheral"]
1550    #[doc = r""]
1551    #[doc = r" # Safety"]
1552    #[doc = r""]
1553    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1554    #[doc = r" that may race with any existing instances, for example by only"]
1555    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1556    #[doc = r" original peripheral and using critical sections to coordinate"]
1557    #[doc = r" access between multiple new instances."]
1558    #[doc = r""]
1559    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1560    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1561    #[doc = r" no stolen instances are passed to such software."]
1562    pub unsafe fn steal() -> Self {
1563        Self {
1564            _marker: PhantomData,
1565        }
1566    }
1567}
1568impl Deref for MCU_MISC {
1569    type Target = mcu_misc::RegisterBlock;
1570    #[inline(always)]
1571    fn deref(&self) -> &Self::Target {
1572        unsafe { &*Self::PTR }
1573    }
1574}
1575impl core::fmt::Debug for MCU_MISC {
1576    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1577        f.debug_struct("MCU_MISC").finish()
1578    }
1579}
1580#[doc = "MCU Miscellaneous Registers"]
1581pub mod mcu_misc;
1582#[doc = "TrustZone Controller Secure Configuration"]
1583pub struct TZC_SEC {
1584    _marker: PhantomData<*const ()>,
1585}
1586unsafe impl Send for TZC_SEC {}
1587impl TZC_SEC {
1588    #[doc = r"Pointer to the register block"]
1589    pub const PTR: *const tzc_sec::RegisterBlock = 0x2000_5000 as *const _;
1590    #[doc = r"Return the pointer to the register block"]
1591    #[inline(always)]
1592    pub const fn ptr() -> *const tzc_sec::RegisterBlock {
1593        Self::PTR
1594    }
1595    #[doc = r" Steal an instance of this peripheral"]
1596    #[doc = r""]
1597    #[doc = r" # Safety"]
1598    #[doc = r""]
1599    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1600    #[doc = r" that may race with any existing instances, for example by only"]
1601    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1602    #[doc = r" original peripheral and using critical sections to coordinate"]
1603    #[doc = r" access between multiple new instances."]
1604    #[doc = r""]
1605    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1606    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1607    #[doc = r" no stolen instances are passed to such software."]
1608    pub unsafe fn steal() -> Self {
1609        Self {
1610            _marker: PhantomData,
1611        }
1612    }
1613}
1614impl Deref for TZC_SEC {
1615    type Target = tzc_sec::RegisterBlock;
1616    #[inline(always)]
1617    fn deref(&self) -> &Self::Target {
1618        unsafe { &*Self::PTR }
1619    }
1620}
1621impl core::fmt::Debug for TZC_SEC {
1622    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1623        f.debug_struct("TZC_SEC").finish()
1624    }
1625}
1626#[doc = "TrustZone Controller Secure Configuration"]
1627pub mod tzc_sec;
1628#[no_mangle]
1629static mut DEVICE_PERIPHERALS: bool = false;
1630#[doc = r" All the peripherals."]
1631#[allow(non_snake_case)]
1632pub struct Peripherals {
1633    #[doc = "GLB"]
1634    pub GLB: GLB,
1635    #[doc = "GPIP"]
1636    pub GPIP: GPIP,
1637    #[doc = "AGC"]
1638    pub AGC: AGC,
1639    #[doc = "SEC"]
1640    pub SEC: SEC,
1641    #[doc = "PERMIT"]
1642    pub PERMIT: PERMIT,
1643    #[doc = "UART0"]
1644    pub UART0: UART0,
1645    #[doc = "UART1"]
1646    pub UART1: UART1,
1647    #[doc = "SPI0"]
1648    pub SPI0: SPI0,
1649    #[doc = "I2C0"]
1650    pub I2C0: I2C0,
1651    #[doc = "I2C1"]
1652    pub I2C1: I2C1,
1653    #[doc = "PWM"]
1654    pub PWM: PWM,
1655    #[doc = "TIMER"]
1656    pub TIMER: TIMER,
1657    #[doc = "IR"]
1658    pub IR: IR,
1659    #[doc = "CRC"]
1660    pub CRC: CRC,
1661    #[doc = "DBI"]
1662    pub DBI: DBI,
1663    #[doc = "ISO11898"]
1664    pub ISO11898: ISO11898,
1665    #[doc = "I2S"]
1666    pub I2S: I2S,
1667    #[doc = "AUADC"]
1668    pub AUADC: AUADC,
1669    #[doc = "FLASH"]
1670    pub FLASH: FLASH,
1671    #[doc = "DMA"]
1672    pub DMA: DMA,
1673    #[doc = "SDU"]
1674    pub SDU: SDU,
1675    #[doc = "HBN"]
1676    pub HBN: HBN,
1677    #[doc = "PSRAM"]
1678    pub PSRAM: PSRAM,
1679    #[doc = "AUDAC"]
1680    pub AUDAC: AUDAC,
1681    #[doc = "EFUSE"]
1682    pub EFUSE: EFUSE,
1683    #[doc = "DVP0"]
1684    pub DVP0: DVP0,
1685    #[doc = "MJPEG"]
1686    pub MJPEG: MJPEG,
1687    #[doc = "SDH"]
1688    pub SDH: SDH,
1689    #[doc = "EMAC"]
1690    pub EMAC: EMAC,
1691    #[doc = "USB"]
1692    pub USB: USB,
1693    #[doc = "AON"]
1694    pub AON: AON,
1695    #[doc = "PDS"]
1696    pub PDS: PDS,
1697    #[doc = "CCI"]
1698    pub CCI: CCI,
1699    #[doc = "MCU_MISC"]
1700    pub MCU_MISC: MCU_MISC,
1701    #[doc = "TZC_SEC"]
1702    pub TZC_SEC: TZC_SEC,
1703}
1704impl Peripherals {
1705    #[doc = r" Returns all the peripherals *once*."]
1706    #[cfg(feature = "critical-section")]
1707    #[inline]
1708    pub fn take() -> Option<Self> {
1709        critical_section::with(|_| {
1710            if unsafe { DEVICE_PERIPHERALS } {
1711                return None;
1712            }
1713            Some(unsafe { Peripherals::steal() })
1714        })
1715    }
1716    #[doc = r" Unchecked version of `Peripherals::take`."]
1717    #[doc = r""]
1718    #[doc = r" # Safety"]
1719    #[doc = r""]
1720    #[doc = r" Each of the returned peripherals must be used at most once."]
1721    #[inline]
1722    pub unsafe fn steal() -> Self {
1723        DEVICE_PERIPHERALS = true;
1724        Peripherals {
1725            GLB: GLB {
1726                _marker: PhantomData,
1727            },
1728            GPIP: GPIP {
1729                _marker: PhantomData,
1730            },
1731            AGC: AGC {
1732                _marker: PhantomData,
1733            },
1734            SEC: SEC {
1735                _marker: PhantomData,
1736            },
1737            PERMIT: PERMIT {
1738                _marker: PhantomData,
1739            },
1740            UART0: UART0 {
1741                _marker: PhantomData,
1742            },
1743            UART1: UART1 {
1744                _marker: PhantomData,
1745            },
1746            SPI0: SPI0 {
1747                _marker: PhantomData,
1748            },
1749            I2C0: I2C0 {
1750                _marker: PhantomData,
1751            },
1752            I2C1: I2C1 {
1753                _marker: PhantomData,
1754            },
1755            PWM: PWM {
1756                _marker: PhantomData,
1757            },
1758            TIMER: TIMER {
1759                _marker: PhantomData,
1760            },
1761            IR: IR {
1762                _marker: PhantomData,
1763            },
1764            CRC: CRC {
1765                _marker: PhantomData,
1766            },
1767            DBI: DBI {
1768                _marker: PhantomData,
1769            },
1770            ISO11898: ISO11898 {
1771                _marker: PhantomData,
1772            },
1773            I2S: I2S {
1774                _marker: PhantomData,
1775            },
1776            AUADC: AUADC {
1777                _marker: PhantomData,
1778            },
1779            FLASH: FLASH {
1780                _marker: PhantomData,
1781            },
1782            DMA: DMA {
1783                _marker: PhantomData,
1784            },
1785            SDU: SDU {
1786                _marker: PhantomData,
1787            },
1788            HBN: HBN {
1789                _marker: PhantomData,
1790            },
1791            PSRAM: PSRAM {
1792                _marker: PhantomData,
1793            },
1794            AUDAC: AUDAC {
1795                _marker: PhantomData,
1796            },
1797            EFUSE: EFUSE {
1798                _marker: PhantomData,
1799            },
1800            DVP0: DVP0 {
1801                _marker: PhantomData,
1802            },
1803            MJPEG: MJPEG {
1804                _marker: PhantomData,
1805            },
1806            SDH: SDH {
1807                _marker: PhantomData,
1808            },
1809            EMAC: EMAC {
1810                _marker: PhantomData,
1811            },
1812            USB: USB {
1813                _marker: PhantomData,
1814            },
1815            AON: AON {
1816                _marker: PhantomData,
1817            },
1818            PDS: PDS {
1819                _marker: PhantomData,
1820            },
1821            CCI: CCI {
1822                _marker: PhantomData,
1823            },
1824            MCU_MISC: MCU_MISC {
1825                _marker: PhantomData,
1826            },
1827            TZC_SEC: TZC_SEC {
1828                _marker: PhantomData,
1829            },
1830        }
1831    }
1832}