pub struct Spi<'a, Device: FtdiCommon> { /* fields omitted */ }
Expand description
FTDI SPI interface.
This is created by calling FtHal::spi
.
Set the SPI clock polarity.
FTD2XX devices only supports SPI mode 0 and 2, clock phase is fixed.
use embedded_hal::spi::Polarity;
use ftd2xx_embedded_hal as hal;
let ftdi = hal::Ft232hHal::new()?.init_default()?;
let mut spi = ftdi.spi()?;
spi.set_clock_polarity(Polarity::IdleLow);
Formats the value using the given formatter. Read more
An enumeration of SPI errors
Reads the word stored in the shift register Read more
Sends a word to the slave
Sends words
to the slave. Returns the words
received from the slave
Sends words
to the slave, ignoring all the incoming words
impl<'a, Device> Send for Spi<'a, Device> where
Device: Send,
impl<'a, Device> Sync for Spi<'a, Device> where
Device: Send,
impl<'a, Device> Unpin for Spi<'a, Device>
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.