pub struct TWAI0 { /* private fields */ }
Expand description
Two-Wire Automotive Interface
Implementations§
source§impl TWAI0
impl TWAI0
sourcepub const PTR: *const RegisterBlock = {0x6002b000 as *const twai0::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x6002b000 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 bus_timing_0(&self) -> &BUS_TIMING_0
pub fn bus_timing_0(&self) -> &BUS_TIMING_0
0x18 - Bus Timing Register 0
sourcepub fn bus_timing_1(&self) -> &BUS_TIMING_1
pub fn bus_timing_1(&self) -> &BUS_TIMING_1
0x1c - Bus Timing Register 1
sourcepub fn arb_lost_cap(&self) -> &ARB_LOST_CAP
pub fn arb_lost_cap(&self) -> &ARB_LOST_CAP
0x2c - Arbitration Lost Capture Register
sourcepub fn err_code_cap(&self) -> &ERR_CODE_CAP
pub fn err_code_cap(&self) -> &ERR_CODE_CAP
0x30 - Error Code Capture Register
sourcepub fn err_warning_limit(&self) -> &ERR_WARNING_LIMIT
pub fn err_warning_limit(&self) -> &ERR_WARNING_LIMIT
0x34 - Error Warning Limit Register
sourcepub fn rx_err_cnt(&self) -> &RX_ERR_CNT
pub fn rx_err_cnt(&self) -> &RX_ERR_CNT
0x38 - Receive Error Counter Register
sourcepub fn tx_err_cnt(&self) -> &TX_ERR_CNT
pub fn tx_err_cnt(&self) -> &TX_ERR_CNT
0x3c - Transmit Error Counter Register
sourcepub fn rx_message_cnt(&self) -> &RX_MESSAGE_CNT
pub fn rx_message_cnt(&self) -> &RX_MESSAGE_CNT
0x74 - Receive Message Counter Register
sourcepub fn clock_divider(&self) -> &CLOCK_DIVIDER
pub fn clock_divider(&self) -> &CLOCK_DIVIDER
0x7c - Clock Divider register