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

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

SPI peripheral operating in full duplex master mode

Implementations

impl Spi<SPI1>[src]

pub fn new_spi1<C: ClockCfg>(
    spi: SPI1,
    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

impl Spi<SPI2>[src]

pub fn new_spi2<C: ClockCfg>(
    spi: SPI2,
    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

impl Spi<SPI3>[src]

pub fn new_spi3<C: ClockCfg>(
    spi: SPI3,
    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 Default<u8> for Spi<SPI1>[src]

impl Default<u8> for Spi<SPI2>[src]

impl Default<u8> for Spi<SPI3>[src]

impl Default<u8> for Spi<SPI1>[src]

impl Default<u8> for Spi<SPI2>[src]

impl Default<u8> for Spi<SPI3>[src]

impl FullDuplex<u8> for Spi<SPI1>[src]

type Error = Error

An enumeration of SPI errors

impl FullDuplex<u8> for Spi<SPI2>[src]

type Error = Error

An enumeration of SPI errors

impl FullDuplex<u8> for Spi<SPI3>[src]

type Error = Error

An enumeration of SPI errors

Auto Trait Implementations

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

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

impl<SPI> Unpin for Spi<SPI> where
    SPI: 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<T> Same<T> for T

type Output = T

Should always be Self

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

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

Error type