pub struct TWAI0 { /* private fields */ }
Expand description
Two-Wire Automotive Interface
Implementations§
source§impl TWAI0
impl TWAI0
sourcepub const PTR: *const RegisterBlock = {0x6000b000 as *const twai0::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x6000b000 as *const twai0::RegisterBlock}
Pointer to the register block
sourcepub const fn ptr() -> *const RegisterBlock
pub const fn ptr() -> *const RegisterBlock
Return the pointer to the register block
sourcepub unsafe fn steal() -> Self
pub unsafe fn steal() -> Self
Steal an instance of this peripheral
§Safety
Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.
Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.
Methods from Deref<Target = RegisterBlock>§
sourcepub fn interrupt_enable(&self) -> &INTERRUPT_ENABLE
pub fn interrupt_enable(&self) -> &INTERRUPT_ENABLE
0x10 - Interrupt enable register.
sourcepub fn bus_timing_0(&self) -> &BUS_TIMING_0
pub fn bus_timing_0(&self) -> &BUS_TIMING_0
0x18 - Bit timing configuration register 0.
sourcepub fn bus_timing_1(&self) -> &BUS_TIMING_1
pub fn bus_timing_1(&self) -> &BUS_TIMING_1
0x1c - Bit timing configuration register 1.
sourcepub fn arb_lost_cap(&self) -> &ARB_LOST_CAP
pub fn arb_lost_cap(&self) -> &ARB_LOST_CAP
0x2c - TWAI arbiter lost capture register.
sourcepub fn err_code_cap(&self) -> &ERR_CODE_CAP
pub fn err_code_cap(&self) -> &ERR_CODE_CAP
0x30 - TWAI error info capture register.
sourcepub fn err_warning_limit(&self) -> &ERR_WARNING_LIMIT
pub fn err_warning_limit(&self) -> &ERR_WARNING_LIMIT
0x34 - TWAI error threshold configuration register.
sourcepub fn rx_err_cnt(&self) -> &RX_ERR_CNT
pub fn rx_err_cnt(&self) -> &RX_ERR_CNT
0x38 - Rx error counter register.
sourcepub fn tx_err_cnt(&self) -> &TX_ERR_CNT
pub fn tx_err_cnt(&self) -> &TX_ERR_CNT
0x3c - Tx error counter register.
sourcepub fn rx_message_cnt(&self) -> &RX_MESSAGE_CNT
pub fn rx_message_cnt(&self) -> &RX_MESSAGE_CNT
0x74 - Received message counter register.
sourcepub fn clock_divider(&self) -> &CLOCK_DIVIDER
pub fn clock_divider(&self) -> &CLOCK_DIVIDER
0x7c - Clock divider register.
sourcepub fn sw_standby_cfg(&self) -> &SW_STANDBY_CFG
pub fn sw_standby_cfg(&self) -> &SW_STANDBY_CFG
0x80 - Software configure standby pin directly.
sourcepub fn hw_standby_cnt(&self) -> &HW_STANDBY_CNT
pub fn hw_standby_cnt(&self) -> &HW_STANDBY_CNT
0x88 - Configure standby counter.
sourcepub fn idle_intr_cnt(&self) -> &IDLE_INTR_CNT
pub fn idle_intr_cnt(&self) -> &IDLE_INTR_CNT
0x8c - Configure idle interrupt counter.