Struct stm32_hal2::spi::Spi[][src]

pub struct Spi<S> { /* fields omitted */ }

SPI peripheral operating in full duplex master mode

Implementations

impl<S> Spi<S> where
    S: Deref<Target = RegisterBlock>, 
[src]

pub fn new<C: ClockCfg>(
    regs: S,
    device: SpiDevice,
    mode: Mode,
    freq: u32,
    clocks: &C,
    rcc: &mut RCC
) -> Self
[src]

Configures the SPI peripheral to operate in full duplex master mode

pub fn reclock<F, C: ClockCfg>(&mut self, freq: u32, clocks: C)[src]

Change the baud rate of the SPI

Trait Implementations

impl<S> Default<u8> for Spi<S> where
    S: Deref<Target = RegisterBlock>, 
[src]

impl<S> Default<u8> for Spi<S> where
    S: Deref<Target = RegisterBlock>, 
[src]

impl<S> FullDuplex<u8> for Spi<S> where
    S: Deref<Target = RegisterBlock>, 
[src]

type Error = Error

An enumeration of SPI errors

Auto Trait Implementations

impl<S> Send for Spi<S> where
    S: Send

impl<S> Sync for Spi<S> where
    S: Sync

impl<S> Unpin for Spi<S> where
    S: Unpin

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<W, S> Transfer<W> for S where
    S: Default<W>,
    W: Clone
[src]

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

Error type

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.

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

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

Error type