#![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]
svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.35.0/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![no_std]
use core::marker::PhantomData;
use core::ops::Deref;
#[allow(unused_imports)]
use generic::*;
#[doc = r"Common register and bit access and modify traits"]
pub mod generic;
#[cfg(feature = "rt")]
extern "C" {
fn L2PM();
fn L2PM1();
fn L2PM2();
fn L2PM3();
fn ETH_LPI0();
fn ETH_WAKE_IRQ0();
fn MACIRQ0();
fn QSPI0();
fn CRYPTO();
fn SDMA();
fn TRNG();
fn UART0();
fn UART1();
fn UART2();
fn I2C0();
fn I2C1();
fn I2C2();
fn SPI0();
fn SPI1();
fn SPI2();
fn UART3();
fn UART4();
fn UART5();
fn I2C3();
fn I2C4();
fn I2C5();
fn I2C6();
fn SPI3();
fn SPI4();
fn SPI5();
fn SPI6();
fn DMA();
fn MMC0();
fn MMC1();
fn ETH_LPI1();
fn ETH_WAKE_IRQ1();
fn MACIRQ1();
fn AON_IOMUX();
fn SYS_IOMUX();
fn HOST0();
fn PERIPHERAL0();
fn OTG0();
fn PMU();
}
#[doc(hidden)]
#[repr(C)]
pub union Vector {
pub _handler: unsafe extern "C" fn(),
pub _reserved: usize,
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[no_mangle]
pub static __EXTERNAL_INTERRUPTS: [Vector; 112] = [
Vector { _reserved: 0 },
Vector { _handler: L2PM },
Vector { _handler: L2PM1 },
Vector { _handler: L2PM2 },
Vector { _handler: L2PM3 },
Vector { _handler: ETH_LPI0 },
Vector {
_handler: ETH_WAKE_IRQ0,
},
Vector { _handler: MACIRQ0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _handler: QSPI0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _handler: CRYPTO },
Vector { _handler: SDMA },
Vector { _handler: TRNG },
Vector { _reserved: 0 },
Vector { _handler: UART0 },
Vector { _handler: UART1 },
Vector { _handler: UART2 },
Vector { _handler: I2C0 },
Vector { _handler: I2C1 },
Vector { _handler: I2C2 },
Vector { _handler: SPI0 },
Vector { _handler: SPI1 },
Vector { _handler: SPI2 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _handler: UART3 },
Vector { _handler: UART4 },
Vector { _handler: UART5 },
Vector { _handler: I2C3 },
Vector { _handler: I2C4 },
Vector { _handler: I2C5 },
Vector { _handler: I2C6 },
Vector { _handler: SPI3 },
Vector { _handler: SPI4 },
Vector { _handler: SPI5 },
Vector { _handler: SPI6 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _handler: DMA },
Vector { _handler: MMC0 },
Vector { _handler: MMC1 },
Vector { _handler: ETH_LPI1 },
Vector {
_handler: ETH_WAKE_IRQ1,
},
Vector { _handler: MACIRQ1 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector {
_handler: AON_IOMUX,
},
Vector {
_handler: SYS_IOMUX,
},
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _handler: HOST0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector {
_handler: PERIPHERAL0,
},
Vector { _reserved: 0 },
Vector { _handler: OTG0 },
Vector { _handler: PMU },
];
#[doc(hidden)]
pub mod interrupt;
pub use self::interrupt::Interrupt;
#[doc = "RISC-V CLINT: clint"]
pub struct Clint {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Clint {}
impl Clint {
#[doc = r"Pointer to the register block"]
pub const PTR: *const clint::RegisterBlock = 0x0200_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const clint::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Clint {
type Target = clint::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Clint {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Clint").finish()
}
}
#[doc = "RISC-V CLINT: clint"]
pub mod clint;
#[doc = "SiFive U74(MC) L2 Performance Monitor: l2pm"]
pub struct L2pm {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for L2pm {}
impl L2pm {
#[doc = r"Pointer to the register block"]
pub const PTR: *const l2pm::RegisterBlock = 0x0201_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const l2pm::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for L2pm {
type Target = l2pm::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for L2pm {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("L2pm").finish()
}
}
#[doc = "SiFive U74(MC) L2 Performance Monitor: l2pm"]
pub mod l2pm;
#[doc = "SiFive U74(MC) SRAM (L2 LIM): sram"]
pub struct Sram {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Sram {}
impl Sram {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sram::RegisterBlock = 0x0800_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sram::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Sram {
type Target = sram::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Sram {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Sram").finish()
}
}
#[doc = "SiFive U74(MC) SRAM (L2 LIM): sram"]
pub mod sram;
#[doc = "RISC-V PLIC: plic"]
pub struct Plic {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Plic {}
impl Plic {
#[doc = r"Pointer to the register block"]
pub const PTR: *const plic::RegisterBlock = 0x0c00_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const plic::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Plic {
type Target = plic::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Plic {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Plic").finish()
}
}
#[doc = "RISC-V PLIC: plic"]
pub mod plic;
#[doc = "Synopsys DesignWare APB UART: uart0"]
pub struct Uart0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Uart0 {}
impl Uart0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const uart0::RegisterBlock = 0x1000_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const uart0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Uart0 {
type Target = uart0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Uart0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Uart0").finish()
}
}
#[doc = "Synopsys DesignWare APB UART: uart0"]
pub mod uart0;
#[doc = "Synopsys DesignWare APB UART: uart1"]
pub struct Uart1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Uart1 {}
impl Uart1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const uart0::RegisterBlock = 0x1001_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const uart0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Uart1 {
type Target = uart0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Uart1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Uart1").finish()
}
}
#[doc = "Synopsys DesignWare APB UART: uart1"]
pub use self::uart0 as uart1;
#[doc = "Synopsys DesignWare APB UART: uart2"]
pub struct Uart2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Uart2 {}
impl Uart2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const uart0::RegisterBlock = 0x1002_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const uart0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Uart2 {
type Target = uart0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Uart2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Uart2").finish()
}
}
#[doc = "Synopsys DesignWare APB UART: uart2"]
pub use self::uart0 as uart2;
#[doc = "Synopsys DesignWare APB I2C: i2c0"]
pub struct I2c0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for I2c0 {}
impl I2c0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const i2c0::RegisterBlock = 0x1003_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const i2c0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for I2c0 {
type Target = i2c0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for I2c0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("I2c0").finish()
}
}
#[doc = "Synopsys DesignWare APB I2C: i2c0"]
pub mod i2c0;
#[doc = "Synopsys DesignWare APB I2C: i2c1"]
pub struct I2c1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for I2c1 {}
impl I2c1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const i2c0::RegisterBlock = 0x1004_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const i2c0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for I2c1 {
type Target = i2c0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for I2c1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("I2c1").finish()
}
}
#[doc = "Synopsys DesignWare APB I2C: i2c1"]
pub use self::i2c0 as i2c1;
#[doc = "Synopsys DesignWare APB I2C: i2c2"]
pub struct I2c2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for I2c2 {}
impl I2c2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const i2c0::RegisterBlock = 0x1005_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const i2c0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for I2c2 {
type Target = i2c0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for I2c2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("I2c2").finish()
}
}
#[doc = "Synopsys DesignWare APB I2C: i2c2"]
pub use self::i2c0 as i2c2;
#[doc = "ARM pl022 SSP SPI: spi0"]
pub struct Spi0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Spi0 {}
impl Spi0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const spi0::RegisterBlock = 0x1006_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const spi0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Spi0 {
type Target = spi0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Spi0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Spi0").finish()
}
}
#[doc = "ARM pl022 SSP SPI: spi0"]
pub mod spi0;
#[doc = "ARM pl022 SSP SPI: spi1"]
pub struct Spi1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Spi1 {}
impl Spi1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const spi0::RegisterBlock = 0x1007_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const spi0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Spi1 {
type Target = spi0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Spi1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Spi1").finish()
}
}
#[doc = "ARM pl022 SSP SPI: spi1"]
pub use self::spi0 as spi1;
#[doc = "ARM pl022 SSP SPI: spi2"]
pub struct Spi2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Spi2 {}
impl Spi2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const spi0::RegisterBlock = 0x1008_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const spi0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Spi2 {
type Target = spi0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Spi2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Spi2").finish()
}
}
#[doc = "ARM pl022 SSP SPI: spi2"]
pub use self::spi0 as spi2;
#[doc = "StarFive JH7110 TDM: tdm"]
pub struct Tdm {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Tdm {}
impl Tdm {
#[doc = r"Pointer to the register block"]
pub const PTR: *const tdm::RegisterBlock = 0x1009_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const tdm::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Tdm {
type Target = tdm::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Tdm {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Tdm").finish()
}
}
#[doc = "StarFive JH7110 TDM: tdm"]
pub mod tdm;
#[doc = "OpenEdges Orbit Memory Controller: dmc_ctrl"]
pub struct DmcCtrl {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for DmcCtrl {}
impl DmcCtrl {
#[doc = r"Pointer to the register block"]
pub const PTR: *const dmc_ctrl::RegisterBlock = 0x1570_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dmc_ctrl::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for DmcCtrl {
type Target = dmc_ctrl::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for DmcCtrl {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DmcCtrl").finish()
}
}
#[doc = "OpenEdges Orbit Memory Controller: dmc_ctrl"]
pub mod dmc_ctrl;
#[doc = "OpenEdges Orbit Memory Controller: dmc_phy"]
pub struct DmcPhy {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for DmcPhy {}
impl DmcPhy {
#[doc = r"Pointer to the register block"]
pub const PTR: *const dmc_phy::RegisterBlock = 0x1300_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dmc_phy::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for DmcPhy {
type Target = dmc_phy::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for DmcPhy {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DmcPhy").finish()
}
}
#[doc = "OpenEdges Orbit Memory Controller: dmc_phy"]
pub mod dmc_phy;
#[doc = "Cadence USB3: usb0"]
pub struct Usb0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Usb0 {}
impl Usb0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usb0::RegisterBlock = 0x1010_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usb0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Usb0 {
type Target = usb0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Usb0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Usb0").finish()
}
}
#[doc = "Cadence USB3: usb0"]
pub mod usb0;
#[doc = "StarFive JH7110 STG CRG: stgcrg"]
pub struct Stgcrg {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Stgcrg {}
impl Stgcrg {
#[doc = r"Pointer to the register block"]
pub const PTR: *const stgcrg::RegisterBlock = 0x1023_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const stgcrg::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Stgcrg {
type Target = stgcrg::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Stgcrg {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Stgcrg").finish()
}
}
#[doc = "StarFive JH7110 STG CRG: stgcrg"]
pub mod stgcrg;
#[doc = "StarFive JH7110 STG Syscon: stg_syscon"]
pub struct StgSyscon {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for StgSyscon {}
impl StgSyscon {
#[doc = r"Pointer to the register block"]
pub const PTR: *const stg_syscon::RegisterBlock = 0x1024_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const stg_syscon::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for StgSyscon {
type Target = stg_syscon::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for StgSyscon {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("StgSyscon").finish()
}
}
#[doc = "StarFive JH7110 STG Syscon: stg_syscon"]
pub mod stg_syscon;
#[doc = "Synopsys DesignWare APB UART: uart3"]
pub struct Uart3 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Uart3 {}
impl Uart3 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const uart0::RegisterBlock = 0x1200_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const uart0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Uart3 {
type Target = uart0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Uart3 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Uart3").finish()
}
}
#[doc = "Synopsys DesignWare APB UART: uart3"]
pub use self::uart0 as uart3;
#[doc = "Synopsys DesignWare APB UART: uart4"]
pub struct Uart4 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Uart4 {}
impl Uart4 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const uart0::RegisterBlock = 0x1201_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const uart0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Uart4 {
type Target = uart0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Uart4 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Uart4").finish()
}
}
#[doc = "Synopsys DesignWare APB UART: uart4"]
pub use self::uart0 as uart4;
#[doc = "Synopsys DesignWare APB UART: uart5"]
pub struct Uart5 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Uart5 {}
impl Uart5 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const uart0::RegisterBlock = 0x1202_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const uart0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Uart5 {
type Target = uart0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Uart5 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Uart5").finish()
}
}
#[doc = "Synopsys DesignWare APB UART: uart5"]
pub use self::uart0 as uart5;
#[doc = "Synopsys DesignWare APB I2C: i2c3"]
pub struct I2c3 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for I2c3 {}
impl I2c3 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const i2c0::RegisterBlock = 0x1203_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const i2c0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for I2c3 {
type Target = i2c0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for I2c3 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("I2c3").finish()
}
}
#[doc = "Synopsys DesignWare APB I2C: i2c3"]
pub use self::i2c0 as i2c3;
#[doc = "Synopsys DesignWare APB I2C: i2c4"]
pub struct I2c4 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for I2c4 {}
impl I2c4 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const i2c0::RegisterBlock = 0x1204_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const i2c0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for I2c4 {
type Target = i2c0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for I2c4 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("I2c4").finish()
}
}
#[doc = "Synopsys DesignWare APB I2C: i2c4"]
pub use self::i2c0 as i2c4;
#[doc = "Synopsys DesignWare APB I2C: i2c5"]
pub struct I2c5 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for I2c5 {}
impl I2c5 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const i2c0::RegisterBlock = 0x1205_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const i2c0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for I2c5 {
type Target = i2c0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for I2c5 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("I2c5").finish()
}
}
#[doc = "Synopsys DesignWare APB I2C: i2c5"]
pub use self::i2c0 as i2c5;
#[doc = "Synopsys DesignWare APB I2C: i2c6"]
pub struct I2c6 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for I2c6 {}
impl I2c6 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const i2c0::RegisterBlock = 0x1206_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const i2c0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for I2c6 {
type Target = i2c0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for I2c6 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("I2c6").finish()
}
}
#[doc = "Synopsys DesignWare APB I2C: i2c6"]
pub use self::i2c0 as i2c6;
#[doc = "ARM pl022 SSP SPI: spi3"]
pub struct Spi3 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Spi3 {}
impl Spi3 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const spi0::RegisterBlock = 0x1207_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const spi0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Spi3 {
type Target = spi0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Spi3 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Spi3").finish()
}
}
#[doc = "ARM pl022 SSP SPI: spi3"]
pub use self::spi0 as spi3;
#[doc = "ARM pl022 SSP SPI: spi4"]
pub struct Spi4 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Spi4 {}
impl Spi4 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const spi0::RegisterBlock = 0x1208_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const spi0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Spi4 {
type Target = spi0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Spi4 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Spi4").finish()
}
}
#[doc = "ARM pl022 SSP SPI: spi4"]
pub use self::spi0 as spi4;
#[doc = "ARM pl022 SSP SPI: spi5"]
pub struct Spi5 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Spi5 {}
impl Spi5 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const spi0::RegisterBlock = 0x1209_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const spi0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Spi5 {
type Target = spi0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Spi5 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Spi5").finish()
}
}
#[doc = "ARM pl022 SSP SPI: spi5"]
pub use self::spi0 as spi5;
#[doc = "ARM pl022 SSP SPI: spi6"]
pub struct Spi6 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Spi6 {}
impl Spi6 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const spi0::RegisterBlock = 0x120a_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const spi0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Spi6 {
type Target = spi0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Spi6 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Spi6").finish()
}
}
#[doc = "ARM pl022 SSP SPI: spi6"]
pub use self::spi0 as spi6;
#[doc = "Cadence QSPI NOR: qspi"]
pub struct Qspi {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Qspi {}
impl Qspi {
#[doc = r"Pointer to the register block"]
pub const PTR: *const qspi::RegisterBlock = 0x1301_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const qspi::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Qspi {
type Target = qspi::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Qspi {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Qspi").finish()
}
}
#[doc = "Cadence QSPI NOR: qspi"]
pub mod qspi;
#[doc = "Cadence XSPI NOR (XIP Flash region): xspi"]
pub struct Xspi {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Xspi {}
impl Xspi {
#[doc = r"Pointer to the register block"]
pub const PTR: *const xspi::RegisterBlock = 0x2100_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const xspi::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Xspi {
type Target = xspi::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Xspi {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Xspi").finish()
}
}
#[doc = "Cadence XSPI NOR (XIP Flash region): xspi"]
pub mod xspi;
#[doc = "Opencores PTC PWM v1: pwm"]
pub struct Pwm {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Pwm {}
impl Pwm {
#[doc = r"Pointer to the register block"]
pub const PTR: *const pwm::RegisterBlock = 0x120d_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const pwm::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Pwm {
type Target = pwm::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Pwm {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Pwm").finish()
}
}
#[doc = "Opencores PTC PWM v1: pwm"]
pub mod pwm;
#[doc = "StarFive JH7110 SYS CRG: syscrg"]
pub struct Syscrg {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Syscrg {}
impl Syscrg {
#[doc = r"Pointer to the register block"]
pub const PTR: *const syscrg::RegisterBlock = 0x1302_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const syscrg::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Syscrg {
type Target = syscrg::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Syscrg {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Syscrg").finish()
}
}
#[doc = "StarFive JH7110 SYS CRG: syscrg"]
pub mod syscrg;
#[doc = "StarFive JH7110 SYS Syscon: sys_syscon"]
pub struct SysSyscon {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SysSyscon {}
impl SysSyscon {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sys_syscon::RegisterBlock = 0x1303_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sys_syscon::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for SysSyscon {
type Target = sys_syscon::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SysSyscon {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SysSyscon").finish()
}
}
#[doc = "StarFive JH7110 SYS Syscon: sys_syscon"]
pub mod sys_syscon;
#[doc = "StarFive JH7110 SYS Pinctrl: sys_pinctrl"]
pub struct SysPinctrl {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SysPinctrl {}
impl SysPinctrl {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sys_pinctrl::RegisterBlock = 0x1304_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sys_pinctrl::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for SysPinctrl {
type Target = sys_pinctrl::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SysPinctrl {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SysPinctrl").finish()
}
}
#[doc = "StarFive JH7110 SYS Pinctrl: sys_pinctrl"]
pub mod sys_pinctrl;
#[doc = "StarFive JH7110 WDT: wdt"]
pub struct Wdt {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Wdt {}
impl Wdt {
#[doc = r"Pointer to the register block"]
pub const PTR: *const wdt::RegisterBlock = 0x1307_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const wdt::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Wdt {
type Target = wdt::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Wdt {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Wdt").finish()
}
}
#[doc = "StarFive JH7110 WDT: wdt"]
pub mod wdt;
#[doc = "StarFive JH7110 Crypto: crypto"]
pub struct Crypto {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Crypto {}
impl Crypto {
#[doc = r"Pointer to the register block"]
pub const PTR: *const crypto::RegisterBlock = 0x1600_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const crypto::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Crypto {
type Target = crypto::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Crypto {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Crypto").finish()
}
}
#[doc = "StarFive JH7110 Crypto: crypto"]
pub mod crypto;
#[doc = "ARM PL080 DMA Controller: sdma"]
pub struct Sdma {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Sdma {}
impl Sdma {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sdma::RegisterBlock = 0x1600_8000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sdma::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Sdma {
type Target = sdma::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Sdma {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Sdma").finish()
}
}
#[doc = "ARM PL080 DMA Controller: sdma"]
pub mod sdma;
#[doc = "StarFive JH7110 TRNG: trng"]
pub struct Trng {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Trng {}
impl Trng {
#[doc = r"Pointer to the register block"]
pub const PTR: *const trng::RegisterBlock = 0x1600_c000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const trng::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Trng {
type Target = trng::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Trng {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Trng").finish()
}
}
#[doc = "StarFive JH7110 TRNG: trng"]
pub mod trng;
#[doc = "Synopsys DesignWare MMC (jh7110): mmc0"]
pub struct Mmc0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Mmc0 {}
impl Mmc0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const mmc0::RegisterBlock = 0x1601_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const mmc0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Mmc0 {
type Target = mmc0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Mmc0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Mmc0").finish()
}
}
#[doc = "Synopsys DesignWare MMC (jh7110): mmc0"]
pub mod mmc0;
#[doc = "Synopsys DesignWare MMC (jh7110): mmc1"]
pub struct Mmc1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Mmc1 {}
impl Mmc1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const mmc0::RegisterBlock = 0x1602_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const mmc0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Mmc1 {
type Target = mmc0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Mmc1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Mmc1").finish()
}
}
#[doc = "Synopsys DesignWare MMC (jh7110): mmc1"]
pub use self::mmc0 as mmc1;
#[doc = "Synopsys DesignWare Gigabit Ethernet MAC: gmac0"]
pub struct Gmac0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Gmac0 {}
impl Gmac0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gmac0::RegisterBlock = 0x1603_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gmac0::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Gmac0 {
type Target = gmac0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Gmac0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Gmac0").finish()
}
}
#[doc = "Synopsys DesignWare Gigabit Ethernet MAC: gmac0"]
pub mod gmac0;
#[doc = "Synopsys DesignWare Gigabit Ethernet MAC: gmac1"]
pub struct Gmac1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Gmac1 {}
impl Gmac1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gmac1::RegisterBlock = 0x1604_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gmac1::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Gmac1 {
type Target = gmac1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Gmac1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Gmac1").finish()
}
}
#[doc = "Synopsys DesignWare Gigabit Ethernet MAC: gmac1"]
pub mod gmac1;
#[doc = "Synopsys DesignWare AXI DMAC: dma"]
pub struct Dma {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Dma {}
impl Dma {
#[doc = r"Pointer to the register block"]
pub const PTR: *const dma::RegisterBlock = 0x1605_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dma::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Dma {
type Target = dma::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Dma {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Dma").finish()
}
}
#[doc = "Synopsys DesignWare AXI DMAC: dma"]
pub mod dma;
#[doc = "StarFive JH7110 AON CRG: aoncrg"]
pub struct Aoncrg {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Aoncrg {}
impl Aoncrg {
#[doc = r"Pointer to the register block"]
pub const PTR: *const aoncrg::RegisterBlock = 0x1700_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const aoncrg::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Aoncrg {
type Target = aoncrg::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Aoncrg {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Aoncrg").finish()
}
}
#[doc = "StarFive JH7110 AON CRG: aoncrg"]
pub mod aoncrg;
#[doc = "StarFive JH7110 AON Syscon: aon_syscon"]
pub struct AonSyscon {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for AonSyscon {}
impl AonSyscon {
#[doc = r"Pointer to the register block"]
pub const PTR: *const aon_syscon::RegisterBlock = 0x1701_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const aon_syscon::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for AonSyscon {
type Target = aon_syscon::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for AonSyscon {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AonSyscon").finish()
}
}
#[doc = "StarFive JH7110 AON Syscon: aon_syscon"]
pub mod aon_syscon;
#[doc = "StarFive JH7110 AON Pinctrl: aon_pinctrl"]
pub struct AonPinctrl {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for AonPinctrl {}
impl AonPinctrl {
#[doc = r"Pointer to the register block"]
pub const PTR: *const aon_pinctrl::RegisterBlock = 0x1702_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const aon_pinctrl::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for AonPinctrl {
type Target = aon_pinctrl::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for AonPinctrl {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AonPinctrl").finish()
}
}
#[doc = "StarFive JH7110 AON Pinctrl: aon_pinctrl"]
pub mod aon_pinctrl;
#[doc = "StarFive JH7110 PMU: pmu"]
pub struct Pmu {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Pmu {}
impl Pmu {
#[doc = r"Pointer to the register block"]
pub const PTR: *const pmu::RegisterBlock = 0x1703_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const pmu::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Pmu {
type Target = pmu::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Pmu {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Pmu").finish()
}
}
#[doc = "StarFive JH7110 PMU: pmu"]
pub mod pmu;
#[doc = "StarFive JH7110 ISP CRG: ispcrg"]
pub struct Ispcrg {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Ispcrg {}
impl Ispcrg {
#[doc = r"Pointer to the register block"]
pub const PTR: *const ispcrg::RegisterBlock = 0x1981_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const ispcrg::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Ispcrg {
type Target = ispcrg::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Ispcrg {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Ispcrg").finish()
}
}
#[doc = "StarFive JH7110 ISP CRG: ispcrg"]
pub mod ispcrg;
#[doc = "StarFive JH7110 ISP SYSCON: isp_syscon"]
pub struct IspSyscon {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for IspSyscon {}
impl IspSyscon {
#[doc = r"Pointer to the register block"]
pub const PTR: *const isp_syscon::RegisterBlock = 0x1984_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const isp_syscon::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for IspSyscon {
type Target = isp_syscon::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for IspSyscon {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("IspSyscon").finish()
}
}
#[doc = "StarFive JH7110 ISP SYSCON: isp_syscon"]
pub mod isp_syscon;
#[doc = "StarFive JH7110 VOUT SYSCON: vout_syscon"]
pub struct VoutSyscon {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for VoutSyscon {}
impl VoutSyscon {
#[doc = r"Pointer to the register block"]
pub const PTR: *const vout_syscon::RegisterBlock = 0x295b_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const vout_syscon::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for VoutSyscon {
type Target = vout_syscon::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for VoutSyscon {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("VoutSyscon").finish()
}
}
#[doc = "StarFive JH7110 VOUT SYSCON: vout_syscon"]
pub mod vout_syscon;
#[doc = "StarFive JH7110 VOUT CRG: voutcrg"]
pub struct Voutcrg {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Voutcrg {}
impl Voutcrg {
#[doc = r"Pointer to the register block"]
pub const PTR: *const voutcrg::RegisterBlock = 0x295c_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const voutcrg::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for Voutcrg {
type Target = voutcrg::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Voutcrg {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Voutcrg").finish()
}
}
#[doc = "StarFive JH7110 VOUT CRG: voutcrg"]
pub mod voutcrg;
#[doc = "StarFive JH7110 MIPI TX DPHY: mipitx_dphy"]
pub struct MipitxDphy {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for MipitxDphy {}
impl MipitxDphy {
#[doc = r"Pointer to the register block"]
pub const PTR: *const mipitx_dphy::RegisterBlock = 0x295e_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const mipitx_dphy::RegisterBlock {
Self::PTR
}
#[doc = r" Steal an instance of this peripheral"]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
#[doc = r" that may race with any existing instances, for example by only"]
#[doc = r" accessing read-only or write-only registers, or by consuming the"]
#[doc = r" original peripheral and using critical sections to coordinate"]
#[doc = r" access between multiple new instances."]
#[doc = r""]
#[doc = r" Additionally, other software such as HALs may rely on only one"]
#[doc = r" peripheral instance existing to ensure memory safety; ensure"]
#[doc = r" no stolen instances are passed to such software."]
pub unsafe fn steal() -> Self {
Self {
_marker: PhantomData,
}
}
}
impl Deref for MipitxDphy {
type Target = mipitx_dphy::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for MipitxDphy {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MipitxDphy").finish()
}
}
#[doc = "StarFive JH7110 MIPI TX DPHY: mipitx_dphy"]
pub mod mipitx_dphy;
#[no_mangle]
static mut DEVICE_PERIPHERALS: bool = false;
#[doc = r" All the peripherals."]
#[allow(non_snake_case)]
pub struct Peripherals {
#[doc = "clint"]
pub clint: Clint,
#[doc = "l2pm"]
pub l2pm: L2pm,
#[doc = "sram"]
pub sram: Sram,
#[doc = "plic"]
pub plic: Plic,
#[doc = "uart0"]
pub uart0: Uart0,
#[doc = "uart1"]
pub uart1: Uart1,
#[doc = "uart2"]
pub uart2: Uart2,
#[doc = "i2c0"]
pub i2c0: I2c0,
#[doc = "i2c1"]
pub i2c1: I2c1,
#[doc = "i2c2"]
pub i2c2: I2c2,
#[doc = "spi0"]
pub spi0: Spi0,
#[doc = "spi1"]
pub spi1: Spi1,
#[doc = "spi2"]
pub spi2: Spi2,
#[doc = "tdm"]
pub tdm: Tdm,
#[doc = "dmc_ctrl"]
pub dmc_ctrl: DmcCtrl,
#[doc = "dmc_phy"]
pub dmc_phy: DmcPhy,
#[doc = "usb0"]
pub usb0: Usb0,
#[doc = "stgcrg"]
pub stgcrg: Stgcrg,
#[doc = "stg_syscon"]
pub stg_syscon: StgSyscon,
#[doc = "uart3"]
pub uart3: Uart3,
#[doc = "uart4"]
pub uart4: Uart4,
#[doc = "uart5"]
pub uart5: Uart5,
#[doc = "i2c3"]
pub i2c3: I2c3,
#[doc = "i2c4"]
pub i2c4: I2c4,
#[doc = "i2c5"]
pub i2c5: I2c5,
#[doc = "i2c6"]
pub i2c6: I2c6,
#[doc = "spi3"]
pub spi3: Spi3,
#[doc = "spi4"]
pub spi4: Spi4,
#[doc = "spi5"]
pub spi5: Spi5,
#[doc = "spi6"]
pub spi6: Spi6,
#[doc = "qspi"]
pub qspi: Qspi,
#[doc = "xspi"]
pub xspi: Xspi,
#[doc = "pwm"]
pub pwm: Pwm,
#[doc = "syscrg"]
pub syscrg: Syscrg,
#[doc = "sys_syscon"]
pub sys_syscon: SysSyscon,
#[doc = "sys_pinctrl"]
pub sys_pinctrl: SysPinctrl,
#[doc = "wdt"]
pub wdt: Wdt,
#[doc = "crypto"]
pub crypto: Crypto,
#[doc = "sdma"]
pub sdma: Sdma,
#[doc = "trng"]
pub trng: Trng,
#[doc = "mmc0"]
pub mmc0: Mmc0,
#[doc = "mmc1"]
pub mmc1: Mmc1,
#[doc = "gmac0"]
pub gmac0: Gmac0,
#[doc = "gmac1"]
pub gmac1: Gmac1,
#[doc = "dma"]
pub dma: Dma,
#[doc = "aoncrg"]
pub aoncrg: Aoncrg,
#[doc = "aon_syscon"]
pub aon_syscon: AonSyscon,
#[doc = "aon_pinctrl"]
pub aon_pinctrl: AonPinctrl,
#[doc = "pmu"]
pub pmu: Pmu,
#[doc = "ispcrg"]
pub ispcrg: Ispcrg,
#[doc = "isp_syscon"]
pub isp_syscon: IspSyscon,
#[doc = "vout_syscon"]
pub vout_syscon: VoutSyscon,
#[doc = "voutcrg"]
pub voutcrg: Voutcrg,
#[doc = "mipitx_dphy"]
pub mipitx_dphy: MipitxDphy,
}
impl Peripherals {
#[doc = r" Returns all the peripherals *once*."]
#[cfg(feature = "critical-section")]
#[inline]
pub fn take() -> Option<Self> {
critical_section::with(|_| {
if unsafe { DEVICE_PERIPHERALS } {
return None;
}
Some(unsafe { Peripherals::steal() })
})
}
#[doc = r" Unchecked version of `Peripherals::take`."]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Each of the returned peripherals must be used at most once."]
#[inline]
pub unsafe fn steal() -> Self {
DEVICE_PERIPHERALS = true;
Peripherals {
clint: Clint::steal(),
l2pm: L2pm::steal(),
sram: Sram::steal(),
plic: Plic::steal(),
uart0: Uart0::steal(),
uart1: Uart1::steal(),
uart2: Uart2::steal(),
i2c0: I2c0::steal(),
i2c1: I2c1::steal(),
i2c2: I2c2::steal(),
spi0: Spi0::steal(),
spi1: Spi1::steal(),
spi2: Spi2::steal(),
tdm: Tdm::steal(),
dmc_ctrl: DmcCtrl::steal(),
dmc_phy: DmcPhy::steal(),
usb0: Usb0::steal(),
stgcrg: Stgcrg::steal(),
stg_syscon: StgSyscon::steal(),
uart3: Uart3::steal(),
uart4: Uart4::steal(),
uart5: Uart5::steal(),
i2c3: I2c3::steal(),
i2c4: I2c4::steal(),
i2c5: I2c5::steal(),
i2c6: I2c6::steal(),
spi3: Spi3::steal(),
spi4: Spi4::steal(),
spi5: Spi5::steal(),
spi6: Spi6::steal(),
qspi: Qspi::steal(),
xspi: Xspi::steal(),
pwm: Pwm::steal(),
syscrg: Syscrg::steal(),
sys_syscon: SysSyscon::steal(),
sys_pinctrl: SysPinctrl::steal(),
wdt: Wdt::steal(),
crypto: Crypto::steal(),
sdma: Sdma::steal(),
trng: Trng::steal(),
mmc0: Mmc0::steal(),
mmc1: Mmc1::steal(),
gmac0: Gmac0::steal(),
gmac1: Gmac1::steal(),
dma: Dma::steal(),
aoncrg: Aoncrg::steal(),
aon_syscon: AonSyscon::steal(),
aon_pinctrl: AonPinctrl::steal(),
pmu: Pmu::steal(),
ispcrg: Ispcrg::steal(),
isp_syscon: IspSyscon::steal(),
vout_syscon: VoutSyscon::steal(),
voutcrg: Voutcrg::steal(),
mipitx_dphy: MipitxDphy::steal(),
}
}
}