Struct cands_interface::TCAN455xTranceiver

source ·
pub struct TCAN455xTranceiver { /* private fields */ }
Expand description

CAN Tranceiver

Implementations§

source§

impl TCAN455xTranceiver

source

pub fn write(&mut self, data: &[u8]) -> Result<usize>

source

pub fn read(&mut self, addr: u16, len: u8) -> Result<Vec<u8>>

source

pub fn read_bytes(&mut self, addr: u16, len: u8) -> Result<Vec<u8>>

source

pub fn read_device(&mut self, addr: u16) -> Result<u32>

source

pub fn reset(&mut self) -> Result<(), Box<dyn Error>>

source

pub fn setup( &mut self, sidf: &[SIDConfig], xidf: &[XIDConfig], ) -> Result<(), String>

source

pub fn close(&mut self) -> Result<()>

source

pub fn get_device_id(&mut self) -> Result<String>

source

pub fn read_spi_status(&mut self) -> Result<u32>

source

pub fn read_device_irq(&mut self) -> Result<u32>

source

pub fn clear_spi_error(&mut self) -> Result<()>

source

pub fn clear_device_irq_flags(&mut self, dev_ir: u32) -> Result<()>

source

pub fn clear_mcan_irq_flags(&mut self) -> Result<()>

source

pub fn clear_mram(&mut self) -> Result<()>

source

pub fn lock_mcan_cccr(&mut self) -> Result<()>

source

pub fn unlock_mcan_cccr(&mut self) -> Result<()>

source

pub fn configure_global_filter(&mut self) -> Result<()>

source

pub fn configure_mcan_cccr(&mut self) -> Result<()>

source

pub fn configure_bit_timing(&mut self) -> Result<()>

source

pub fn configure_mram(&mut self) -> Result<()>

source

pub fn configure_mode_and_pins(&mut self) -> Result<()>

source

pub fn configure_mcan_irq(&mut self) -> Result<()>

source

pub fn configure_filter( &mut self, sidf: &[SIDConfig], xidf: &[XIDConfig], ) -> Result<()>

source

pub fn switch_operation_mode(&mut self, mode: u8) -> Result<()>

source

pub fn switch_normal_mode(&mut self) -> Result<()>

source

pub fn switch_standby_mode(&mut self) -> Result<()>

source

pub fn switch_sleep_mode(&mut self) -> Result<()>

source

pub fn switch_test_mode(&mut self) -> Result<()>

source

pub const CAN_DLC_TO_DLEN: [u8; 16] = _

source

pub const CAN_DLEN_TO_DLC: [u8; 65] = _

source

pub fn transmit(&mut self, xid: u32, data: &[u8], size: usize) -> Result<()>

source

pub fn receive(&mut self) -> Result<Option<RxData>>

Auto Trait Implementations§

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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more