[][src]Struct embedded_spi::mock::Spi

pub struct Spi { /* fields omitted */ }

Mock Transactional SPI implementation

Trait Implementations

impl Transactional for Spi[src]

type Error = Error<(), ()>

fn spi_read(
    &mut self,
    prefix: &[u8],
    data: &mut [u8]
) -> Result<(), Self::Error>
[src]

Read data from a specified address This consumes the provided input data array and returns a reference to this on success

fn spi_write(&mut self, prefix: &[u8], data: &[u8]) -> Result<(), Self::Error>[src]

Write data to a specified register address

fn spi_exec(
    &mut self,
    transactions: &mut [Transaction]
) -> Result<(), Self::Error>
[src]

Execute the provided transactions

impl Busy for Spi[src]

type Error = Error<(), ()>

fn get_busy(&mut self) -> Result<PinState, Self::Error>[src]

Check peripheral busy status

impl Reset for Spi[src]

type Error = Error<(), ()>

fn set_reset(&mut self, state: PinState) -> Result<(), Self::Error>[src]

Check peripheral ready status

impl Ready for Spi[src]

type Error = Error<(), ()>

fn get_ready(&mut self) -> Result<PinState, Self::Error>[src]

Check peripheral ready status

impl Debug for Spi[src]

impl Clone for Spi[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl DelayMs<u32> for Spi[src]

impl Transfer<u8> for Spi[src]

type Error = Error<(), ()>

Error type

impl Write<u8> for Spi[src]

type Error = Error<(), ()>

Error type

Auto Trait Implementations

impl Send for Spi

impl Sync for Spi

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<W, S> Transfer<W> for S where
    S: Default<W>,
    W: Clone
[src]

type Error = <S as FullDuplex<W>>::Error

Error type

impl<W, S> Write<W> for S where
    S: Default<W>,
    W: Clone
[src]

type Error = <S as FullDuplex<W>>::Error

Error type