1166 lines
28 KiB
Rust
1166 lines
28 KiB
Rust
#![doc = "Peripheral access API for MSP432P401R microcontrollers (generated using svd2rust v0.14.0)\n\nYou can find an overview of the API [here].\n\n[here]: https://docs.rs/svd2rust/0.14.0/svd2rust/#peripheral-api"]
|
|
#![deny(missing_docs)]
|
|
#![deny(warnings)]
|
|
#![allow(non_camel_case_types)]
|
|
#![no_std]
|
|
extern crate bare_metal;
|
|
extern crate cortex_m;
|
|
#[cfg(feature = "rt")]
|
|
extern crate cortex_m_rt;
|
|
extern crate vcell;
|
|
use core::marker::PhantomData;
|
|
use core::ops::Deref;
|
|
#[cfg(feature = "rt")]
|
|
extern "C" {
|
|
fn PSS_IRQ();
|
|
fn CS_IRQ();
|
|
fn PCM_IRQ();
|
|
fn WDT_A_IRQ();
|
|
fn FPU_IRQ();
|
|
fn FLCTL_IRQ();
|
|
fn COMP_E0_IRQ();
|
|
fn COMP_E1_IRQ();
|
|
fn TA0_0_IRQ();
|
|
fn TA0_N_IRQ();
|
|
fn TA1_0_IRQ();
|
|
fn TA1_N_IRQ();
|
|
fn TA2_0_IRQ();
|
|
fn TA2_N_IRQ();
|
|
fn TA3_0_IRQ();
|
|
fn TA3_N_IRQ();
|
|
fn EUSCIA0_IRQ();
|
|
fn EUSCIA1_IRQ();
|
|
fn EUSCIA2_IRQ();
|
|
fn EUSCIA3_IRQ();
|
|
fn EUSCIB0_IRQ();
|
|
fn EUSCIB1_IRQ();
|
|
fn EUSCIB2_IRQ();
|
|
fn EUSCIB3_IRQ();
|
|
fn ADC14_IRQ();
|
|
fn T32_INT1_IRQ();
|
|
fn T32_INT2_IRQ();
|
|
fn T32_INTC_IRQ();
|
|
fn AES256_IRQ();
|
|
fn RTC_C_IRQ();
|
|
fn DMA_ERR_IRQ();
|
|
fn DMA_INT3_IRQ();
|
|
fn DMA_INT2_IRQ();
|
|
fn DMA_INT1_IRQ();
|
|
fn DMA_INT0_IRQ();
|
|
fn PORT1_IRQ();
|
|
fn PORT2_IRQ();
|
|
fn PORT3_IRQ();
|
|
fn PORT4_IRQ();
|
|
fn PORT5_IRQ();
|
|
fn PORT6_IRQ();
|
|
}
|
|
#[doc(hidden)]
|
|
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; 41] = [
|
|
Vector { _handler: PSS_IRQ },
|
|
Vector { _handler: CS_IRQ },
|
|
Vector { _handler: PCM_IRQ },
|
|
Vector {
|
|
_handler: WDT_A_IRQ,
|
|
},
|
|
Vector { _handler: FPU_IRQ },
|
|
Vector {
|
|
_handler: FLCTL_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: COMP_E0_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: COMP_E1_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: TA0_0_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: TA0_N_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: TA1_0_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: TA1_N_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: TA2_0_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: TA2_N_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: TA3_0_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: TA3_N_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: EUSCIA0_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: EUSCIA1_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: EUSCIA2_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: EUSCIA3_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: EUSCIB0_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: EUSCIB1_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: EUSCIB2_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: EUSCIB3_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: ADC14_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: T32_INT1_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: T32_INT2_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: T32_INTC_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: AES256_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: RTC_C_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: DMA_ERR_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: DMA_INT3_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: DMA_INT2_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: DMA_INT1_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: DMA_INT0_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: PORT1_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: PORT2_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: PORT3_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: PORT4_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: PORT5_IRQ,
|
|
},
|
|
Vector {
|
|
_handler: PORT6_IRQ,
|
|
},
|
|
];
|
|
#[doc = r" Enumeration of all the interrupts"]
|
|
pub enum Interrupt {
|
|
#[doc = "0 - PSS Interrupt"]
|
|
PSS_IRQ,
|
|
#[doc = "1 - CS Interrupt"]
|
|
CS_IRQ,
|
|
#[doc = "2 - PCM Interrupt"]
|
|
PCM_IRQ,
|
|
#[doc = "3 - WDT_A Interrupt"]
|
|
WDT_A_IRQ,
|
|
#[doc = "4 - FPU Interrupt"]
|
|
FPU_IRQ,
|
|
#[doc = "5 - Flash Controller Interrupt"]
|
|
FLCTL_IRQ,
|
|
#[doc = "6 - COMP_E0 Interrupt"]
|
|
COMP_E0_IRQ,
|
|
#[doc = "7 - COMP_E1 Interrupt"]
|
|
COMP_E1_IRQ,
|
|
#[doc = "8 - TA0_0 Interrupt"]
|
|
TA0_0_IRQ,
|
|
#[doc = "9 - TA0_N Interrupt"]
|
|
TA0_N_IRQ,
|
|
#[doc = "10 - TA1_0 Interrupt"]
|
|
TA1_0_IRQ,
|
|
#[doc = "11 - TA1_N Interrupt"]
|
|
TA1_N_IRQ,
|
|
#[doc = "12 - TA2_0 Interrupt"]
|
|
TA2_0_IRQ,
|
|
#[doc = "13 - TA2_N Interrupt"]
|
|
TA2_N_IRQ,
|
|
#[doc = "14 - TA3_0 Interrupt"]
|
|
TA3_0_IRQ,
|
|
#[doc = "15 - TA3_N Interrupt"]
|
|
TA3_N_IRQ,
|
|
#[doc = "16 - EUSCIA0 Interrupt"]
|
|
EUSCIA0_IRQ,
|
|
#[doc = "17 - EUSCIA1 Interrupt"]
|
|
EUSCIA1_IRQ,
|
|
#[doc = "18 - EUSCIA2 Interrupt"]
|
|
EUSCIA2_IRQ,
|
|
#[doc = "19 - EUSCIA3 Interrupt"]
|
|
EUSCIA3_IRQ,
|
|
#[doc = "20 - EUSCIB0 Interrupt"]
|
|
EUSCIB0_IRQ,
|
|
#[doc = "21 - EUSCIB1 Interrupt"]
|
|
EUSCIB1_IRQ,
|
|
#[doc = "22 - EUSCIB2 Interrupt"]
|
|
EUSCIB2_IRQ,
|
|
#[doc = "23 - EUSCIB3 Interrupt"]
|
|
EUSCIB3_IRQ,
|
|
#[doc = "24 - ADC14 Interrupt"]
|
|
ADC14_IRQ,
|
|
#[doc = "25 - T32_INT1 Interrupt"]
|
|
T32_INT1_IRQ,
|
|
#[doc = "26 - T32_INT2 Interrupt"]
|
|
T32_INT2_IRQ,
|
|
#[doc = "27 - T32_INTC Interrupt"]
|
|
T32_INTC_IRQ,
|
|
#[doc = "28 - AES256 Interrupt"]
|
|
AES256_IRQ,
|
|
#[doc = "29 - RTC_C Interrupt"]
|
|
RTC_C_IRQ,
|
|
#[doc = "30 - DMA_ERR Interrupt"]
|
|
DMA_ERR_IRQ,
|
|
#[doc = "31 - DMA_INT3 Interrupt"]
|
|
DMA_INT3_IRQ,
|
|
#[doc = "32 - DMA_INT2 Interrupt"]
|
|
DMA_INT2_IRQ,
|
|
#[doc = "33 - DMA_INT1 Interrupt"]
|
|
DMA_INT1_IRQ,
|
|
#[doc = "34 - DMA_INT0 Interrupt"]
|
|
DMA_INT0_IRQ,
|
|
#[doc = "35 - Port1 Interrupt"]
|
|
PORT1_IRQ,
|
|
#[doc = "36 - Port2 Interrupt"]
|
|
PORT2_IRQ,
|
|
#[doc = "37 - Port3 Interrupt"]
|
|
PORT3_IRQ,
|
|
#[doc = "38 - Port4 Interrupt"]
|
|
PORT4_IRQ,
|
|
#[doc = "39 - Port5 Interrupt"]
|
|
PORT5_IRQ,
|
|
#[doc = "40 - Port6 Interrupt"]
|
|
PORT6_IRQ,
|
|
}
|
|
unsafe impl ::bare_metal::Nr for Interrupt {
|
|
#[inline]
|
|
fn nr(&self) -> u8 {
|
|
match *self {
|
|
Interrupt::PSS_IRQ => 0,
|
|
Interrupt::CS_IRQ => 1,
|
|
Interrupt::PCM_IRQ => 2,
|
|
Interrupt::WDT_A_IRQ => 3,
|
|
Interrupt::FPU_IRQ => 4,
|
|
Interrupt::FLCTL_IRQ => 5,
|
|
Interrupt::COMP_E0_IRQ => 6,
|
|
Interrupt::COMP_E1_IRQ => 7,
|
|
Interrupt::TA0_0_IRQ => 8,
|
|
Interrupt::TA0_N_IRQ => 9,
|
|
Interrupt::TA1_0_IRQ => 10,
|
|
Interrupt::TA1_N_IRQ => 11,
|
|
Interrupt::TA2_0_IRQ => 12,
|
|
Interrupt::TA2_N_IRQ => 13,
|
|
Interrupt::TA3_0_IRQ => 14,
|
|
Interrupt::TA3_N_IRQ => 15,
|
|
Interrupt::EUSCIA0_IRQ => 16,
|
|
Interrupt::EUSCIA1_IRQ => 17,
|
|
Interrupt::EUSCIA2_IRQ => 18,
|
|
Interrupt::EUSCIA3_IRQ => 19,
|
|
Interrupt::EUSCIB0_IRQ => 20,
|
|
Interrupt::EUSCIB1_IRQ => 21,
|
|
Interrupt::EUSCIB2_IRQ => 22,
|
|
Interrupt::EUSCIB3_IRQ => 23,
|
|
Interrupt::ADC14_IRQ => 24,
|
|
Interrupt::T32_INT1_IRQ => 25,
|
|
Interrupt::T32_INT2_IRQ => 26,
|
|
Interrupt::T32_INTC_IRQ => 27,
|
|
Interrupt::AES256_IRQ => 28,
|
|
Interrupt::RTC_C_IRQ => 29,
|
|
Interrupt::DMA_ERR_IRQ => 30,
|
|
Interrupt::DMA_INT3_IRQ => 31,
|
|
Interrupt::DMA_INT2_IRQ => 32,
|
|
Interrupt::DMA_INT1_IRQ => 33,
|
|
Interrupt::DMA_INT0_IRQ => 34,
|
|
Interrupt::PORT1_IRQ => 35,
|
|
Interrupt::PORT2_IRQ => 36,
|
|
Interrupt::PORT3_IRQ => 37,
|
|
Interrupt::PORT4_IRQ => 38,
|
|
Interrupt::PORT5_IRQ => 39,
|
|
Interrupt::PORT6_IRQ => 40,
|
|
}
|
|
}
|
|
}
|
|
#[cfg(feature = "rt")]
|
|
pub use self::Interrupt as interrupt;
|
|
pub use cortex_m::peripheral::Peripherals as CorePeripherals;
|
|
pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, FPU, ITM, MPU, NVIC, SCB, SYST, TPIU};
|
|
#[cfg(feature = "rt")]
|
|
pub use cortex_m_rt::interrupt;
|
|
#[doc = "TLV"]
|
|
pub struct TLV {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for TLV {}
|
|
impl TLV {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const tlv::RegisterBlock {
|
|
2101248 as *const _
|
|
}
|
|
}
|
|
impl Deref for TLV {
|
|
type Target = tlv::RegisterBlock;
|
|
fn deref(&self) -> &tlv::RegisterBlock {
|
|
unsafe { &*TLV::ptr() }
|
|
}
|
|
}
|
|
#[doc = "TLV"]
|
|
pub mod tlv;
|
|
#[doc = "TIMER_A0"]
|
|
pub struct TIMER_A0 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for TIMER_A0 {}
|
|
impl TIMER_A0 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const timer_a0::RegisterBlock {
|
|
1073741824 as *const _
|
|
}
|
|
}
|
|
impl Deref for TIMER_A0 {
|
|
type Target = timer_a0::RegisterBlock;
|
|
fn deref(&self) -> &timer_a0::RegisterBlock {
|
|
unsafe { &*TIMER_A0::ptr() }
|
|
}
|
|
}
|
|
#[doc = "TIMER_A0"]
|
|
pub mod timer_a0;
|
|
#[doc = "TIMER_A1"]
|
|
pub struct TIMER_A1 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for TIMER_A1 {}
|
|
impl TIMER_A1 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const timer_a1::RegisterBlock {
|
|
1073742848 as *const _
|
|
}
|
|
}
|
|
impl Deref for TIMER_A1 {
|
|
type Target = timer_a1::RegisterBlock;
|
|
fn deref(&self) -> &timer_a1::RegisterBlock {
|
|
unsafe { &*TIMER_A1::ptr() }
|
|
}
|
|
}
|
|
#[doc = "TIMER_A1"]
|
|
pub mod timer_a1;
|
|
#[doc = "TIMER_A2"]
|
|
pub struct TIMER_A2 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for TIMER_A2 {}
|
|
impl TIMER_A2 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const timer_a2::RegisterBlock {
|
|
1073743872 as *const _
|
|
}
|
|
}
|
|
impl Deref for TIMER_A2 {
|
|
type Target = timer_a2::RegisterBlock;
|
|
fn deref(&self) -> &timer_a2::RegisterBlock {
|
|
unsafe { &*TIMER_A2::ptr() }
|
|
}
|
|
}
|
|
#[doc = "TIMER_A2"]
|
|
pub mod timer_a2;
|
|
#[doc = "TIMER_A3"]
|
|
pub struct TIMER_A3 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for TIMER_A3 {}
|
|
impl TIMER_A3 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const timer_a3::RegisterBlock {
|
|
1073744896 as *const _
|
|
}
|
|
}
|
|
impl Deref for TIMER_A3 {
|
|
type Target = timer_a3::RegisterBlock;
|
|
fn deref(&self) -> &timer_a3::RegisterBlock {
|
|
unsafe { &*TIMER_A3::ptr() }
|
|
}
|
|
}
|
|
#[doc = "TIMER_A3"]
|
|
pub mod timer_a3;
|
|
#[doc = "EUSCI_A0"]
|
|
pub struct EUSCI_A0 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for EUSCI_A0 {}
|
|
impl EUSCI_A0 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const eusci_a0::RegisterBlock {
|
|
1073745920 as *const _
|
|
}
|
|
}
|
|
impl Deref for EUSCI_A0 {
|
|
type Target = eusci_a0::RegisterBlock;
|
|
fn deref(&self) -> &eusci_a0::RegisterBlock {
|
|
unsafe { &*EUSCI_A0::ptr() }
|
|
}
|
|
}
|
|
#[doc = "EUSCI_A0"]
|
|
pub mod eusci_a0;
|
|
#[doc = "EUSCI_A1"]
|
|
pub struct EUSCI_A1 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for EUSCI_A1 {}
|
|
impl EUSCI_A1 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const eusci_a1::RegisterBlock {
|
|
1073746944 as *const _
|
|
}
|
|
}
|
|
impl Deref for EUSCI_A1 {
|
|
type Target = eusci_a1::RegisterBlock;
|
|
fn deref(&self) -> &eusci_a1::RegisterBlock {
|
|
unsafe { &*EUSCI_A1::ptr() }
|
|
}
|
|
}
|
|
#[doc = "EUSCI_A1"]
|
|
pub mod eusci_a1;
|
|
#[doc = "EUSCI_A2"]
|
|
pub struct EUSCI_A2 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for EUSCI_A2 {}
|
|
impl EUSCI_A2 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const eusci_a2::RegisterBlock {
|
|
1073747968 as *const _
|
|
}
|
|
}
|
|
impl Deref for EUSCI_A2 {
|
|
type Target = eusci_a2::RegisterBlock;
|
|
fn deref(&self) -> &eusci_a2::RegisterBlock {
|
|
unsafe { &*EUSCI_A2::ptr() }
|
|
}
|
|
}
|
|
#[doc = "EUSCI_A2"]
|
|
pub mod eusci_a2;
|
|
#[doc = "EUSCI_A3"]
|
|
pub struct EUSCI_A3 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for EUSCI_A3 {}
|
|
impl EUSCI_A3 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const eusci_a3::RegisterBlock {
|
|
1073748992 as *const _
|
|
}
|
|
}
|
|
impl Deref for EUSCI_A3 {
|
|
type Target = eusci_a3::RegisterBlock;
|
|
fn deref(&self) -> &eusci_a3::RegisterBlock {
|
|
unsafe { &*EUSCI_A3::ptr() }
|
|
}
|
|
}
|
|
#[doc = "EUSCI_A3"]
|
|
pub mod eusci_a3;
|
|
#[doc = "EUSCI_B0"]
|
|
pub struct EUSCI_B0 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for EUSCI_B0 {}
|
|
impl EUSCI_B0 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const eusci_b0::RegisterBlock {
|
|
1073750016 as *const _
|
|
}
|
|
}
|
|
impl Deref for EUSCI_B0 {
|
|
type Target = eusci_b0::RegisterBlock;
|
|
fn deref(&self) -> &eusci_b0::RegisterBlock {
|
|
unsafe { &*EUSCI_B0::ptr() }
|
|
}
|
|
}
|
|
#[doc = "EUSCI_B0"]
|
|
pub mod eusci_b0;
|
|
#[doc = "EUSCI_B1"]
|
|
pub struct EUSCI_B1 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for EUSCI_B1 {}
|
|
impl EUSCI_B1 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const eusci_b1::RegisterBlock {
|
|
1073751040 as *const _
|
|
}
|
|
}
|
|
impl Deref for EUSCI_B1 {
|
|
type Target = eusci_b1::RegisterBlock;
|
|
fn deref(&self) -> &eusci_b1::RegisterBlock {
|
|
unsafe { &*EUSCI_B1::ptr() }
|
|
}
|
|
}
|
|
#[doc = "EUSCI_B1"]
|
|
pub mod eusci_b1;
|
|
#[doc = "EUSCI_B2"]
|
|
pub struct EUSCI_B2 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for EUSCI_B2 {}
|
|
impl EUSCI_B2 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const eusci_b2::RegisterBlock {
|
|
1073752064 as *const _
|
|
}
|
|
}
|
|
impl Deref for EUSCI_B2 {
|
|
type Target = eusci_b2::RegisterBlock;
|
|
fn deref(&self) -> &eusci_b2::RegisterBlock {
|
|
unsafe { &*EUSCI_B2::ptr() }
|
|
}
|
|
}
|
|
#[doc = "EUSCI_B2"]
|
|
pub mod eusci_b2;
|
|
#[doc = "EUSCI_B3"]
|
|
pub struct EUSCI_B3 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for EUSCI_B3 {}
|
|
impl EUSCI_B3 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const eusci_b3::RegisterBlock {
|
|
1073753088 as *const _
|
|
}
|
|
}
|
|
impl Deref for EUSCI_B3 {
|
|
type Target = eusci_b3::RegisterBlock;
|
|
fn deref(&self) -> &eusci_b3::RegisterBlock {
|
|
unsafe { &*EUSCI_B3::ptr() }
|
|
}
|
|
}
|
|
#[doc = "EUSCI_B3"]
|
|
pub mod eusci_b3;
|
|
#[doc = "REF_A"]
|
|
pub struct REF_A {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for REF_A {}
|
|
impl REF_A {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const ref_a::RegisterBlock {
|
|
1073754112 as *const _
|
|
}
|
|
}
|
|
impl Deref for REF_A {
|
|
type Target = ref_a::RegisterBlock;
|
|
fn deref(&self) -> &ref_a::RegisterBlock {
|
|
unsafe { &*REF_A::ptr() }
|
|
}
|
|
}
|
|
#[doc = "REF_A"]
|
|
pub mod ref_a;
|
|
#[doc = "COMP_E0"]
|
|
pub struct COMP_E0 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for COMP_E0 {}
|
|
impl COMP_E0 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const comp_e0::RegisterBlock {
|
|
1073755136 as *const _
|
|
}
|
|
}
|
|
impl Deref for COMP_E0 {
|
|
type Target = comp_e0::RegisterBlock;
|
|
fn deref(&self) -> &comp_e0::RegisterBlock {
|
|
unsafe { &*COMP_E0::ptr() }
|
|
}
|
|
}
|
|
#[doc = "COMP_E0"]
|
|
pub mod comp_e0;
|
|
#[doc = "COMP_E1"]
|
|
pub struct COMP_E1 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for COMP_E1 {}
|
|
impl COMP_E1 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const comp_e1::RegisterBlock {
|
|
1073756160 as *const _
|
|
}
|
|
}
|
|
impl Deref for COMP_E1 {
|
|
type Target = comp_e1::RegisterBlock;
|
|
fn deref(&self) -> &comp_e1::RegisterBlock {
|
|
unsafe { &*COMP_E1::ptr() }
|
|
}
|
|
}
|
|
#[doc = "COMP_E1"]
|
|
pub mod comp_e1;
|
|
#[doc = "AES256"]
|
|
pub struct AES256 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for AES256 {}
|
|
impl AES256 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const aes256::RegisterBlock {
|
|
1073757184 as *const _
|
|
}
|
|
}
|
|
impl Deref for AES256 {
|
|
type Target = aes256::RegisterBlock;
|
|
fn deref(&self) -> &aes256::RegisterBlock {
|
|
unsafe { &*AES256::ptr() }
|
|
}
|
|
}
|
|
#[doc = "AES256"]
|
|
pub mod aes256;
|
|
#[doc = "CRC32"]
|
|
pub struct CRC32 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for CRC32 {}
|
|
impl CRC32 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const crc32::RegisterBlock {
|
|
1073758208 as *const _
|
|
}
|
|
}
|
|
impl Deref for CRC32 {
|
|
type Target = crc32::RegisterBlock;
|
|
fn deref(&self) -> &crc32::RegisterBlock {
|
|
unsafe { &*CRC32::ptr() }
|
|
}
|
|
}
|
|
#[doc = "CRC32"]
|
|
pub mod crc32;
|
|
#[doc = "RTC_C"]
|
|
pub struct RTC_C {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for RTC_C {}
|
|
impl RTC_C {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const rtc_c::RegisterBlock {
|
|
1073759232 as *const _
|
|
}
|
|
}
|
|
impl Deref for RTC_C {
|
|
type Target = rtc_c::RegisterBlock;
|
|
fn deref(&self) -> &rtc_c::RegisterBlock {
|
|
unsafe { &*RTC_C::ptr() }
|
|
}
|
|
}
|
|
#[doc = "RTC_C"]
|
|
pub mod rtc_c;
|
|
#[doc = "WDT_A"]
|
|
pub struct WDT_A {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for WDT_A {}
|
|
impl WDT_A {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const wdt_a::RegisterBlock {
|
|
1073760256 as *const _
|
|
}
|
|
}
|
|
impl Deref for WDT_A {
|
|
type Target = wdt_a::RegisterBlock;
|
|
fn deref(&self) -> &wdt_a::RegisterBlock {
|
|
unsafe { &*WDT_A::ptr() }
|
|
}
|
|
}
|
|
#[doc = "WDT_A"]
|
|
pub mod wdt_a;
|
|
#[doc = "DIO"]
|
|
pub struct DIO {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for DIO {}
|
|
impl DIO {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const dio::RegisterBlock {
|
|
1073761280 as *const _
|
|
}
|
|
}
|
|
impl Deref for DIO {
|
|
type Target = dio::RegisterBlock;
|
|
fn deref(&self) -> &dio::RegisterBlock {
|
|
unsafe { &*DIO::ptr() }
|
|
}
|
|
}
|
|
#[doc = "DIO"]
|
|
pub mod dio;
|
|
#[doc = "PMAP"]
|
|
pub struct PMAP {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for PMAP {}
|
|
impl PMAP {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const pmap::RegisterBlock {
|
|
1073762304 as *const _
|
|
}
|
|
}
|
|
impl Deref for PMAP {
|
|
type Target = pmap::RegisterBlock;
|
|
fn deref(&self) -> &pmap::RegisterBlock {
|
|
unsafe { &*PMAP::ptr() }
|
|
}
|
|
}
|
|
#[doc = "PMAP"]
|
|
pub mod pmap;
|
|
#[doc = "CAPTIO0"]
|
|
pub struct CAPTIO0 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for CAPTIO0 {}
|
|
impl CAPTIO0 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const captio0::RegisterBlock {
|
|
1073763328 as *const _
|
|
}
|
|
}
|
|
impl Deref for CAPTIO0 {
|
|
type Target = captio0::RegisterBlock;
|
|
fn deref(&self) -> &captio0::RegisterBlock {
|
|
unsafe { &*CAPTIO0::ptr() }
|
|
}
|
|
}
|
|
#[doc = "CAPTIO0"]
|
|
pub mod captio0;
|
|
#[doc = "CAPTIO1"]
|
|
pub struct CAPTIO1 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for CAPTIO1 {}
|
|
impl CAPTIO1 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const captio1::RegisterBlock {
|
|
1073764352 as *const _
|
|
}
|
|
}
|
|
impl Deref for CAPTIO1 {
|
|
type Target = captio1::RegisterBlock;
|
|
fn deref(&self) -> &captio1::RegisterBlock {
|
|
unsafe { &*CAPTIO1::ptr() }
|
|
}
|
|
}
|
|
#[doc = "CAPTIO1"]
|
|
pub mod captio1;
|
|
#[doc = "TIMER32"]
|
|
pub struct TIMER32 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for TIMER32 {}
|
|
impl TIMER32 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const timer32::RegisterBlock {
|
|
1073790976 as *const _
|
|
}
|
|
}
|
|
impl Deref for TIMER32 {
|
|
type Target = timer32::RegisterBlock;
|
|
fn deref(&self) -> &timer32::RegisterBlock {
|
|
unsafe { &*TIMER32::ptr() }
|
|
}
|
|
}
|
|
#[doc = "TIMER32"]
|
|
pub mod timer32;
|
|
#[doc = "DMA"]
|
|
pub struct DMA {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for DMA {}
|
|
impl DMA {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const dma::RegisterBlock {
|
|
1073799168 as *const _
|
|
}
|
|
}
|
|
impl Deref for DMA {
|
|
type Target = dma::RegisterBlock;
|
|
fn deref(&self) -> &dma::RegisterBlock {
|
|
unsafe { &*DMA::ptr() }
|
|
}
|
|
}
|
|
#[doc = "DMA"]
|
|
pub mod dma;
|
|
#[doc = "PCM"]
|
|
pub struct PCM {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for PCM {}
|
|
impl PCM {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const pcm::RegisterBlock {
|
|
1073807360 as *const _
|
|
}
|
|
}
|
|
impl Deref for PCM {
|
|
type Target = pcm::RegisterBlock;
|
|
fn deref(&self) -> &pcm::RegisterBlock {
|
|
unsafe { &*PCM::ptr() }
|
|
}
|
|
}
|
|
#[doc = "PCM"]
|
|
pub mod pcm;
|
|
#[doc = "CS"]
|
|
pub struct CS {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for CS {}
|
|
impl CS {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const cs::RegisterBlock {
|
|
1073808384 as *const _
|
|
}
|
|
}
|
|
impl Deref for CS {
|
|
type Target = cs::RegisterBlock;
|
|
fn deref(&self) -> &cs::RegisterBlock {
|
|
unsafe { &*CS::ptr() }
|
|
}
|
|
}
|
|
#[doc = "CS"]
|
|
pub mod cs;
|
|
#[doc = "PSS"]
|
|
pub struct PSS {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for PSS {}
|
|
impl PSS {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const pss::RegisterBlock {
|
|
1073809408 as *const _
|
|
}
|
|
}
|
|
impl Deref for PSS {
|
|
type Target = pss::RegisterBlock;
|
|
fn deref(&self) -> &pss::RegisterBlock {
|
|
unsafe { &*PSS::ptr() }
|
|
}
|
|
}
|
|
#[doc = "PSS"]
|
|
pub mod pss;
|
|
#[doc = "FLCTL"]
|
|
pub struct FLCTL {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for FLCTL {}
|
|
impl FLCTL {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const flctl::RegisterBlock {
|
|
1073811456 as *const _
|
|
}
|
|
}
|
|
impl Deref for FLCTL {
|
|
type Target = flctl::RegisterBlock;
|
|
fn deref(&self) -> &flctl::RegisterBlock {
|
|
unsafe { &*FLCTL::ptr() }
|
|
}
|
|
}
|
|
#[doc = "FLCTL"]
|
|
pub mod flctl;
|
|
#[doc = "ADC14"]
|
|
pub struct ADC14 {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for ADC14 {}
|
|
impl ADC14 {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const adc14::RegisterBlock {
|
|
1073815552 as *const _
|
|
}
|
|
}
|
|
impl Deref for ADC14 {
|
|
type Target = adc14::RegisterBlock;
|
|
fn deref(&self) -> &adc14::RegisterBlock {
|
|
unsafe { &*ADC14::ptr() }
|
|
}
|
|
}
|
|
#[doc = "ADC14"]
|
|
pub mod adc14;
|
|
#[doc = "System Control Space for ARM core: SCnSCB, SCB, SysTick, NVIC, CoreDebug, MPU, FPU"]
|
|
pub struct SYSTEMCONTROLSPACE {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for SYSTEMCONTROLSPACE {}
|
|
impl SYSTEMCONTROLSPACE {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const system_control_space::RegisterBlock {
|
|
3758153728 as *const _
|
|
}
|
|
}
|
|
impl Deref for SYSTEMCONTROLSPACE {
|
|
type Target = system_control_space::RegisterBlock;
|
|
fn deref(&self) -> &system_control_space::RegisterBlock {
|
|
unsafe { &*SYSTEMCONTROLSPACE::ptr() }
|
|
}
|
|
}
|
|
#[doc = "System Control Space for ARM core: SCnSCB, SCB, SysTick, NVIC, CoreDebug, MPU, FPU"]
|
|
pub mod system_control_space;
|
|
#[doc = "RSTCTL"]
|
|
pub struct RSTCTL {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for RSTCTL {}
|
|
impl RSTCTL {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const rstctl::RegisterBlock {
|
|
3758366720 as *const _
|
|
}
|
|
}
|
|
impl Deref for RSTCTL {
|
|
type Target = rstctl::RegisterBlock;
|
|
fn deref(&self) -> &rstctl::RegisterBlock {
|
|
unsafe { &*RSTCTL::ptr() }
|
|
}
|
|
}
|
|
#[doc = "RSTCTL"]
|
|
pub mod rstctl;
|
|
#[doc = "SYSCTL"]
|
|
pub struct SYSCTL {
|
|
_marker: PhantomData<*const ()>,
|
|
}
|
|
unsafe impl Send for SYSCTL {}
|
|
impl SYSCTL {
|
|
#[doc = r" Returns a pointer to the register block"]
|
|
pub fn ptr() -> *const sysctl::RegisterBlock {
|
|
3758370816 as *const _
|
|
}
|
|
}
|
|
impl Deref for SYSCTL {
|
|
type Target = sysctl::RegisterBlock;
|
|
fn deref(&self) -> &sysctl::RegisterBlock {
|
|
unsafe { &*SYSCTL::ptr() }
|
|
}
|
|
}
|
|
#[doc = "SYSCTL"]
|
|
pub mod sysctl;
|
|
#[allow(renamed_and_removed_lints)]
|
|
#[allow(private_no_mangle_statics)]
|
|
#[no_mangle]
|
|
static mut DEVICE_PERIPHERALS: bool = false;
|
|
#[doc = r" All the peripherals"]
|
|
#[allow(non_snake_case)]
|
|
pub struct Peripherals {
|
|
#[doc = "TLV"]
|
|
pub TLV: TLV,
|
|
#[doc = "TIMER_A0"]
|
|
pub TIMER_A0: TIMER_A0,
|
|
#[doc = "TIMER_A1"]
|
|
pub TIMER_A1: TIMER_A1,
|
|
#[doc = "TIMER_A2"]
|
|
pub TIMER_A2: TIMER_A2,
|
|
#[doc = "TIMER_A3"]
|
|
pub TIMER_A3: TIMER_A3,
|
|
#[doc = "EUSCI_A0"]
|
|
pub EUSCI_A0: EUSCI_A0,
|
|
#[doc = "EUSCI_A1"]
|
|
pub EUSCI_A1: EUSCI_A1,
|
|
#[doc = "EUSCI_A2"]
|
|
pub EUSCI_A2: EUSCI_A2,
|
|
#[doc = "EUSCI_A3"]
|
|
pub EUSCI_A3: EUSCI_A3,
|
|
#[doc = "EUSCI_B0"]
|
|
pub EUSCI_B0: EUSCI_B0,
|
|
#[doc = "EUSCI_B1"]
|
|
pub EUSCI_B1: EUSCI_B1,
|
|
#[doc = "EUSCI_B2"]
|
|
pub EUSCI_B2: EUSCI_B2,
|
|
#[doc = "EUSCI_B3"]
|
|
pub EUSCI_B3: EUSCI_B3,
|
|
#[doc = "REF_A"]
|
|
pub REF_A: REF_A,
|
|
#[doc = "COMP_E0"]
|
|
pub COMP_E0: COMP_E0,
|
|
#[doc = "COMP_E1"]
|
|
pub COMP_E1: COMP_E1,
|
|
#[doc = "AES256"]
|
|
pub AES256: AES256,
|
|
#[doc = "CRC32"]
|
|
pub CRC32: CRC32,
|
|
#[doc = "RTC_C"]
|
|
pub RTC_C: RTC_C,
|
|
#[doc = "WDT_A"]
|
|
pub WDT_A: WDT_A,
|
|
#[doc = "DIO"]
|
|
pub DIO: DIO,
|
|
#[doc = "PMAP"]
|
|
pub PMAP: PMAP,
|
|
#[doc = "CAPTIO0"]
|
|
pub CAPTIO0: CAPTIO0,
|
|
#[doc = "CAPTIO1"]
|
|
pub CAPTIO1: CAPTIO1,
|
|
#[doc = "TIMER32"]
|
|
pub TIMER32: TIMER32,
|
|
#[doc = "DMA"]
|
|
pub DMA: DMA,
|
|
#[doc = "PCM"]
|
|
pub PCM: PCM,
|
|
#[doc = "CS"]
|
|
pub CS: CS,
|
|
#[doc = "PSS"]
|
|
pub PSS: PSS,
|
|
#[doc = "FLCTL"]
|
|
pub FLCTL: FLCTL,
|
|
#[doc = "ADC14"]
|
|
pub ADC14: ADC14,
|
|
#[doc = "SYSTEMCONTROLSPACE"]
|
|
pub SYSTEMCONTROLSPACE: SYSTEMCONTROLSPACE,
|
|
#[doc = "RSTCTL"]
|
|
pub RSTCTL: RSTCTL,
|
|
#[doc = "SYSCTL"]
|
|
pub SYSCTL: SYSCTL,
|
|
}
|
|
impl Peripherals {
|
|
#[doc = r" Returns all the peripherals *once*"]
|
|
#[inline]
|
|
pub fn take() -> Option<Self> {
|
|
cortex_m::interrupt::free(|_| {
|
|
if unsafe { DEVICE_PERIPHERALS } {
|
|
None
|
|
} else {
|
|
Some(unsafe { Peripherals::steal() })
|
|
}
|
|
})
|
|
}
|
|
#[doc = r" Unchecked version of `Peripherals::take`"]
|
|
pub unsafe fn steal() -> Self {
|
|
debug_assert!(!DEVICE_PERIPHERALS);
|
|
DEVICE_PERIPHERALS = true;
|
|
Peripherals {
|
|
TLV: TLV {
|
|
_marker: PhantomData,
|
|
},
|
|
TIMER_A0: TIMER_A0 {
|
|
_marker: PhantomData,
|
|
},
|
|
TIMER_A1: TIMER_A1 {
|
|
_marker: PhantomData,
|
|
},
|
|
TIMER_A2: TIMER_A2 {
|
|
_marker: PhantomData,
|
|
},
|
|
TIMER_A3: TIMER_A3 {
|
|
_marker: PhantomData,
|
|
},
|
|
EUSCI_A0: EUSCI_A0 {
|
|
_marker: PhantomData,
|
|
},
|
|
EUSCI_A1: EUSCI_A1 {
|
|
_marker: PhantomData,
|
|
},
|
|
EUSCI_A2: EUSCI_A2 {
|
|
_marker: PhantomData,
|
|
},
|
|
EUSCI_A3: EUSCI_A3 {
|
|
_marker: PhantomData,
|
|
},
|
|
EUSCI_B0: EUSCI_B0 {
|
|
_marker: PhantomData,
|
|
},
|
|
EUSCI_B1: EUSCI_B1 {
|
|
_marker: PhantomData,
|
|
},
|
|
EUSCI_B2: EUSCI_B2 {
|
|
_marker: PhantomData,
|
|
},
|
|
EUSCI_B3: EUSCI_B3 {
|
|
_marker: PhantomData,
|
|
},
|
|
REF_A: REF_A {
|
|
_marker: PhantomData,
|
|
},
|
|
COMP_E0: COMP_E0 {
|
|
_marker: PhantomData,
|
|
},
|
|
COMP_E1: COMP_E1 {
|
|
_marker: PhantomData,
|
|
},
|
|
AES256: AES256 {
|
|
_marker: PhantomData,
|
|
},
|
|
CRC32: CRC32 {
|
|
_marker: PhantomData,
|
|
},
|
|
RTC_C: RTC_C {
|
|
_marker: PhantomData,
|
|
},
|
|
WDT_A: WDT_A {
|
|
_marker: PhantomData,
|
|
},
|
|
DIO: DIO {
|
|
_marker: PhantomData,
|
|
},
|
|
PMAP: PMAP {
|
|
_marker: PhantomData,
|
|
},
|
|
CAPTIO0: CAPTIO0 {
|
|
_marker: PhantomData,
|
|
},
|
|
CAPTIO1: CAPTIO1 {
|
|
_marker: PhantomData,
|
|
},
|
|
TIMER32: TIMER32 {
|
|
_marker: PhantomData,
|
|
},
|
|
DMA: DMA {
|
|
_marker: PhantomData,
|
|
},
|
|
PCM: PCM {
|
|
_marker: PhantomData,
|
|
},
|
|
CS: CS {
|
|
_marker: PhantomData,
|
|
},
|
|
PSS: PSS {
|
|
_marker: PhantomData,
|
|
},
|
|
FLCTL: FLCTL {
|
|
_marker: PhantomData,
|
|
},
|
|
ADC14: ADC14 {
|
|
_marker: PhantomData,
|
|
},
|
|
SYSTEMCONTROLSPACE: SYSTEMCONTROLSPACE {
|
|
_marker: PhantomData,
|
|
},
|
|
RSTCTL: RSTCTL {
|
|
_marker: PhantomData,
|
|
},
|
|
SYSCTL: SYSCTL {
|
|
_marker: PhantomData,
|
|
},
|
|
}
|
|
}
|
|
}
|