Struct stm32f103xx_hal::spi::Spi
[−]
[src]
pub struct Spi<SPI, PINS> { /* fields omitted */ }
Methods
impl<PINS> Spi<SPI1, PINS>
[src]
pub fn spi1<F>(
spi: SPI1,
pins: PINS,
mapr: &mut MAPR,
mode: Mode,
freq: F,
clocks: Clocks,
apb: &mut APB2
) -> Self where
F: Into<Hertz>,
PINS: Pins<SPI1>,
[src]
spi: SPI1,
pins: PINS,
mapr: &mut MAPR,
mode: Mode,
freq: F,
clocks: Clocks,
apb: &mut APB2
) -> Self where
F: Into<Hertz>,
PINS: Pins<SPI1>,
impl<PINS> Spi<SPI2, PINS>
[src]
pub fn spi2<F>(
spi: SPI2,
pins: PINS,
mode: Mode,
freq: F,
clocks: Clocks,
apb: &mut APB1
) -> Self where
F: Into<Hertz>,
PINS: Pins<SPI2>,
[src]
spi: SPI2,
pins: PINS,
mode: Mode,
freq: F,
clocks: Clocks,
apb: &mut APB1
) -> Self where
F: Into<Hertz>,
PINS: Pins<SPI2>,
impl<PINS> Spi<SPI1, PINS>
[src]
impl<PINS> Spi<SPI2, PINS>
[src]
Trait Implementations
impl<PINS> FullDuplex<u8> for Spi<SPI1, PINS>
[src]
type Error = Error
An enumeration of SPI errors
fn read(&mut self) -> Result<u8, Error>
[src]
Reads the word stored in the shift register Read more
fn send(&mut self, byte: u8) -> Result<(), Error>
[src]
Sends a word to the slave
impl<PINS> Default<u8> for Spi<SPI1, PINS>
[src]
impl<PINS> Default<u8> for Spi<SPI1, PINS>
[src]
impl<PINS> FullDuplex<u8> for Spi<SPI2, PINS>
[src]
type Error = Error
An enumeration of SPI errors
fn read(&mut self) -> Result<u8, Error>
[src]
Reads the word stored in the shift register Read more
fn send(&mut self, byte: u8) -> Result<(), Error>
[src]
Sends a word to the slave