#![doc = "Peripheral access API for GD32C11X microcontrollers (generated using svd2rust v0.32.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.32.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"]
use core::marker::PhantomData;
use core::ops::Deref;
#[doc = r"Number available in the NVIC for configuring priority"]
pub const NVIC_PRIO_BITS: u8 = 4;
#[cfg(feature = "rt")]
pub use self::Interrupt as interrupt;
#[cfg(feature = "rt")]
pub use cortex_m_rt::interrupt;
#[cfg(feature = "rt")]
extern "C" {
fn WWDGT();
fn Tamper();
fn RTC();
fn FMC();
fn RCU_CTC();
fn EXTI_Line0();
fn EXTI_Line1();
fn EXTI_Line2();
fn EXTI_Line3();
fn EXTI_Line4();
fn DMA0_Channel0();
fn DMA0_Channel1();
fn DMA0_Channel2();
fn DMA0_Channel3();
fn DMA0_Channel4();
fn DMA0_Channel5();
fn DMA0_Channel6();
fn ADC0_1();
fn CAN0_TX();
fn CAN0_RX0();
fn CAN0_RX1();
fn CAN0_EWMC();
fn EXTI_line9_5();
fn TIMER0_BRK_TIMER8();
fn TIMER0_UP_TIMER9();
fn TIMER0_TRG_CMT_TIMER10();
fn TIMER0_Channel();
fn TIMER1();
fn TIMER2();
fn TIMER3();
fn I2C0_EV();
fn I2C0_ER();
fn I2C1_EV();
fn I2C1_ER();
fn SPI0();
fn SPI1();
fn USART0();
fn USART1();
fn USART2();
fn EXTI_line15_10();
fn RTC_Alarm();
fn USBFS_WKUP();
fn TIMER7_BRK_TIMER11();
fn TIMER7_UP_TIMER12();
fn TIMER7_TRG_CMT_TIMER13();
fn TIMER7_Channel();
fn EXMC();
fn TIMER4();
fn SPI2();
fn UART3();
fn UART4();
fn TIMER5();
fn TIMER6();
fn DMA1_Channel0();
fn DMA1_Channel1();
fn DMA1_Channel2();
fn DMA1_Channel3_4();
fn CAN1_TX();
fn CAN1_RX0();
fn CAN1_RX1();
fn CAN1_EWMC();
fn USBFS();
}
#[doc(hidden)]
#[repr(C)]
pub union Vector {
_handler: unsafe extern "C" fn(),
_reserved: u32,
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[link_section = ".vector_table.interrupts"]
#[no_mangle]
pub static __INTERRUPTS: [Vector; 68] = [
Vector { _handler: WWDGT },
Vector { _reserved: 0 },
Vector { _handler: Tamper },
Vector { _handler: RTC },
Vector { _handler: FMC },
Vector { _handler: RCU_CTC },
Vector {
_handler: EXTI_Line0,
},
Vector {
_handler: EXTI_Line1,
},
Vector {
_handler: EXTI_Line2,
},
Vector {
_handler: EXTI_Line3,
},
Vector {
_handler: EXTI_Line4,
},
Vector {
_handler: DMA0_Channel0,
},
Vector {
_handler: DMA0_Channel1,
},
Vector {
_handler: DMA0_Channel2,
},
Vector {
_handler: DMA0_Channel3,
},
Vector {
_handler: DMA0_Channel4,
},
Vector {
_handler: DMA0_Channel5,
},
Vector {
_handler: DMA0_Channel6,
},
Vector { _handler: ADC0_1 },
Vector { _handler: CAN0_TX },
Vector { _handler: CAN0_RX0 },
Vector { _handler: CAN0_RX1 },
Vector {
_handler: CAN0_EWMC,
},
Vector {
_handler: EXTI_line9_5,
},
Vector {
_handler: TIMER0_BRK_TIMER8,
},
Vector {
_handler: TIMER0_UP_TIMER9,
},
Vector {
_handler: TIMER0_TRG_CMT_TIMER10,
},
Vector {
_handler: TIMER0_Channel,
},
Vector { _handler: TIMER1 },
Vector { _handler: TIMER2 },
Vector { _handler: TIMER3 },
Vector { _handler: I2C0_EV },
Vector { _handler: I2C0_ER },
Vector { _handler: I2C1_EV },
Vector { _handler: I2C1_ER },
Vector { _handler: SPI0 },
Vector { _handler: SPI1 },
Vector { _handler: USART0 },
Vector { _handler: USART1 },
Vector { _handler: USART2 },
Vector {
_handler: EXTI_line15_10,
},
Vector {
_handler: RTC_Alarm,
},
Vector {
_handler: USBFS_WKUP,
},
Vector {
_handler: TIMER7_BRK_TIMER11,
},
Vector {
_handler: TIMER7_UP_TIMER12,
},
Vector {
_handler: TIMER7_TRG_CMT_TIMER13,
},
Vector {
_handler: TIMER7_Channel,
},
Vector { _reserved: 0 },
Vector { _handler: EXMC },
Vector { _reserved: 0 },
Vector { _handler: TIMER4 },
Vector { _handler: SPI2 },
Vector { _handler: UART3 },
Vector { _handler: UART4 },
Vector { _handler: TIMER5 },
Vector { _handler: TIMER6 },
Vector {
_handler: DMA1_Channel0,
},
Vector {
_handler: DMA1_Channel1,
},
Vector {
_handler: DMA1_Channel2,
},
Vector {
_handler: DMA1_Channel3_4,
},
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _reserved: 0 },
Vector { _handler: CAN1_TX },
Vector { _handler: CAN1_RX0 },
Vector { _handler: CAN1_RX1 },
Vector {
_handler: CAN1_EWMC,
},
Vector { _handler: USBFS },
];
#[doc = r"Enumeration of all the interrupts."]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[repr(u16)]
pub enum Interrupt {
#[doc = "0 - WWDGT"]
WWDGT = 0,
#[doc = "2 - Tamper"]
Tamper = 2,
#[doc = "3 - RTC"]
RTC = 3,
#[doc = "4 - FMC"]
FMC = 4,
#[doc = "5 - RCU_CTC"]
RCU_CTC = 5,
#[doc = "6 - EXTI_Line0"]
EXTI_Line0 = 6,
#[doc = "7 - EXTI_Line1"]
EXTI_Line1 = 7,
#[doc = "8 - EXTI_Line2"]
EXTI_Line2 = 8,
#[doc = "9 - EXTI_Line3"]
EXTI_Line3 = 9,
#[doc = "10 - EXTI_Line4"]
EXTI_Line4 = 10,
#[doc = "11 - DMA0_Channel0"]
DMA0_Channel0 = 11,
#[doc = "12 - DMA0_Channel1"]
DMA0_Channel1 = 12,
#[doc = "13 - DMA0_Channel2"]
DMA0_Channel2 = 13,
#[doc = "14 - DMA0_Channel3"]
DMA0_Channel3 = 14,
#[doc = "15 - DMA0_Channel4"]
DMA0_Channel4 = 15,
#[doc = "16 - DMA0_Channel5"]
DMA0_Channel5 = 16,
#[doc = "17 - DMA0_Channel6"]
DMA0_Channel6 = 17,
#[doc = "18 - ADC0_1"]
ADC0_1 = 18,
#[doc = "19 - CAN0_TX"]
CAN0_TX = 19,
#[doc = "20 - CAN0_RX0"]
CAN0_RX0 = 20,
#[doc = "21 - CAN0_RX1"]
CAN0_RX1 = 21,
#[doc = "22 - CAN0_EWMC"]
CAN0_EWMC = 22,
#[doc = "23 - EXTI_line9_5"]
EXTI_line9_5 = 23,
#[doc = "24 - TIMER0_BRK_TIMER8"]
TIMER0_BRK_TIMER8 = 24,
#[doc = "25 - TIMER0_UP_TIMER9"]
TIMER0_UP_TIMER9 = 25,
#[doc = "26 - TIMER0_TRG_CMT_TIMER10"]
TIMER0_TRG_CMT_TIMER10 = 26,
#[doc = "27 - TIMER0_Channel"]
TIMER0_Channel = 27,
#[doc = "28 - TIMER1"]
TIMER1 = 28,
#[doc = "29 - TIMER2"]
TIMER2 = 29,
#[doc = "30 - TIMER3"]
TIMER3 = 30,
#[doc = "31 - I2C0_EV"]
I2C0_EV = 31,
#[doc = "32 - I2C0_ER"]
I2C0_ER = 32,
#[doc = "33 - I2C1_EV"]
I2C1_EV = 33,
#[doc = "34 - I2C1_ER"]
I2C1_ER = 34,
#[doc = "35 - SPI0"]
SPI0 = 35,
#[doc = "36 - SPI1"]
SPI1 = 36,
#[doc = "37 - USART0"]
USART0 = 37,
#[doc = "38 - USART1"]
USART1 = 38,
#[doc = "39 - USART2"]
USART2 = 39,
#[doc = "40 - EXTI_line15_10"]
EXTI_line15_10 = 40,
#[doc = "41 - RTC_Alarm"]
RTC_Alarm = 41,
#[doc = "42 - USBFS_WKUP"]
USBFS_WKUP = 42,
#[doc = "43 - TIMER7_BRK_TIMER11"]
TIMER7_BRK_TIMER11 = 43,
#[doc = "44 - TIMER7_UP_TIMER12"]
TIMER7_UP_TIMER12 = 44,
#[doc = "45 - TIMER7_TRG_CMT_TIMER13"]
TIMER7_TRG_CMT_TIMER13 = 45,
#[doc = "46 - TIMER7_Channel"]
TIMER7_Channel = 46,
#[doc = "48 - EXMC"]
EXMC = 48,
#[doc = "50 - TIMER4"]
TIMER4 = 50,
#[doc = "51 - SPI2"]
SPI2 = 51,
#[doc = "52 - UART3"]
UART3 = 52,
#[doc = "53 - UART4"]
UART4 = 53,
#[doc = "54 - TIMER5"]
TIMER5 = 54,
#[doc = "55 - TIMER6"]
TIMER6 = 55,
#[doc = "56 - DMA1_Channel0"]
DMA1_Channel0 = 56,
#[doc = "57 - DMA1_Channel1"]
DMA1_Channel1 = 57,
#[doc = "58 - DMA1_Channel2"]
DMA1_Channel2 = 58,
#[doc = "59 - DMA1_Channel3_4"]
DMA1_Channel3_4 = 59,
#[doc = "63 - CAN1_TX"]
CAN1_TX = 63,
#[doc = "64 - CAN1_RX0"]
CAN1_RX0 = 64,
#[doc = "65 - CAN1_RX1"]
CAN1_RX1 = 65,
#[doc = "66 - CAN1_EWMC"]
CAN1_EWMC = 66,
#[doc = "67 - USBFS"]
USBFS = 67,
}
unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
#[inline(always)]
fn number(self) -> u16 {
self as u16
}
}
#[doc = "Analog to digital converter"]
pub struct Adc0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Adc0 {}
impl Adc0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const adc0::RegisterBlock = 0x4001_2400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const adc0::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 Adc0 {
type Target = adc0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Adc0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Adc0").finish()
}
}
#[doc = "Analog to digital converter"]
pub mod adc0;
#[doc = "Analog to digital converter"]
pub struct Adc1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Adc1 {}
impl Adc1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const adc1::RegisterBlock = 0x4001_2800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const adc1::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 Adc1 {
type Target = adc1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Adc1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Adc1").finish()
}
}
#[doc = "Analog to digital converter"]
pub mod adc1;
#[doc = "Alternate-function I/Os"]
pub struct Afio {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Afio {}
impl Afio {
#[doc = r"Pointer to the register block"]
pub const PTR: *const afio::RegisterBlock = 0x4001_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const afio::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 Afio {
type Target = afio::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Afio {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Afio").finish()
}
}
#[doc = "Alternate-function I/Os"]
pub mod afio;
#[doc = "Backup registers"]
pub struct Bkp {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Bkp {}
impl Bkp {
#[doc = r"Pointer to the register block"]
pub const PTR: *const bkp::RegisterBlock = 0x4000_6c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const bkp::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 Bkp {
type Target = bkp::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Bkp {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Bkp").finish()
}
}
#[doc = "Backup registers"]
pub mod bkp;
#[doc = "Controller area network"]
pub struct Can0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Can0 {}
impl Can0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const can0::RegisterBlock = 0x4000_6400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const can0::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 Can0 {
type Target = can0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Can0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Can0").finish()
}
}
#[doc = "Controller area network"]
pub mod can0;
#[doc = "Controller area network"]
pub struct Can1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Can1 {}
impl Can1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const can0::RegisterBlock = 0x4000_6800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const can0::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 Can1 {
type Target = can0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Can1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Can1").finish()
}
}
#[doc = "Controller area network"]
pub use self::can0 as can1;
#[doc = "cyclic redundancy check calculation unit"]
pub struct Crc {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Crc {}
impl Crc {
#[doc = r"Pointer to the register block"]
pub const PTR: *const crc::RegisterBlock = 0x4002_3000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const crc::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 Crc {
type Target = crc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Crc {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Crc").finish()
}
}
#[doc = "cyclic redundancy check calculation unit"]
pub mod crc;
#[doc = "Clock trim controller"]
pub struct Ctc {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Ctc {}
impl Ctc {
#[doc = r"Pointer to the register block"]
pub const PTR: *const ctc::RegisterBlock = 0x4000_c800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const ctc::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 Ctc {
type Target = ctc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Ctc {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Ctc").finish()
}
}
#[doc = "Clock trim controller"]
pub mod ctc;
#[doc = "Digital-to-analog converter"]
pub struct Dac {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Dac {}
impl Dac {
#[doc = r"Pointer to the register block"]
pub const PTR: *const dac::RegisterBlock = 0x4000_7400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dac::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 Dac {
type Target = dac::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Dac {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Dac").finish()
}
}
#[doc = "Digital-to-analog converter"]
pub mod dac;
#[doc = "Debug support"]
pub struct Dbg {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Dbg {}
impl Dbg {
#[doc = r"Pointer to the register block"]
pub const PTR: *const dbg::RegisterBlock = 0xe004_2000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dbg::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 Dbg {
type Target = dbg::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Dbg {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Dbg").finish()
}
}
#[doc = "Debug support"]
pub mod dbg;
#[doc = "DMA controller"]
pub struct Dma0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Dma0 {}
impl Dma0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const dma0::RegisterBlock = 0x4002_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dma0::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 Dma0 {
type Target = dma0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Dma0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Dma0").finish()
}
}
#[doc = "DMA controller"]
pub mod dma0;
#[doc = "DMA controller"]
pub struct Dma1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Dma1 {}
impl Dma1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const dma0::RegisterBlock = 0x4002_0400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dma0::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 Dma1 {
type Target = dma0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Dma1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Dma1").finish()
}
}
#[doc = "DMA controller"]
pub use self::dma0 as dma1;
#[doc = "External memory controller"]
pub struct Exmc {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Exmc {}
impl Exmc {
#[doc = r"Pointer to the register block"]
pub const PTR: *const exmc::RegisterBlock = 0xa000_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const exmc::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 Exmc {
type Target = exmc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Exmc {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Exmc").finish()
}
}
#[doc = "External memory controller"]
pub mod exmc;
#[doc = "External interrupt/event controller"]
pub struct Exti {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Exti {}
impl Exti {
#[doc = r"Pointer to the register block"]
pub const PTR: *const exti::RegisterBlock = 0x4001_0400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const exti::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 Exti {
type Target = exti::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Exti {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Exti").finish()
}
}
#[doc = "External interrupt/event controller"]
pub mod exti;
#[doc = "FMC"]
pub struct Fmc {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Fmc {}
impl Fmc {
#[doc = r"Pointer to the register block"]
pub const PTR: *const fmc::RegisterBlock = 0x4002_2000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const fmc::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 Fmc {
type Target = fmc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Fmc {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Fmc").finish()
}
}
#[doc = "FMC"]
pub mod fmc;
#[doc = "free watchdog timer"]
pub struct Fwdgt {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Fwdgt {}
impl Fwdgt {
#[doc = r"Pointer to the register block"]
pub const PTR: *const fwdgt::RegisterBlock = 0x4000_3000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const fwdgt::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 Fwdgt {
type Target = fwdgt::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Fwdgt {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Fwdgt").finish()
}
}
#[doc = "free watchdog timer"]
pub mod fwdgt;
#[doc = "General-purpose I/Os"]
pub struct Gpioa {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Gpioa {}
impl Gpioa {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpioa::RegisterBlock = 0x4001_0800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpioa::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 Gpioa {
type Target = gpioa::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Gpioa {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Gpioa").finish()
}
}
#[doc = "General-purpose I/Os"]
pub mod gpioa;
#[doc = "General-purpose I/Os"]
pub struct Gpiob {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Gpiob {}
impl Gpiob {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpioa::RegisterBlock = 0x4001_0c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpioa::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 Gpiob {
type Target = gpioa::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Gpiob {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Gpiob").finish()
}
}
#[doc = "General-purpose I/Os"]
pub use self::gpioa as gpiob;
#[doc = "General-purpose I/Os"]
pub struct Gpioc {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Gpioc {}
impl Gpioc {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpioa::RegisterBlock = 0x4001_1000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpioa::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 Gpioc {
type Target = gpioa::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Gpioc {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Gpioc").finish()
}
}
#[doc = "General-purpose I/Os"]
pub use self::gpioa as gpioc;
#[doc = "General-purpose I/Os"]
pub struct Gpiod {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Gpiod {}
impl Gpiod {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpioa::RegisterBlock = 0x4001_1400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpioa::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 Gpiod {
type Target = gpioa::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Gpiod {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Gpiod").finish()
}
}
#[doc = "General-purpose I/Os"]
pub use self::gpioa as gpiod;
#[doc = "General-purpose I/Os"]
pub struct Gpioe {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Gpioe {}
impl Gpioe {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpioa::RegisterBlock = 0x4001_1800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpioa::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 Gpioe {
type Target = gpioa::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Gpioe {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Gpioe").finish()
}
}
#[doc = "General-purpose I/Os"]
pub use self::gpioa as gpioe;
#[doc = "Inter integrated circuit"]
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 = 0x4000_5400 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 = "Inter integrated circuit"]
pub mod i2c0;
#[doc = "Inter integrated circuit"]
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 = 0x4000_5800 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 = "Inter integrated circuit"]
pub use self::i2c0 as i2c1;
#[doc = "Power management unit"]
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 = 0x4000_7000 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 = "Power management unit"]
pub mod pmu;
#[doc = "Reset and clock unit"]
pub struct Rcu {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Rcu {}
impl Rcu {
#[doc = r"Pointer to the register block"]
pub const PTR: *const rcu::RegisterBlock = 0x4002_1000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const rcu::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 Rcu {
type Target = rcu::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Rcu {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Rcu").finish()
}
}
#[doc = "Reset and clock unit"]
pub mod rcu;
#[doc = "Real-time clock"]
pub struct Rtc {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Rtc {}
impl Rtc {
#[doc = r"Pointer to the register block"]
pub const PTR: *const rtc::RegisterBlock = 0x4000_2800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const rtc::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 Rtc {
type Target = rtc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Rtc {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Rtc").finish()
}
}
#[doc = "Real-time clock"]
pub mod rtc;
#[doc = "Serial peripheral interface"]
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 = 0x4001_3000 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 = "Serial peripheral interface"]
pub mod spi0;
#[doc = "Serial peripheral interface"]
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 = 0x4000_3800 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 = "Serial peripheral interface"]
pub use self::spi0 as spi1;
#[doc = "Serial peripheral interface"]
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 = 0x4000_3c00 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 = "Serial peripheral interface"]
pub use self::spi0 as spi2;
#[doc = "Advanced-timers"]
pub struct Timer0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer0 {}
impl Timer0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer0::RegisterBlock = 0x4001_2c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer0::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 Timer0 {
type Target = timer0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer0").finish()
}
}
#[doc = "Advanced-timers"]
pub mod timer0;
#[doc = "General-purpose-timers"]
pub struct Timer1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer1 {}
impl Timer1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer1::RegisterBlock = 0x4000_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer1::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 Timer1 {
type Target = timer1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer1").finish()
}
}
#[doc = "General-purpose-timers"]
pub mod timer1;
#[doc = "General-purpose-timers"]
pub struct Timer2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer2 {}
impl Timer2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer1::RegisterBlock = 0x4000_0400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer1::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 Timer2 {
type Target = timer1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer2").finish()
}
}
#[doc = "General-purpose-timers"]
pub use self::timer1 as timer2;
#[doc = "General-purpose-timers"]
pub struct Timer3 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer3 {}
impl Timer3 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer1::RegisterBlock = 0x4000_0800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer1::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 Timer3 {
type Target = timer1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer3 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer3").finish()
}
}
#[doc = "General-purpose-timers"]
pub use self::timer1 as timer3;
#[doc = "General-purpose-timers"]
pub struct Timer4 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer4 {}
impl Timer4 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer1::RegisterBlock = 0x4000_0c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer1::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 Timer4 {
type Target = timer1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer4 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer4").finish()
}
}
#[doc = "General-purpose-timers"]
pub use self::timer1 as timer4;
#[doc = "Basic-timers"]
pub struct Timer5 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer5 {}
impl Timer5 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer5::RegisterBlock = 0x4000_1000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer5::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 Timer5 {
type Target = timer5::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer5 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer5").finish()
}
}
#[doc = "Basic-timers"]
pub mod timer5;
#[doc = "Basic-timers"]
pub struct Timer6 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer6 {}
impl Timer6 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer5::RegisterBlock = 0x4000_1400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer5::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 Timer6 {
type Target = timer5::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer6 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer6").finish()
}
}
#[doc = "Basic-timers"]
pub use self::timer5 as timer6;
#[doc = "Advanced-timers"]
pub struct Timer7 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer7 {}
impl Timer7 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer0::RegisterBlock = 0x4001_3400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer0::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 Timer7 {
type Target = timer0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer7 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer7").finish()
}
}
#[doc = "Advanced-timers"]
pub use self::timer0 as timer7;
#[doc = "General-purpose-timers"]
pub struct Timer8 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer8 {}
impl Timer8 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer8::RegisterBlock = 0x4001_4c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer8::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 Timer8 {
type Target = timer8::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer8 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer8").finish()
}
}
#[doc = "General-purpose-timers"]
pub mod timer8;
#[doc = "General-purpose-timers"]
pub struct Timer9 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer9 {}
impl Timer9 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer9::RegisterBlock = 0x4001_5000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer9::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 Timer9 {
type Target = timer9::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer9 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer9").finish()
}
}
#[doc = "General-purpose-timers"]
pub mod timer9;
#[doc = "General-purpose-timers"]
pub struct Timer10 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer10 {}
impl Timer10 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer9::RegisterBlock = 0x4001_5400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer9::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 Timer10 {
type Target = timer9::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer10 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer10").finish()
}
}
#[doc = "General-purpose-timers"]
pub use self::timer9 as timer10;
#[doc = "General-purpose-timers"]
pub struct Timer11 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer11 {}
impl Timer11 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer8::RegisterBlock = 0x4000_1800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer8::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 Timer11 {
type Target = timer8::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer11 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer11").finish()
}
}
#[doc = "General-purpose-timers"]
pub use self::timer8 as timer11;
#[doc = "General-purpose-timers"]
pub struct Timer12 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer12 {}
impl Timer12 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer9::RegisterBlock = 0x4000_1c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer9::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 Timer12 {
type Target = timer9::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer12 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer12").finish()
}
}
#[doc = "General-purpose-timers"]
pub use self::timer9 as timer12;
#[doc = "General-purpose-timers"]
pub struct Timer13 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Timer13 {}
impl Timer13 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const timer9::RegisterBlock = 0x4000_2000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const timer9::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 Timer13 {
type Target = timer9::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Timer13 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Timer13").finish()
}
}
#[doc = "General-purpose-timers"]
pub use self::timer9 as timer13;
#[doc = "Universal synchronous asynchronous receiver transmitter"]
pub struct Usart0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Usart0 {}
impl Usart0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usart0::RegisterBlock = 0x4001_3800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usart0::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 Usart0 {
type Target = usart0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Usart0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Usart0").finish()
}
}
#[doc = "Universal synchronous asynchronous receiver transmitter"]
pub mod usart0;
#[doc = "Universal synchronous asynchronous receiver transmitter"]
pub struct Usart1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Usart1 {}
impl Usart1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usart0::RegisterBlock = 0x4000_4400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usart0::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 Usart1 {
type Target = usart0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Usart1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Usart1").finish()
}
}
#[doc = "Universal synchronous asynchronous receiver transmitter"]
pub use self::usart0 as usart1;
#[doc = "Universal synchronous asynchronous receiver transmitter"]
pub struct Usart2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Usart2 {}
impl Usart2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usart0::RegisterBlock = 0x4000_4800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usart0::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 Usart2 {
type Target = usart0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Usart2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Usart2").finish()
}
}
#[doc = "Universal synchronous asynchronous receiver transmitter"]
pub use self::usart0 as usart2;
#[doc = "Universal asynchronous receiver transmitter"]
pub struct Uart3 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Uart3 {}
impl Uart3 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const uart3::RegisterBlock = 0x4000_4c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const uart3::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 = uart3::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 = "Universal asynchronous receiver transmitter"]
pub mod uart3;
#[doc = "Universal asynchronous receiver transmitter"]
pub struct Uart4 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Uart4 {}
impl Uart4 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const uart3::RegisterBlock = 0x4000_5000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const uart3::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 = uart3::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 = "Universal asynchronous receiver transmitter"]
pub use self::uart3 as uart4;
#[doc = "USB full speed global registers"]
pub struct UsbfsGlobal {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for UsbfsGlobal {}
impl UsbfsGlobal {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usbfs_global::RegisterBlock = 0x5000_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usbfs_global::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 UsbfsGlobal {
type Target = usbfs_global::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for UsbfsGlobal {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("UsbfsGlobal").finish()
}
}
#[doc = "USB full speed global registers"]
pub mod usbfs_global;
#[doc = "USB on the go full speed host"]
pub struct UsbfsHost {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for UsbfsHost {}
impl UsbfsHost {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usbfs_host::RegisterBlock = 0x5000_0400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usbfs_host::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 UsbfsHost {
type Target = usbfs_host::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for UsbfsHost {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("UsbfsHost").finish()
}
}
#[doc = "USB on the go full speed host"]
pub mod usbfs_host;
#[doc = "USB on the go full speed device"]
pub struct UsbfsDevice {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for UsbfsDevice {}
impl UsbfsDevice {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usbfs_device::RegisterBlock = 0x5000_0800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usbfs_device::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 UsbfsDevice {
type Target = usbfs_device::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for UsbfsDevice {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("UsbfsDevice").finish()
}
}
#[doc = "USB on the go full speed device"]
pub mod usbfs_device;
#[doc = "USB on the go full speed"]
pub struct UsbfsPwrclk {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for UsbfsPwrclk {}
impl UsbfsPwrclk {
#[doc = r"Pointer to the register block"]
pub const PTR: *const usbfs_pwrclk::RegisterBlock = 0x5000_0e00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const usbfs_pwrclk::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 UsbfsPwrclk {
type Target = usbfs_pwrclk::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for UsbfsPwrclk {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("UsbfsPwrclk").finish()
}
}
#[doc = "USB on the go full speed"]
pub mod usbfs_pwrclk;
#[doc = "Window watchdog timer"]
pub struct Wwdgt {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for Wwdgt {}
impl Wwdgt {
#[doc = r"Pointer to the register block"]
pub const PTR: *const wwdgt::RegisterBlock = 0x4000_2c00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const wwdgt::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 Wwdgt {
type Target = wwdgt::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for Wwdgt {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Wwdgt").finish()
}
}
#[doc = "Window watchdog timer"]
pub mod wwdgt;
#[no_mangle]
static mut DEVICE_PERIPHERALS: bool = false;
#[doc = r" All the peripherals."]
#[allow(non_snake_case)]
pub struct Peripherals {
#[doc = "ADC0"]
pub adc0: Adc0,
#[doc = "ADC1"]
pub adc1: Adc1,
#[doc = "AFIO"]
pub afio: Afio,
#[doc = "BKP"]
pub bkp: Bkp,
#[doc = "CAN0"]
pub can0: Can0,
#[doc = "CAN1"]
pub can1: Can1,
#[doc = "CRC"]
pub crc: Crc,
#[doc = "CTC"]
pub ctc: Ctc,
#[doc = "DAC"]
pub dac: Dac,
#[doc = "DBG"]
pub dbg: Dbg,
#[doc = "DMA0"]
pub dma0: Dma0,
#[doc = "DMA1"]
pub dma1: Dma1,
#[doc = "EXMC"]
pub exmc: Exmc,
#[doc = "EXTI"]
pub exti: Exti,
#[doc = "FMC"]
pub fmc: Fmc,
#[doc = "FWDGT"]
pub fwdgt: Fwdgt,
#[doc = "GPIOA"]
pub gpioa: Gpioa,
#[doc = "GPIOB"]
pub gpiob: Gpiob,
#[doc = "GPIOC"]
pub gpioc: Gpioc,
#[doc = "GPIOD"]
pub gpiod: Gpiod,
#[doc = "GPIOE"]
pub gpioe: Gpioe,
#[doc = "I2C0"]
pub i2c0: I2c0,
#[doc = "I2C1"]
pub i2c1: I2c1,
#[doc = "PMU"]
pub pmu: Pmu,
#[doc = "RCU"]
pub rcu: Rcu,
#[doc = "RTC"]
pub rtc: Rtc,
#[doc = "SPI0"]
pub spi0: Spi0,
#[doc = "SPI1"]
pub spi1: Spi1,
#[doc = "SPI2"]
pub spi2: Spi2,
#[doc = "TIMER0"]
pub timer0: Timer0,
#[doc = "TIMER1"]
pub timer1: Timer1,
#[doc = "TIMER2"]
pub timer2: Timer2,
#[doc = "TIMER3"]
pub timer3: Timer3,
#[doc = "TIMER4"]
pub timer4: Timer4,
#[doc = "TIMER5"]
pub timer5: Timer5,
#[doc = "TIMER6"]
pub timer6: Timer6,
#[doc = "TIMER7"]
pub timer7: Timer7,
#[doc = "TIMER8"]
pub timer8: Timer8,
#[doc = "TIMER9"]
pub timer9: Timer9,
#[doc = "TIMER10"]
pub timer10: Timer10,
#[doc = "TIMER11"]
pub timer11: Timer11,
#[doc = "TIMER12"]
pub timer12: Timer12,
#[doc = "TIMER13"]
pub timer13: Timer13,
#[doc = "USART0"]
pub usart0: Usart0,
#[doc = "USART1"]
pub usart1: Usart1,
#[doc = "USART2"]
pub usart2: Usart2,
#[doc = "UART3"]
pub uart3: Uart3,
#[doc = "UART4"]
pub uart4: Uart4,
#[doc = "USBFS_GLOBAL"]
pub usbfs_global: UsbfsGlobal,
#[doc = "USBFS_HOST"]
pub usbfs_host: UsbfsHost,
#[doc = "USBFS_DEVICE"]
pub usbfs_device: UsbfsDevice,
#[doc = "USBFS_PWRCLK"]
pub usbfs_pwrclk: UsbfsPwrclk,
#[doc = "WWDGT"]
pub wwdgt: Wwdgt,
}
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 {
adc0: Adc0 {
_marker: PhantomData,
},
adc1: Adc1 {
_marker: PhantomData,
},
afio: Afio {
_marker: PhantomData,
},
bkp: Bkp {
_marker: PhantomData,
},
can0: Can0 {
_marker: PhantomData,
},
can1: Can1 {
_marker: PhantomData,
},
crc: Crc {
_marker: PhantomData,
},
ctc: Ctc {
_marker: PhantomData,
},
dac: Dac {
_marker: PhantomData,
},
dbg: Dbg {
_marker: PhantomData,
},
dma0: Dma0 {
_marker: PhantomData,
},
dma1: Dma1 {
_marker: PhantomData,
},
exmc: Exmc {
_marker: PhantomData,
},
exti: Exti {
_marker: PhantomData,
},
fmc: Fmc {
_marker: PhantomData,
},
fwdgt: Fwdgt {
_marker: PhantomData,
},
gpioa: Gpioa {
_marker: PhantomData,
},
gpiob: Gpiob {
_marker: PhantomData,
},
gpioc: Gpioc {
_marker: PhantomData,
},
gpiod: Gpiod {
_marker: PhantomData,
},
gpioe: Gpioe {
_marker: PhantomData,
},
i2c0: I2c0 {
_marker: PhantomData,
},
i2c1: I2c1 {
_marker: PhantomData,
},
pmu: Pmu {
_marker: PhantomData,
},
rcu: Rcu {
_marker: PhantomData,
},
rtc: Rtc {
_marker: PhantomData,
},
spi0: Spi0 {
_marker: PhantomData,
},
spi1: Spi1 {
_marker: PhantomData,
},
spi2: Spi2 {
_marker: PhantomData,
},
timer0: Timer0 {
_marker: PhantomData,
},
timer1: Timer1 {
_marker: PhantomData,
},
timer2: Timer2 {
_marker: PhantomData,
},
timer3: Timer3 {
_marker: PhantomData,
},
timer4: Timer4 {
_marker: PhantomData,
},
timer5: Timer5 {
_marker: PhantomData,
},
timer6: Timer6 {
_marker: PhantomData,
},
timer7: Timer7 {
_marker: PhantomData,
},
timer8: Timer8 {
_marker: PhantomData,
},
timer9: Timer9 {
_marker: PhantomData,
},
timer10: Timer10 {
_marker: PhantomData,
},
timer11: Timer11 {
_marker: PhantomData,
},
timer12: Timer12 {
_marker: PhantomData,
},
timer13: Timer13 {
_marker: PhantomData,
},
usart0: Usart0 {
_marker: PhantomData,
},
usart1: Usart1 {
_marker: PhantomData,
},
usart2: Usart2 {
_marker: PhantomData,
},
uart3: Uart3 {
_marker: PhantomData,
},
uart4: Uart4 {
_marker: PhantomData,
},
usbfs_global: UsbfsGlobal {
_marker: PhantomData,
},
usbfs_host: UsbfsHost {
_marker: PhantomData,
},
usbfs_device: UsbfsDevice {
_marker: PhantomData,
},
usbfs_pwrclk: UsbfsPwrclk {
_marker: PhantomData,
},
wwdgt: Wwdgt {
_marker: PhantomData,
},
}
}
}