Struct ftd2xx_embedded_hal::Spi[][src]

pub struct Spi<'a> { /* fields omitted */ }

FTDI SPI interface.

This is created by calling Ft232hHal::spi.

Implementations

impl<'a> Spi<'a>[src]

pub fn set_clock_polarity(&mut self, cpol: Polarity)[src]

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

impl<'a> Debug for Spi<'a>[src]

impl<'a> FullDuplex<u8> for Spi<'a>[src]

type Error = TimeoutError

An enumeration of SPI errors

impl<'a> Transfer<u8> for Spi<'a>[src]

type Error = TimeoutError

Error type

impl<'a> Write<u8> for Spi<'a>[src]

type Error = TimeoutError

Error type

Auto Trait Implementations

impl<'a> RefUnwindSafe for Spi<'a>

impl<'a> !Send for Spi<'a>

impl<'a> !Sync for Spi<'a>

impl<'a> Unpin for Spi<'a>

impl<'a> UnwindSafe for Spi<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.