Struct L6360_HW

Source
pub struct L6360_HW<'a> {
    uart_instance: Option<USART1>,
    tx_pin: Option<PA9>,
    rx_pin: Option<PA10>,
    enl_plus: Output<'a>,
    en_cq: Output<'a>,
    in_cq: Option<Output<'a>>,
    out_cq: Option<Input<'a>>,
    uart: Option<Uart<'a, Blocking>>,
    mode: Mode,
}

Fields§

§uart_instance: Option<USART1>§tx_pin: Option<PA9>§rx_pin: Option<PA10>§enl_plus: Output<'a>§en_cq: Output<'a>§in_cq: Option<Output<'a>>§out_cq: Option<Input<'a>>§uart: Option<Uart<'a, Blocking>>§mode: Mode

Implementations§

Source§

impl<'a> L6360_HW<'a>

Source

pub fn new( uart_instance: USART1, tx_pin: PA9, rx_pin: PA10, enl_plus: PA6, en_cq: PC0, ) -> Self

Source

pub fn switch_to_uart(&mut self)

Source

pub fn get_mode(&self) -> Mode

Trait Implementations§

Source§

impl<'a> HardwareAccess for L6360_HW<'a>

Source§

fn enl_plus(&mut self, level: PinState)

Source§

fn en_cq(&mut self, level: PinState)

Source§

fn in_cq(&mut self, level: PinState)

Source§

fn out_cq(&self) -> PinState

Source§

async fn exchange(&mut self, data: &[u8], answer: &mut [u8])

Auto Trait Implementations§

§

impl<'a> Freeze for L6360_HW<'a>

§

impl<'a> !RefUnwindSafe for L6360_HW<'a>

§

impl<'a> Send for L6360_HW<'a>

§

impl<'a> Sync for L6360_HW<'a>

§

impl<'a> Unpin for L6360_HW<'a>

§

impl<'a> !UnwindSafe for L6360_HW<'a>

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

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.