Trait embedded_hal_async::spi::SpiBusRead
source · [−]pub trait SpiBusRead<Word: 'static + Copy = u8>: SpiBusFlush {
type ReadFuture<'a>: Future<Output = Result<(), Self::Error>>
where
Self: 'a;
fn read<'a>(&'a mut self, words: &'a mut [Word]) -> Self::ReadFuture<'a>;
}
Expand description
Read-only SPI bus
Required Associated Types
Required Methods
fn read<'a>(&'a mut self, words: &'a mut [Word]) -> Self::ReadFuture<'a>
fn read<'a>(&'a mut self, words: &'a mut [Word]) -> Self::ReadFuture<'a>
Read words
from the slave.
The word value sent on MOSI during reading is implementation-defined,
typically 0x00
, 0xFF
, or configurable.
Implementations are allowed to return before the operation is complete. See (the docs on embedded-hal)embedded_hal::spi::blocking for details on flushing.