pub struct SpiDevice<'a, Device: MpsseCmdExecutor> { /* private fields */ }
Expand description

FTDI SPI device, a SPI bus with chip select pin.

This is created by calling FtHal::spi_device.

This is specific to embedded-hal version 1.

Implementations

Set the SPI clock polarity.

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

Example
use eh1::spi::Polarity;
use ftdi_embedded_hal as hal;

let device = libftd2xx::Ft2232h::with_description("Dual RS232-HS A")?;
let hal = hal::FtHal::init_freq(device, 3_000_000)?;
let mut spi = hal.spi_device(3)?;
spi.set_clock_polarity(Polarity::IdleLow);

Trait Implementations

Formats the value using the given formatter. Read more

Error type

SPI Bus type for this device.

Perform a transaction against the device. Read more

Do a write within a transaction. Read more

Do a read within a transaction. Read more

Do a transfer within a transaction. Read more

Do an in-place transfer within a transaction. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.