Trait embedded_hal::spi::blocking::Transfer [−][src]
pub trait Transfer<W = u8> {
type Error: Error;
fn transfer(
&mut self,
read: &mut [W],
write: &[W]
) -> Result<(), Self::Error>;
}Expand description
Blocking transfer with separate buffers
Associated Types
Required methods
Writes and reads simultaneously. write is written to the slave on MOSI and
words received on MISO are stored in read.
It is allowed for read and write to have different lengths, even zero length.
The transfer runs for max(read.len(), write.len()) words. If read is shorter,
incoming words after read has been filled will be discarded. If write is shorter,
the value of words sent in MOSI after all write has been sent is implementation-defined,
typically 0x00, 0xFF, or configurable.