pub struct TWAI0 { /* private fields */ }

Implementations§

source§

impl TWAI0

source

pub unsafe fn steal() -> TWAI0

Unsafely create an instance of this peripheral out of thin air.

§Safety

You must ensure that you’re only using one instance of this type at a time.

source

pub const PTR: *const <TWAI0 as Deref>::Target = {0x3ff6b000 as *const <esp32::TWAI0 as core::ops::Deref>::Target}

Pointer to the register block

source

pub const fn ptr() -> *const <TWAI0 as Deref>::Target

Return the pointer to the register block

Methods from Deref<Target = RegisterBlock>§

source

pub fn mode(&self) -> &Reg<MODE_SPEC>

0x00 - Mode Register

source

pub fn cmd(&self) -> &Reg<CMD_SPEC>

0x04 - Command Register

source

pub fn status(&self) -> &Reg<STATUS_SPEC>

0x08 - Status register

source

pub fn int_raw(&self) -> &Reg<INT_RAW_SPEC>

0x0c - Interrupt Register

source

pub fn int_ena(&self) -> &Reg<INT_ENA_SPEC>

0x10 - Interrupt Enable Register

source

pub fn bus_timing_0(&self) -> &Reg<BUS_TIMING_0_SPEC>

0x18 - Bus Timing Register 0

source

pub fn bus_timing_1(&self) -> &Reg<BUS_TIMING_1_SPEC>

0x1c - Bus Timing Register 1

source

pub fn arb_lost_cap(&self) -> &Reg<ARB_LOST_CAP_SPEC>

0x2c - Arbitration Lost Capture Register

source

pub fn err_code_cap(&self) -> &Reg<ERR_CODE_CAP_SPEC>

0x30 - Error Code Capture Register

source

pub fn err_warning_limit(&self) -> &Reg<ERR_WARNING_LIMIT_SPEC>

0x34 - Error Warning Limit Register

source

pub fn rx_err_cnt(&self) -> &Reg<RX_ERR_CNT_SPEC>

0x38 - Receive Error Counter Register

source

pub fn tx_err_cnt(&self) -> &Reg<TX_ERR_CNT_SPEC>

0x3c - Transmit Error Counter Register

source

pub fn data_0(&self) -> &Reg<DATA_0_SPEC>

0x40 - Data register 0

source

pub fn data_1(&self) -> &Reg<DATA_1_SPEC>

0x44 - Data register 1

source

pub fn data_2(&self) -> &Reg<DATA_2_SPEC>

0x48 - Data register 2

source

pub fn data_3(&self) -> &Reg<DATA_3_SPEC>

0x4c - Data register 3

source

pub fn data_4(&self) -> &Reg<DATA_4_SPEC>

0x50 - Data register 4

source

pub fn data_5(&self) -> &Reg<DATA_5_SPEC>

0x54 - Data register 5

source

pub fn data_6(&self) -> &Reg<DATA_6_SPEC>

0x58 - Data register 6

source

pub fn data_7(&self) -> &Reg<DATA_7_SPEC>

0x5c - Data register 7

source

pub fn data_8(&self) -> &Reg<DATA_8_SPEC>

0x60 - Data register 8

source

pub fn data_9(&self) -> &Reg<DATA_9_SPEC>

0x64 - Data register 9

source

pub fn data_10(&self) -> &Reg<DATA_10_SPEC>

0x68 - Data register 10

source

pub fn data_11(&self) -> &Reg<DATA_11_SPEC>

0x6c - Data register 11

source

pub fn data_12(&self) -> &Reg<DATA_12_SPEC>

0x70 - Data register 12

source

pub fn rx_message_cnt(&self) -> &Reg<RX_MESSAGE_CNT_SPEC>

0x74 - Receive Message Counter Register

source

pub fn clock_divider(&self) -> &Reg<CLOCK_DIVIDER_SPEC>

0x7c - Clock Divider register

Trait Implementations§

source§

impl Debug for TWAI0

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Deref for TWAI0

§

type Target = <TWAI0 as Deref>::Target

The resulting type after dereferencing.
source§

fn deref(&self) -> &<TWAI0 as Deref>::Target

Dereferences the value.
source§

impl DerefMut for TWAI0

source§

fn deref_mut(&mut self) -> &mut <TWAI0 as Deref>::Target

Mutably dereferences the value.
source§

impl Peripheral for TWAI0

§

type P = TWAI0

Peripheral singleton type
source§

unsafe fn clone_unchecked(&mut self) -> <TWAI0 as Peripheral>::P

Unsafely clone (duplicate) a peripheral singleton. Read more
source§

fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P>
where Self: 'a,

Convert a value into a PeripheralRef. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for TWAI0

§

impl Send for TWAI0

§

impl Sync for TWAI0

§

impl Unpin for TWAI0

§

impl UnwindSafe for TWAI0

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.