jh71xx_pac/
lib.rs

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