[][src]Struct stm32f3xx_hal_v2::spi::Spi

pub struct Spi<SPI, PINS, WORD = u8> { /* fields omitted */ }

SPI peripheral operating in full duplex master mode

Implementations

impl<SCK, MISO, MOSI, WORD> Spi<SPI1, (SCK, MISO, MOSI), WORD>[src]

pub fn spi1<F>(
    spi: SPI1,
    pins: (SCK, MISO, MOSI),
    mode: Mode,
    freq: F,
    clocks: Clocks,
    apb2: &mut APB2
) -> Self where
    F: Into<Hertz>,
    SCK: SckPin<SPI1>,
    MISO: MisoPin<SPI1>,
    MOSI: MosiPin<SPI1>,
    WORD: Word
[src]

Configures the SPI peripheral to operate in full duplex master mode

pub fn free(self) -> (SPI1, (SCK, MISO, MOSI))[src]

Releases the SPI peripheral and associated pins

pub fn reclock<F>(&mut self, freq: F, clocks: Clocks) where
    F: Into<Hertz>, 
[src]

Change the baud rate of the SPI

impl<SCK, MISO, MOSI, WORD> Spi<SPI2, (SCK, MISO, MOSI), WORD>[src]

pub fn spi2<F>(
    spi: SPI2,
    pins: (SCK, MISO, MOSI),
    mode: Mode,
    freq: F,
    clocks: Clocks,
    apb2: &mut APB1
) -> Self where
    F: Into<Hertz>,
    SCK: SckPin<SPI2>,
    MISO: MisoPin<SPI2>,
    MOSI: MosiPin<SPI2>,
    WORD: Word
[src]

Configures the SPI peripheral to operate in full duplex master mode

pub fn free(self) -> (SPI2, (SCK, MISO, MOSI))[src]

Releases the SPI peripheral and associated pins

pub fn reclock<F>(&mut self, freq: F, clocks: Clocks) where
    F: Into<Hertz>, 
[src]

Change the baud rate of the SPI

impl<SCK, MISO, MOSI, WORD> Spi<SPI3, (SCK, MISO, MOSI), WORD>[src]

pub fn spi3<F>(
    spi: SPI3,
    pins: (SCK, MISO, MOSI),
    mode: Mode,
    freq: F,
    clocks: Clocks,
    apb2: &mut APB1
) -> Self where
    F: Into<Hertz>,
    SCK: SckPin<SPI3>,
    MISO: MisoPin<SPI3>,
    MOSI: MosiPin<SPI3>,
    WORD: Word
[src]

Configures the SPI peripheral to operate in full duplex master mode

pub fn free(self) -> (SPI3, (SCK, MISO, MOSI))[src]

Releases the SPI peripheral and associated pins

pub fn reclock<F>(&mut self, freq: F, clocks: Clocks) where
    F: Into<Hertz>, 
[src]

Change the baud rate of the SPI

Trait Implementations

impl<PINS, WORD> Default<WORD> for Spi<SPI1, PINS, WORD>[src]

impl<PINS, WORD> Default<WORD> for Spi<SPI2, PINS, WORD>[src]

impl<PINS, WORD> Default<WORD> for Spi<SPI3, PINS, WORD>[src]

impl<PINS, WORD> Default<WORD> for Spi<SPI1, PINS, WORD>[src]

impl<PINS, WORD> Default<WORD> for Spi<SPI2, PINS, WORD>[src]

impl<PINS, WORD> Default<WORD> for Spi<SPI3, PINS, WORD>[src]

impl<PINS, WORD> FullDuplex<WORD> for Spi<SPI1, PINS, WORD>[src]

type Error = Error

An enumeration of SPI errors

impl<PINS, WORD> FullDuplex<WORD> for Spi<SPI2, PINS, WORD>[src]

type Error = Error

An enumeration of SPI errors

impl<PINS, WORD> FullDuplex<WORD> for Spi<SPI3, PINS, WORD>[src]

type Error = Error

An enumeration of SPI errors

Auto Trait Implementations

impl<SPI, PINS, WORD> Send for Spi<SPI, PINS, WORD> where
    PINS: Send,
    SPI: Send,
    WORD: Send

impl<SPI, PINS, WORD> Sync for Spi<SPI, PINS, WORD> where
    PINS: Sync,
    SPI: Sync,
    WORD: Sync

impl<SPI, PINS, WORD> Unpin for Spi<SPI, PINS, WORD> where
    PINS: Unpin,
    SPI: Unpin,
    WORD: 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
    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