Struct ftd2xx_embedded_hal::Spi[][src]

pub struct Spi<'a, Device: FtdiCommon> { /* fields omitted */ }
Expand description

FTDI SPI interface.

This is created by calling FtHal::spi.

Implementations

Set the SPI clock polarity.

FTD2XX devices only supports SPI mode 0 and 2, clock phase is fixed.

Example

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);

Trait Implementations

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

Error type

Sends words to the slave. Returns the words received from the slave

Error type

Sends words to the slave, ignoring all the incoming words

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.