pub struct SpiBusDriver<'d, T>where
    T: BorrowMut<SpiDriver<'d>>,{ /* private fields */ }Implementations§
Source§impl<'d, T> SpiBusDriver<'d, T>where
    T: BorrowMut<SpiDriver<'d>>,
 
impl<'d, T> SpiBusDriver<'d, T>where
    T: BorrowMut<SpiDriver<'d>>,
pub fn new(driver: T, config: &Config) -> Result<SpiBusDriver<'d, T>, EspError>
pub fn read(&mut self, words: &mut [u8]) -> Result<(), EspError>
pub fn write(&mut self, words: &[u8]) -> Result<(), EspError>
pub fn transfer( &mut self, read: &mut [u8], write: &[u8], ) -> Result<(), EspError>
pub fn transfer_in_place(&mut self, words: &mut [u8]) -> Result<(), EspError>
pub fn flush(&mut self) -> Result<(), EspError>
Trait Implementations§
Source§impl<'d, T> Drop for SpiBusDriver<'d, T>where
    T: BorrowMut<SpiDriver<'d>>,
 
impl<'d, T> Drop for SpiBusDriver<'d, T>where
    T: BorrowMut<SpiDriver<'d>>,
Source§impl<'d, T> ErrorType for SpiBusDriver<'d, T>where
    T: BorrowMut<SpiDriver<'d>>,
 
impl<'d, T> ErrorType for SpiBusDriver<'d, T>where
    T: BorrowMut<SpiDriver<'d>>,
Source§impl<'d, T> SpiBus for SpiBusDriver<'d, T>where
    T: BorrowMut<SpiDriver<'d>>,
 
impl<'d, T> SpiBus for SpiBusDriver<'d, T>where
    T: BorrowMut<SpiDriver<'d>>,
Source§fn read(
    &mut self,
    words: &mut [u8],
) -> Result<(), <SpiBusDriver<'d, T> as ErrorType>::Error>
 
fn read( &mut self, words: &mut [u8], ) -> Result<(), <SpiBusDriver<'d, T> as ErrorType>::Error>
Read 
words from the slave. Read moreSource§fn write(
    &mut self,
    words: &[u8],
) -> Result<(), <SpiBusDriver<'d, T> as ErrorType>::Error>
 
fn write( &mut self, words: &[u8], ) -> Result<(), <SpiBusDriver<'d, T> as ErrorType>::Error>
Write 
words to the slave, ignoring all the incoming words. Read moreSource§fn flush(&mut self) -> Result<(), <SpiBusDriver<'d, T> as ErrorType>::Error>
 
fn flush(&mut self) -> Result<(), <SpiBusDriver<'d, T> as ErrorType>::Error>
Wait until all operations have completed and the bus is idle. Read more
Source§fn transfer(
    &mut self,
    read: &mut [u8],
    write: &[u8],
) -> Result<(), <SpiBusDriver<'d, T> as ErrorType>::Error>
 
fn transfer( &mut self, read: &mut [u8], write: &[u8], ) -> Result<(), <SpiBusDriver<'d, T> as ErrorType>::Error>
Write and read simultaneously. 
write is written to the slave on MOSI and
words received on MISO are stored in read. Read moreSource§fn transfer_in_place(
    &mut self,
    words: &mut [u8],
) -> Result<(), <SpiBusDriver<'d, T> as ErrorType>::Error>
 
fn transfer_in_place( &mut self, words: &mut [u8], ) -> Result<(), <SpiBusDriver<'d, T> as ErrorType>::Error>
Write and read simultaneously. The contents of 
words are
written to the slave, and the received words are stored into the same
words buffer, overwriting it. Read more