Struct TWAI1

Source
pub struct TWAI1 { /* private fields */ }

Implementations§

Source§

impl TWAI1

Source

pub const PTR: *const <TWAI1 as Deref>::Target = {0x6000d000 as *const <esp32c6::TWAI1 as core::ops::Deref>::Target}

Pointer to the register block

Source

pub unsafe fn steal() -> TWAI1

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 fn ptr() -> *const <TWAI1 as Deref>::Target

Return the pointer to the register block

Methods from Deref<Target = RegisterBlock>§

Source

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

0x00 - TWAI mode register.

Source

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

0x04 - TWAI command register.

Source

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

0x08 - TWAI status register.

Source

pub fn interrupt(&self) -> &Reg<INTERRUPT_SPEC>

0x0c - Interrupt signals’ register.

Source

pub fn interrupt_enable(&self) -> &Reg<INTERRUPT_ENABLE_SPEC>

0x10 - Interrupt enable register.

Source

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

0x18 - Bit timing configuration register 0.

Source

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

0x1c - Bit timing configuration register 1.

Source

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

0x2c - TWAI arbiter lost capture register.

Source

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

0x30 - TWAI error info capture register.

Source

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

0x34 - TWAI error threshold configuration register.

Source

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

0x38 - Rx error counter register.

Source

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

0x3c - Tx 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 - Received message counter register.

Source

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

0x7c - Clock divider register.

Source

pub fn sw_standby_cfg(&self) -> &Reg<SW_STANDBY_CFG_SPEC>

0x80 - Software configure standby pin directly.

Source

pub fn hw_cfg(&self) -> &Reg<HW_CFG_SPEC>

0x84 - Hardware configure standby pin.

Source

pub fn hw_standby_cnt(&self) -> &Reg<HW_STANDBY_CNT_SPEC>

0x88 - Configure standby counter.

Source

pub fn idle_intr_cnt(&self) -> &Reg<IDLE_INTR_CNT_SPEC>

0x8c - Configure idle interrupt counter.

Source

pub fn eco_cfg(&self) -> &Reg<ECO_CFG_SPEC>

0x90 - ECO configuration register.

Trait Implementations§

Source§

impl Debug for TWAI1

Source§

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

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

impl Deref for TWAI1

Source§

type Target = <TWAI1 as Deref>::Target

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl DerefMut for TWAI1

Source§

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

Mutably dereferences the value.
Source§

impl Instance for TWAI1

Source§

const SYSTEM_PERIPHERAL: Peripheral = system::Peripheral::Twai1

Source§

const INPUT_SIGNAL: InputSignal = InputSignal::TWAI1_RX

Source§

const OUTPUT_SIGNAL: OutputSignal = OutputSignal::TWAI1_TX

Source§

fn register_block(&self) -> &RegisterBlock

Source§

impl Peripheral for TWAI1

Source§

type P = TWAI1

Peripheral singleton type
Source§

unsafe fn clone_unchecked(&mut self) -> <TWAI1 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 Freeze for TWAI1

§

impl RefUnwindSafe for TWAI1

§

impl Send for TWAI1

§

impl Sync for TWAI1

§

impl Unpin for TWAI1

§

impl UnwindSafe for TWAI1

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

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>,

Source§

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.