[−][src]Struct embedded_spi::mock::Spi
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]
&mut self,
prefix: &[u8],
data: &mut [u8]
) -> Result<(), Self::Error>
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]
&mut self,
transactions: &mut [Transaction]
) -> Result<(), Self::Error>
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 Clone for Spi
[src]
fn clone(&self) -> Spi
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Spi
[src]
impl DelayMs<u32> for Spi
[src]
impl Transfer<u8> for Spi
[src]
type Error = Error<(), ()>
Error type
fn transfer<'w>(&mut self, data: &'w mut [u8]) -> Result<&'w [u8], Self::Error>
[src]
impl Write<u8> for Spi
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<W, S> Transfer<W> for S where
S: Default<W>,
W: Clone,
[src]
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
Error type
fn transfer(
&mut self,
words: &'w mut [W]
) -> Result<&'w [W], <S as FullDuplex<W>>::Error>
[src]
&mut self,
words: &'w mut [W]
) -> Result<&'w [W], <S as FullDuplex<W>>::Error>
impl<W, S> Write<W> for S where
S: Default<W>,
W: Clone,
[src]
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
Error type