bl616_pac/
lib.rs

1#![doc = "Peripheral access API for BL616/BL618 microcontrollers (generated using svd2rust v0.28.0 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next] svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.28.0/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
2#![deny(dead_code)]
3#![deny(improper_ctypes)]
4#![deny(missing_docs)]
5#![deny(no_mangle_generic_items)]
6#![deny(non_shorthand_field_patterns)]
7#![deny(overflowing_literals)]
8#![deny(path_statements)]
9#![deny(patterns_in_fns_without_body)]
10#![deny(private_in_public)]
11#![deny(unconditional_recursion)]
12#![deny(unused_allocation)]
13#![deny(unused_comparisons)]
14#![deny(unused_parens)]
15#![deny(while_true)]
16#![allow(non_camel_case_types)]
17#![allow(non_snake_case)]
18#![no_std]
19use core::marker::PhantomData;
20use core::ops::Deref;
21#[allow(unused_imports)]
22use generic::*;
23#[doc = r"Common register and bit access and modify traits"]
24pub mod generic;
25#[cfg(feature = "rt")]
26extern "C" {}
27#[doc(hidden)]
28pub union Vector {
29    pub _handler: unsafe extern "C" fn(),
30    pub _reserved: usize,
31}
32#[cfg(feature = "rt")]
33#[doc(hidden)]
34#[no_mangle]
35pub static __EXTERNAL_INTERRUPTS: [Vector; 0] = [];
36#[doc = "Global configuration register"]
37pub struct GLB {
38    _marker: PhantomData<*const ()>,
39}
40unsafe impl Send for GLB {}
41impl GLB {
42    #[doc = r"Pointer to the register block"]
43    pub const PTR: *const glb::RegisterBlock = 0x2000_0000 as *const _;
44    #[doc = r"Return the pointer to the register block"]
45    #[inline(always)]
46    pub const fn ptr() -> *const glb::RegisterBlock {
47        Self::PTR
48    }
49}
50impl Deref for GLB {
51    type Target = glb::RegisterBlock;
52    #[inline(always)]
53    fn deref(&self) -> &Self::Target {
54        unsafe { &*Self::PTR }
55    }
56}
57impl core::fmt::Debug for GLB {
58    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
59        f.debug_struct("GLB").finish()
60    }
61}
62#[doc = "Global configuration register"]
63pub mod glb;
64#[doc = "Generic DAC and ADC interface control"]
65pub struct GPIP {
66    _marker: PhantomData<*const ()>,
67}
68unsafe impl Send for GPIP {}
69impl GPIP {
70    #[doc = r"Pointer to the register block"]
71    pub const PTR: *const gpip::RegisterBlock = 0x2000_2000 as *const _;
72    #[doc = r"Return the pointer to the register block"]
73    #[inline(always)]
74    pub const fn ptr() -> *const gpip::RegisterBlock {
75        Self::PTR
76    }
77}
78impl Deref for GPIP {
79    type Target = gpip::RegisterBlock;
80    #[inline(always)]
81    fn deref(&self) -> &Self::Target {
82        unsafe { &*Self::PTR }
83    }
84}
85impl core::fmt::Debug for GPIP {
86    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
87        f.debug_struct("GPIP").finish()
88    }
89}
90#[doc = "Generic DAC and ADC interface control"]
91pub mod gpip;
92#[doc = "Automatic Gain Control"]
93pub struct AGC {
94    _marker: PhantomData<*const ()>,
95}
96unsafe impl Send for AGC {}
97impl AGC {
98    #[doc = r"Pointer to the register block"]
99    pub const PTR: *const agc::RegisterBlock = 0x2000_2c00 as *const _;
100    #[doc = r"Return the pointer to the register block"]
101    #[inline(always)]
102    pub const fn ptr() -> *const agc::RegisterBlock {
103        Self::PTR
104    }
105}
106impl Deref for AGC {
107    type Target = agc::RegisterBlock;
108    #[inline(always)]
109    fn deref(&self) -> &Self::Target {
110        unsafe { &*Self::PTR }
111    }
112}
113impl core::fmt::Debug for AGC {
114    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
115        f.debug_struct("AGC").finish()
116    }
117}
118#[doc = "Automatic Gain Control"]
119pub mod agc;
120#[doc = "Digest, Encryption and Signing accelerator"]
121pub struct SEC {
122    _marker: PhantomData<*const ()>,
123}
124unsafe impl Send for SEC {}
125impl SEC {
126    #[doc = r"Pointer to the register block"]
127    pub const PTR: *const sec::RegisterBlock = 0x2000_4000 as *const _;
128    #[doc = r"Return the pointer to the register block"]
129    #[inline(always)]
130    pub const fn ptr() -> *const sec::RegisterBlock {
131        Self::PTR
132    }
133}
134impl Deref for SEC {
135    type Target = sec::RegisterBlock;
136    #[inline(always)]
137    fn deref(&self) -> &Self::Target {
138        unsafe { &*Self::PTR }
139    }
140}
141impl core::fmt::Debug for SEC {
142    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
143        f.debug_struct("SEC").finish()
144    }
145}
146#[doc = "Digest, Encryption and Signing accelerator"]
147pub mod sec;
148#[doc = "Peripheral and memory access permission"]
149pub struct PERMIT {
150    _marker: PhantomData<*const ()>,
151}
152unsafe impl Send for PERMIT {}
153impl PERMIT {
154    #[doc = r"Pointer to the register block"]
155    pub const PTR: *const permit::RegisterBlock = 0x2000_5000 as *const _;
156    #[doc = r"Return the pointer to the register block"]
157    #[inline(always)]
158    pub const fn ptr() -> *const permit::RegisterBlock {
159        Self::PTR
160    }
161}
162impl Deref for PERMIT {
163    type Target = permit::RegisterBlock;
164    #[inline(always)]
165    fn deref(&self) -> &Self::Target {
166        unsafe { &*Self::PTR }
167    }
168}
169impl core::fmt::Debug for PERMIT {
170    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
171        f.debug_struct("PERMIT").finish()
172    }
173}
174#[doc = "Peripheral and memory access permission"]
175pub mod permit;
176#[doc = "Universal Asynchronous Receiver Transmitter"]
177pub struct UART0 {
178    _marker: PhantomData<*const ()>,
179}
180unsafe impl Send for UART0 {}
181impl UART0 {
182    #[doc = r"Pointer to the register block"]
183    pub const PTR: *const uart::RegisterBlock = 0x2000_a000 as *const _;
184    #[doc = r"Return the pointer to the register block"]
185    #[inline(always)]
186    pub const fn ptr() -> *const uart::RegisterBlock {
187        Self::PTR
188    }
189}
190impl Deref for UART0 {
191    type Target = uart::RegisterBlock;
192    #[inline(always)]
193    fn deref(&self) -> &Self::Target {
194        unsafe { &*Self::PTR }
195    }
196}
197impl core::fmt::Debug for UART0 {
198    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
199        f.debug_struct("UART0").finish()
200    }
201}
202#[doc = "Universal Asynchronous Receiver Transmitter"]
203pub struct UART1 {
204    _marker: PhantomData<*const ()>,
205}
206unsafe impl Send for UART1 {}
207impl UART1 {
208    #[doc = r"Pointer to the register block"]
209    pub const PTR: *const uart::RegisterBlock = 0x2000_a100 as *const _;
210    #[doc = r"Return the pointer to the register block"]
211    #[inline(always)]
212    pub const fn ptr() -> *const uart::RegisterBlock {
213        Self::PTR
214    }
215}
216impl Deref for UART1 {
217    type Target = uart::RegisterBlock;
218    #[inline(always)]
219    fn deref(&self) -> &Self::Target {
220        unsafe { &*Self::PTR }
221    }
222}
223impl core::fmt::Debug for UART1 {
224    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
225        f.debug_struct("UART1").finish()
226    }
227}
228#[doc = "Universal Asynchronous Receiver Transmitter"]
229pub mod uart;
230#[doc = "Serial Peripheral Interface"]
231pub struct SPI0 {
232    _marker: PhantomData<*const ()>,
233}
234unsafe impl Send for SPI0 {}
235impl SPI0 {
236    #[doc = r"Pointer to the register block"]
237    pub const PTR: *const spi::RegisterBlock = 0x2000_a200 as *const _;
238    #[doc = r"Return the pointer to the register block"]
239    #[inline(always)]
240    pub const fn ptr() -> *const spi::RegisterBlock {
241        Self::PTR
242    }
243}
244impl Deref for SPI0 {
245    type Target = spi::RegisterBlock;
246    #[inline(always)]
247    fn deref(&self) -> &Self::Target {
248        unsafe { &*Self::PTR }
249    }
250}
251impl core::fmt::Debug for SPI0 {
252    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
253        f.debug_struct("SPI0").finish()
254    }
255}
256#[doc = "Serial Peripheral Interface"]
257pub mod spi;
258#[doc = "Inter-Integrated Circuit bus"]
259pub struct I2C0 {
260    _marker: PhantomData<*const ()>,
261}
262unsafe impl Send for I2C0 {}
263impl I2C0 {
264    #[doc = r"Pointer to the register block"]
265    pub const PTR: *const i2c::RegisterBlock = 0x2000_a300 as *const _;
266    #[doc = r"Return the pointer to the register block"]
267    #[inline(always)]
268    pub const fn ptr() -> *const i2c::RegisterBlock {
269        Self::PTR
270    }
271}
272impl Deref for I2C0 {
273    type Target = i2c::RegisterBlock;
274    #[inline(always)]
275    fn deref(&self) -> &Self::Target {
276        unsafe { &*Self::PTR }
277    }
278}
279impl core::fmt::Debug for I2C0 {
280    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
281        f.debug_struct("I2C0").finish()
282    }
283}
284#[doc = "Inter-Integrated Circuit bus"]
285pub struct I2C1 {
286    _marker: PhantomData<*const ()>,
287}
288unsafe impl Send for I2C1 {}
289impl I2C1 {
290    #[doc = r"Pointer to the register block"]
291    pub const PTR: *const i2c::RegisterBlock = 0x2000_a900 as *const _;
292    #[doc = r"Return the pointer to the register block"]
293    #[inline(always)]
294    pub const fn ptr() -> *const i2c::RegisterBlock {
295        Self::PTR
296    }
297}
298impl Deref for I2C1 {
299    type Target = i2c::RegisterBlock;
300    #[inline(always)]
301    fn deref(&self) -> &Self::Target {
302        unsafe { &*Self::PTR }
303    }
304}
305impl core::fmt::Debug for I2C1 {
306    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
307        f.debug_struct("I2C1").finish()
308    }
309}
310#[doc = "Inter-Integrated Circuit bus"]
311pub mod i2c;
312#[doc = "Pulse-Width Modulation module"]
313pub struct PWM {
314    _marker: PhantomData<*const ()>,
315}
316unsafe impl Send for PWM {}
317impl PWM {
318    #[doc = r"Pointer to the register block"]
319    pub const PTR: *const pwm::RegisterBlock = 0x2000_a400 as *const _;
320    #[doc = r"Return the pointer to the register block"]
321    #[inline(always)]
322    pub const fn ptr() -> *const pwm::RegisterBlock {
323        Self::PTR
324    }
325}
326impl Deref for PWM {
327    type Target = pwm::RegisterBlock;
328    #[inline(always)]
329    fn deref(&self) -> &Self::Target {
330        unsafe { &*Self::PTR }
331    }
332}
333impl core::fmt::Debug for PWM {
334    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
335        f.debug_struct("PWM").finish()
336    }
337}
338#[doc = "Pulse-Width Modulation module"]
339pub mod pwm;
340#[doc = "Timer control"]
341pub struct TIMER {
342    _marker: PhantomData<*const ()>,
343}
344unsafe impl Send for TIMER {}
345impl TIMER {
346    #[doc = r"Pointer to the register block"]
347    pub const PTR: *const timer::RegisterBlock = 0x2000_a500 as *const _;
348    #[doc = r"Return the pointer to the register block"]
349    #[inline(always)]
350    pub const fn ptr() -> *const timer::RegisterBlock {
351        Self::PTR
352    }
353}
354impl Deref for TIMER {
355    type Target = timer::RegisterBlock;
356    #[inline(always)]
357    fn deref(&self) -> &Self::Target {
358        unsafe { &*Self::PTR }
359    }
360}
361impl core::fmt::Debug for TIMER {
362    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
363        f.debug_struct("TIMER").finish()
364    }
365}
366#[doc = "Timer control"]
367pub mod timer;
368#[doc = "Infrared receiver module"]
369pub struct IR {
370    _marker: PhantomData<*const ()>,
371}
372unsafe impl Send for IR {}
373impl IR {
374    #[doc = r"Pointer to the register block"]
375    pub const PTR: *const ir::RegisterBlock = 0x2000_a600 as *const _;
376    #[doc = r"Return the pointer to the register block"]
377    #[inline(always)]
378    pub const fn ptr() -> *const ir::RegisterBlock {
379        Self::PTR
380    }
381}
382impl Deref for IR {
383    type Target = ir::RegisterBlock;
384    #[inline(always)]
385    fn deref(&self) -> &Self::Target {
386        unsafe { &*Self::PTR }
387    }
388}
389impl core::fmt::Debug for IR {
390    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
391        f.debug_struct("IR").finish()
392    }
393}
394#[doc = "Infrared receiver module"]
395pub mod ir;
396#[doc = "Checksum peripheral"]
397pub struct CRC {
398    _marker: PhantomData<*const ()>,
399}
400unsafe impl Send for CRC {}
401impl CRC {
402    #[doc = r"Pointer to the register block"]
403    pub const PTR: *const crc::RegisterBlock = 0x2000_a700 as *const _;
404    #[doc = r"Return the pointer to the register block"]
405    #[inline(always)]
406    pub const fn ptr() -> *const crc::RegisterBlock {
407        Self::PTR
408    }
409}
410impl Deref for CRC {
411    type Target = crc::RegisterBlock;
412    #[inline(always)]
413    fn deref(&self) -> &Self::Target {
414        unsafe { &*Self::PTR }
415    }
416}
417impl core::fmt::Debug for CRC {
418    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
419        f.debug_struct("CRC").finish()
420    }
421}
422#[doc = "Checksum peripheral"]
423pub mod crc;
424#[doc = "MIPI Display Bus Interface"]
425pub struct DBI {
426    _marker: PhantomData<*const ()>,
427}
428unsafe impl Send for DBI {}
429impl DBI {
430    #[doc = r"Pointer to the register block"]
431    pub const PTR: *const dbi::RegisterBlock = 0x2000_a800 as *const _;
432    #[doc = r"Return the pointer to the register block"]
433    #[inline(always)]
434    pub const fn ptr() -> *const dbi::RegisterBlock {
435        Self::PTR
436    }
437}
438impl Deref for DBI {
439    type Target = dbi::RegisterBlock;
440    #[inline(always)]
441    fn deref(&self) -> &Self::Target {
442        unsafe { &*Self::PTR }
443    }
444}
445impl core::fmt::Debug for DBI {
446    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
447        f.debug_struct("DBI").finish()
448    }
449}
450#[doc = "MIPI Display Bus Interface"]
451pub mod dbi;
452#[doc = "ISO 11898 communication protocol"]
453pub struct ISO11898 {
454    _marker: PhantomData<*const ()>,
455}
456unsafe impl Send for ISO11898 {}
457impl ISO11898 {
458    #[doc = r"Pointer to the register block"]
459    pub const PTR: *const iso11898::RegisterBlock = 0x2000_aa00 as *const _;
460    #[doc = r"Return the pointer to the register block"]
461    #[inline(always)]
462    pub const fn ptr() -> *const iso11898::RegisterBlock {
463        Self::PTR
464    }
465}
466impl Deref for ISO11898 {
467    type Target = iso11898::RegisterBlock;
468    #[inline(always)]
469    fn deref(&self) -> &Self::Target {
470        unsafe { &*Self::PTR }
471    }
472}
473impl core::fmt::Debug for ISO11898 {
474    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
475        f.debug_struct("ISO11898").finish()
476    }
477}
478#[doc = "ISO 11898 communication protocol"]
479pub mod iso11898;
480#[doc = "Inter-IC Sound controller"]
481pub struct I2S {
482    _marker: PhantomData<*const ()>,
483}
484unsafe impl Send for I2S {}
485impl I2S {
486    #[doc = r"Pointer to the register block"]
487    pub const PTR: *const i2s::RegisterBlock = 0x2000_ab00 as *const _;
488    #[doc = r"Return the pointer to the register block"]
489    #[inline(always)]
490    pub const fn ptr() -> *const i2s::RegisterBlock {
491        Self::PTR
492    }
493}
494impl Deref for I2S {
495    type Target = i2s::RegisterBlock;
496    #[inline(always)]
497    fn deref(&self) -> &Self::Target {
498        unsafe { &*Self::PTR }
499    }
500}
501impl core::fmt::Debug for I2S {
502    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
503        f.debug_struct("I2S").finish()
504    }
505}
506#[doc = "Inter-IC Sound controller"]
507pub mod i2s;
508#[doc = "Analog-to-Digital or Pulse-Density audio input"]
509pub struct AUADC {
510    _marker: PhantomData<*const ()>,
511}
512unsafe impl Send for AUADC {}
513impl AUADC {
514    #[doc = r"Pointer to the register block"]
515    pub const PTR: *const auadc::RegisterBlock = 0x2000_ac00 as *const _;
516    #[doc = r"Return the pointer to the register block"]
517    #[inline(always)]
518    pub const fn ptr() -> *const auadc::RegisterBlock {
519        Self::PTR
520    }
521}
522impl Deref for AUADC {
523    type Target = auadc::RegisterBlock;
524    #[inline(always)]
525    fn deref(&self) -> &Self::Target {
526        unsafe { &*Self::PTR }
527    }
528}
529impl core::fmt::Debug for AUADC {
530    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
531        f.debug_struct("AUADC").finish()
532    }
533}
534#[doc = "Analog-to-Digital or Pulse-Density audio input"]
535pub mod auadc;
536#[doc = "Quad Serial Flash control"]
537pub struct FLASH {
538    _marker: PhantomData<*const ()>,
539}
540unsafe impl Send for FLASH {}
541impl FLASH {
542    #[doc = r"Pointer to the register block"]
543    pub const PTR: *const flash::RegisterBlock = 0x2000_b000 as *const _;
544    #[doc = r"Return the pointer to the register block"]
545    #[inline(always)]
546    pub const fn ptr() -> *const flash::RegisterBlock {
547        Self::PTR
548    }
549}
550impl Deref for FLASH {
551    type Target = flash::RegisterBlock;
552    #[inline(always)]
553    fn deref(&self) -> &Self::Target {
554        unsafe { &*Self::PTR }
555    }
556}
557impl core::fmt::Debug for FLASH {
558    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
559        f.debug_struct("FLASH").finish()
560    }
561}
562#[doc = "Quad Serial Flash control"]
563pub mod flash;
564#[doc = "Direct Memory Access module"]
565pub struct DMA {
566    _marker: PhantomData<*const ()>,
567}
568unsafe impl Send for DMA {}
569impl DMA {
570    #[doc = r"Pointer to the register block"]
571    pub const PTR: *const dma::RegisterBlock = 0x2000_c000 as *const _;
572    #[doc = r"Return the pointer to the register block"]
573    #[inline(always)]
574    pub const fn ptr() -> *const dma::RegisterBlock {
575        Self::PTR
576    }
577}
578impl Deref for DMA {
579    type Target = dma::RegisterBlock;
580    #[inline(always)]
581    fn deref(&self) -> &Self::Target {
582        unsafe { &*Self::PTR }
583    }
584}
585impl core::fmt::Debug for DMA {
586    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
587        f.debug_struct("DMA").finish()
588    }
589}
590#[doc = "Direct Memory Access module"]
591pub mod dma;
592#[doc = "Secure Digital User interface"]
593pub struct SDU {
594    _marker: PhantomData<*const ()>,
595}
596unsafe impl Send for SDU {}
597impl SDU {
598    #[doc = r"Pointer to the register block"]
599    pub const PTR: *const sdu::RegisterBlock = 0x2000_d000 as *const _;
600    #[doc = r"Return the pointer to the register block"]
601    #[inline(always)]
602    pub const fn ptr() -> *const sdu::RegisterBlock {
603        Self::PTR
604    }
605}
606impl Deref for SDU {
607    type Target = sdu::RegisterBlock;
608    #[inline(always)]
609    fn deref(&self) -> &Self::Target {
610        unsafe { &*Self::PTR }
611    }
612}
613impl core::fmt::Debug for SDU {
614    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
615        f.debug_struct("SDU").finish()
616    }
617}
618#[doc = "Secure Digital User interface"]
619pub mod sdu;
620#[doc = "Power-Down Sleep control"]
621pub struct PDS {
622    _marker: PhantomData<*const ()>,
623}
624unsafe impl Send for PDS {}
625impl PDS {
626    #[doc = r"Pointer to the register block"]
627    pub const PTR: *const pds::RegisterBlock = 0x2000_e000 as *const _;
628    #[doc = r"Return the pointer to the register block"]
629    #[inline(always)]
630    pub const fn ptr() -> *const pds::RegisterBlock {
631        Self::PTR
632    }
633}
634impl Deref for PDS {
635    type Target = pds::RegisterBlock;
636    #[inline(always)]
637    fn deref(&self) -> &Self::Target {
638        unsafe { &*Self::PTR }
639    }
640}
641impl core::fmt::Debug for PDS {
642    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
643        f.debug_struct("PDS").finish()
644    }
645}
646#[doc = "Power-Down Sleep control"]
647pub mod pds;
648#[doc = "Hibernate (Deep sleep) control"]
649pub struct HBN {
650    _marker: PhantomData<*const ()>,
651}
652unsafe impl Send for HBN {}
653impl HBN {
654    #[doc = r"Pointer to the register block"]
655    pub const PTR: *const hbn::RegisterBlock = 0x2000_f000 as *const _;
656    #[doc = r"Return the pointer to the register block"]
657    #[inline(always)]
658    pub const fn ptr() -> *const hbn::RegisterBlock {
659        Self::PTR
660    }
661}
662impl Deref for HBN {
663    type Target = hbn::RegisterBlock;
664    #[inline(always)]
665    fn deref(&self) -> &Self::Target {
666        unsafe { &*Self::PTR }
667    }
668}
669impl core::fmt::Debug for HBN {
670    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
671        f.debug_struct("HBN").finish()
672    }
673}
674#[doc = "Hibernate (Deep sleep) control"]
675pub mod hbn;
676#[doc = "Pseudo Static Random Access Memory control"]
677pub struct PSRAM {
678    _marker: PhantomData<*const ()>,
679}
680unsafe impl Send for PSRAM {}
681impl PSRAM {
682    #[doc = r"Pointer to the register block"]
683    pub const PTR: *const psram::RegisterBlock = 0x2005_2000 as *const _;
684    #[doc = r"Return the pointer to the register block"]
685    #[inline(always)]
686    pub const fn ptr() -> *const psram::RegisterBlock {
687        Self::PTR
688    }
689}
690impl Deref for PSRAM {
691    type Target = psram::RegisterBlock;
692    #[inline(always)]
693    fn deref(&self) -> &Self::Target {
694        unsafe { &*Self::PTR }
695    }
696}
697impl core::fmt::Debug for PSRAM {
698    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
699        f.debug_struct("PSRAM").finish()
700    }
701}
702#[doc = "Pseudo Static Random Access Memory control"]
703pub mod psram;
704#[doc = "Pulse-Width or Digital-to-Analog audio output"]
705pub struct AUDAC {
706    _marker: PhantomData<*const ()>,
707}
708unsafe impl Send for AUDAC {}
709impl AUDAC {
710    #[doc = r"Pointer to the register block"]
711    pub const PTR: *const audac::RegisterBlock = 0x2005_5000 as *const _;
712    #[doc = r"Return the pointer to the register block"]
713    #[inline(always)]
714    pub const fn ptr() -> *const audac::RegisterBlock {
715        Self::PTR
716    }
717}
718impl Deref for AUDAC {
719    type Target = audac::RegisterBlock;
720    #[inline(always)]
721    fn deref(&self) -> &Self::Target {
722        unsafe { &*Self::PTR }
723    }
724}
725impl core::fmt::Debug for AUDAC {
726    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
727        f.debug_struct("AUDAC").finish()
728    }
729}
730#[doc = "Pulse-Width or Digital-to-Analog audio output"]
731pub mod audac;
732#[doc = "eFuse memory control"]
733pub struct EFUSE {
734    _marker: PhantomData<*const ()>,
735}
736unsafe impl Send for EFUSE {}
737impl EFUSE {
738    #[doc = r"Pointer to the register block"]
739    pub const PTR: *const efuse::RegisterBlock = 0x2005_6000 as *const _;
740    #[doc = r"Return the pointer to the register block"]
741    #[inline(always)]
742    pub const fn ptr() -> *const efuse::RegisterBlock {
743        Self::PTR
744    }
745}
746impl Deref for EFUSE {
747    type Target = efuse::RegisterBlock;
748    #[inline(always)]
749    fn deref(&self) -> &Self::Target {
750        unsafe { &*Self::PTR }
751    }
752}
753impl core::fmt::Debug for EFUSE {
754    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
755        f.debug_struct("EFUSE").finish()
756    }
757}
758#[doc = "eFuse memory control"]
759pub mod efuse;
760#[doc = "Digital Video Port control"]
761pub struct DVP0 {
762    _marker: PhantomData<*const ()>,
763}
764unsafe impl Send for DVP0 {}
765impl DVP0 {
766    #[doc = r"Pointer to the register block"]
767    pub const PTR: *const dvp::RegisterBlock = 0x2005_7000 as *const _;
768    #[doc = r"Return the pointer to the register block"]
769    #[inline(always)]
770    pub const fn ptr() -> *const dvp::RegisterBlock {
771        Self::PTR
772    }
773}
774impl Deref for DVP0 {
775    type Target = dvp::RegisterBlock;
776    #[inline(always)]
777    fn deref(&self) -> &Self::Target {
778        unsafe { &*Self::PTR }
779    }
780}
781impl core::fmt::Debug for DVP0 {
782    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
783        f.debug_struct("DVP0").finish()
784    }
785}
786#[doc = "Digital Video Port control"]
787pub mod dvp;
788#[doc = "Motion JPEG encoder"]
789pub struct MJPEG {
790    _marker: PhantomData<*const ()>,
791}
792unsafe impl Send for MJPEG {}
793impl MJPEG {
794    #[doc = r"Pointer to the register block"]
795    pub const PTR: *const mjpeg::RegisterBlock = 0x2005_9000 as *const _;
796    #[doc = r"Return the pointer to the register block"]
797    #[inline(always)]
798    pub const fn ptr() -> *const mjpeg::RegisterBlock {
799        Self::PTR
800    }
801}
802impl Deref for MJPEG {
803    type Target = mjpeg::RegisterBlock;
804    #[inline(always)]
805    fn deref(&self) -> &Self::Target {
806        unsafe { &*Self::PTR }
807    }
808}
809impl core::fmt::Debug for MJPEG {
810    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
811        f.debug_struct("MJPEG").finish()
812    }
813}
814#[doc = "Motion JPEG encoder"]
815pub mod mjpeg;
816#[doc = "Secure Digital host control"]
817pub struct SDH {
818    _marker: PhantomData<*const ()>,
819}
820unsafe impl Send for SDH {}
821impl SDH {
822    #[doc = r"Pointer to the register block"]
823    pub const PTR: *const sdh::RegisterBlock = 0x2006_0000 as *const _;
824    #[doc = r"Return the pointer to the register block"]
825    #[inline(always)]
826    pub const fn ptr() -> *const sdh::RegisterBlock {
827        Self::PTR
828    }
829}
830impl Deref for SDH {
831    type Target = sdh::RegisterBlock;
832    #[inline(always)]
833    fn deref(&self) -> &Self::Target {
834        unsafe { &*Self::PTR }
835    }
836}
837impl core::fmt::Debug for SDH {
838    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
839        f.debug_struct("SDH").finish()
840    }
841}
842#[doc = "Secure Digital host control"]
843pub mod sdh;
844#[doc = "Ethernet Media Access Control"]
845pub struct EMAC {
846    _marker: PhantomData<*const ()>,
847}
848unsafe impl Send for EMAC {}
849impl EMAC {
850    #[doc = r"Pointer to the register block"]
851    pub const PTR: *const emac::RegisterBlock = 0x2007_0000 as *const _;
852    #[doc = r"Return the pointer to the register block"]
853    #[inline(always)]
854    pub const fn ptr() -> *const emac::RegisterBlock {
855        Self::PTR
856    }
857}
858impl Deref for EMAC {
859    type Target = emac::RegisterBlock;
860    #[inline(always)]
861    fn deref(&self) -> &Self::Target {
862        unsafe { &*Self::PTR }
863    }
864}
865impl core::fmt::Debug for EMAC {
866    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
867        f.debug_struct("EMAC").finish()
868    }
869}
870#[doc = "Ethernet Media Access Control"]
871pub mod emac;
872#[doc = "Universal Serial Bus host"]
873pub struct USB {
874    _marker: PhantomData<*const ()>,
875}
876unsafe impl Send for USB {}
877impl USB {
878    #[doc = r"Pointer to the register block"]
879    pub const PTR: *const usb::RegisterBlock = 0x2007_2000 as *const _;
880    #[doc = r"Return the pointer to the register block"]
881    #[inline(always)]
882    pub const fn ptr() -> *const usb::RegisterBlock {
883        Self::PTR
884    }
885}
886impl Deref for USB {
887    type Target = usb::RegisterBlock;
888    #[inline(always)]
889    fn deref(&self) -> &Self::Target {
890        unsafe { &*Self::PTR }
891    }
892}
893impl core::fmt::Debug for USB {
894    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
895        f.debug_struct("USB").finish()
896    }
897}
898#[doc = "Universal Serial Bus host"]
899pub mod usb;
900#[no_mangle]
901static mut DEVICE_PERIPHERALS: bool = false;
902#[doc = r" All the peripherals."]
903#[allow(non_snake_case)]
904pub struct Peripherals {
905    #[doc = "GLB"]
906    pub GLB: GLB,
907    #[doc = "GPIP"]
908    pub GPIP: GPIP,
909    #[doc = "AGC"]
910    pub AGC: AGC,
911    #[doc = "SEC"]
912    pub SEC: SEC,
913    #[doc = "PERMIT"]
914    pub PERMIT: PERMIT,
915    #[doc = "UART0"]
916    pub UART0: UART0,
917    #[doc = "UART1"]
918    pub UART1: UART1,
919    #[doc = "SPI0"]
920    pub SPI0: SPI0,
921    #[doc = "I2C0"]
922    pub I2C0: I2C0,
923    #[doc = "I2C1"]
924    pub I2C1: I2C1,
925    #[doc = "PWM"]
926    pub PWM: PWM,
927    #[doc = "TIMER"]
928    pub TIMER: TIMER,
929    #[doc = "IR"]
930    pub IR: IR,
931    #[doc = "CRC"]
932    pub CRC: CRC,
933    #[doc = "DBI"]
934    pub DBI: DBI,
935    #[doc = "ISO11898"]
936    pub ISO11898: ISO11898,
937    #[doc = "I2S"]
938    pub I2S: I2S,
939    #[doc = "AUADC"]
940    pub AUADC: AUADC,
941    #[doc = "FLASH"]
942    pub FLASH: FLASH,
943    #[doc = "DMA"]
944    pub DMA: DMA,
945    #[doc = "SDU"]
946    pub SDU: SDU,
947    #[doc = "PDS"]
948    pub PDS: PDS,
949    #[doc = "HBN"]
950    pub HBN: HBN,
951    #[doc = "PSRAM"]
952    pub PSRAM: PSRAM,
953    #[doc = "AUDAC"]
954    pub AUDAC: AUDAC,
955    #[doc = "EFUSE"]
956    pub EFUSE: EFUSE,
957    #[doc = "DVP0"]
958    pub DVP0: DVP0,
959    #[doc = "MJPEG"]
960    pub MJPEG: MJPEG,
961    #[doc = "SDH"]
962    pub SDH: SDH,
963    #[doc = "EMAC"]
964    pub EMAC: EMAC,
965    #[doc = "USB"]
966    pub USB: USB,
967}
968impl Peripherals {
969    #[doc = r" Returns all the peripherals *once*."]
970    #[cfg(feature = "critical-section")]
971    #[inline]
972    pub fn take() -> Option<Self> {
973        critical_section::with(|_| {
974            if unsafe { DEVICE_PERIPHERALS } {
975                return None;
976            }
977            Some(unsafe { Peripherals::steal() })
978        })
979    }
980    #[doc = r" Unchecked version of `Peripherals::take`."]
981    #[doc = r""]
982    #[doc = r" # Safety"]
983    #[doc = r""]
984    #[doc = r" Each of the returned peripherals must be used at most once."]
985    #[inline]
986    pub unsafe fn steal() -> Self {
987        DEVICE_PERIPHERALS = true;
988        Peripherals {
989            GLB: GLB {
990                _marker: PhantomData,
991            },
992            GPIP: GPIP {
993                _marker: PhantomData,
994            },
995            AGC: AGC {
996                _marker: PhantomData,
997            },
998            SEC: SEC {
999                _marker: PhantomData,
1000            },
1001            PERMIT: PERMIT {
1002                _marker: PhantomData,
1003            },
1004            UART0: UART0 {
1005                _marker: PhantomData,
1006            },
1007            UART1: UART1 {
1008                _marker: PhantomData,
1009            },
1010            SPI0: SPI0 {
1011                _marker: PhantomData,
1012            },
1013            I2C0: I2C0 {
1014                _marker: PhantomData,
1015            },
1016            I2C1: I2C1 {
1017                _marker: PhantomData,
1018            },
1019            PWM: PWM {
1020                _marker: PhantomData,
1021            },
1022            TIMER: TIMER {
1023                _marker: PhantomData,
1024            },
1025            IR: IR {
1026                _marker: PhantomData,
1027            },
1028            CRC: CRC {
1029                _marker: PhantomData,
1030            },
1031            DBI: DBI {
1032                _marker: PhantomData,
1033            },
1034            ISO11898: ISO11898 {
1035                _marker: PhantomData,
1036            },
1037            I2S: I2S {
1038                _marker: PhantomData,
1039            },
1040            AUADC: AUADC {
1041                _marker: PhantomData,
1042            },
1043            FLASH: FLASH {
1044                _marker: PhantomData,
1045            },
1046            DMA: DMA {
1047                _marker: PhantomData,
1048            },
1049            SDU: SDU {
1050                _marker: PhantomData,
1051            },
1052            PDS: PDS {
1053                _marker: PhantomData,
1054            },
1055            HBN: HBN {
1056                _marker: PhantomData,
1057            },
1058            PSRAM: PSRAM {
1059                _marker: PhantomData,
1060            },
1061            AUDAC: AUDAC {
1062                _marker: PhantomData,
1063            },
1064            EFUSE: EFUSE {
1065                _marker: PhantomData,
1066            },
1067            DVP0: DVP0 {
1068                _marker: PhantomData,
1069            },
1070            MJPEG: MJPEG {
1071                _marker: PhantomData,
1072            },
1073            SDH: SDH {
1074                _marker: PhantomData,
1075            },
1076            EMAC: EMAC {
1077                _marker: PhantomData,
1078            },
1079            USB: USB {
1080                _marker: PhantomData,
1081            },
1082        }
1083    }
1084}