[−][src]Trait trinket_m0::prelude::_embedded_hal_spi_FullDuplex
Full duplex (master mode)
Notes
-
It's the task of the user of this interface to manage the slave select lines
-
Due to how full duplex SPI works each
read
call must be preceded by asend
call. -
Some SPIs can work with 8-bit and 16-bit words. You can overload this trait with different
Word
types to allow operation in both modes.
Associated Types
Loading content...Required methods
pub fn read(&mut self) -> Result<Word, Error<Self::Error>>
[src]
Reads the word stored in the shift register
NOTE A word must be sent to the slave before attempting to call this method.
pub fn send(&mut self, word: Word) -> Result<(), Error<Self::Error>>
[src]
Sends a word to the slave
Implementations on Foreign Types
impl<Miso, Mosi, Sck, Timer, E> FullDuplex<u8> for SPI<Miso, Mosi, Sck, Timer> where
Miso: InputPin<Error = E>,
Mosi: OutputPin<Error = E>,
Sck: OutputPin<Error = E>,
Timer: CountDown + Periodic,
[src]
Miso: InputPin<Error = E>,
Mosi: OutputPin<Error = E>,
Sck: OutputPin<Error = E>,
Timer: CountDown + Periodic,
type Error = Error<E>
pub fn read(
&mut self
) -> Result<u8, Error<<SPI<Miso, Mosi, Sck, Timer> as FullDuplex<u8>>::Error>>
[src]
&mut self
) -> Result<u8, Error<<SPI<Miso, Mosi, Sck, Timer> as FullDuplex<u8>>::Error>>
pub fn send(
&mut self,
byte: u8
) -> Result<(), Error<<SPI<Miso, Mosi, Sck, Timer> as FullDuplex<u8>>::Error>>
[src]
&mut self,
byte: u8
) -> Result<(), Error<<SPI<Miso, Mosi, Sck, Timer> as FullDuplex<u8>>::Error>>