[][src]Struct bitbang_hal::spi::SPI

pub struct SPI<Miso, Mosi, Sck, Timer> where
    Miso: InputPin,
    Mosi: OutputPin,
    Sck: OutputPin,
    Timer: CountDown + Periodic
{ /* fields omitted */ }

A Full-Duplex SPI implementation, takes 3 pins, and a timer running at 2x the desired SPI frequency.

Methods

impl<Miso, Mosi, Sck, Timer> SPI<Miso, Mosi, Sck, Timer> where
    Miso: InputPin,
    Mosi: OutputPin,
    Sck: OutputPin,
    Timer: CountDown + Periodic
[src]

pub fn new(mode: Mode, miso: Miso, mosi: Mosi, sck: Sck, timer: Timer) -> Self[src]

Trait Implementations

impl<Miso, Mosi, Sck, Timer> Default<u8> for SPI<Miso, Mosi, Sck, Timer> where
    Miso: InputPin,
    Mosi: OutputPin,
    Sck: OutputPin,
    Timer: CountDown + Periodic
[src]

impl<Miso, Mosi, Sck, Timer> Default<u8> for SPI<Miso, Mosi, Sck, Timer> where
    Miso: InputPin,
    Mosi: OutputPin,
    Sck: OutputPin,
    Timer: CountDown + Periodic
[src]

impl<Miso, Mosi, Sck, Timer> FullDuplex<u8> for SPI<Miso, Mosi, Sck, Timer> where
    Miso: InputPin,
    Mosi: OutputPin,
    Sck: OutputPin,
    Timer: CountDown + Periodic
[src]

type Error = Error

An enumeration of SPI errors

Auto Trait Implementations

impl<Miso, Mosi, Sck, Timer> Send for SPI<Miso, Mosi, Sck, Timer> where
    Miso: Send,
    Mosi: Send,
    Sck: Send,
    Timer: Send

impl<Miso, Mosi, Sck, Timer> Sync for SPI<Miso, Mosi, Sck, Timer> where
    Miso: Sync,
    Mosi: Sync,
    Sck: Sync,
    Timer: Sync

Blanket Implementations

impl<T> From<T> for 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> Into<U> for T where
    U: From<T>, 
[src]

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.

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

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

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

impl<W, S> Transfer<W> for S where
    S: Default<W>,
    W: Clone
[src]

type Error = <S as FullDuplex<W>>::Error

Error type

impl<W, S> Write<W> for S where
    S: Default<W>,
    W: Clone
[src]

type Error = <S as FullDuplex<W>>::Error

Error type