Struct alt_stm32f30x_hal::spi::Spi [−][src]
pub struct Spi<SPI, PINS> { /* fields omitted */ }
SPI peripheral operating in full duplex master mode
Methods
impl<SCK, MISO, MOSI> Spi<SPI1, (SCK, MISO, MOSI)>
[src]
impl<SCK, MISO, MOSI> Spi<SPI1, (SCK, MISO, MOSI)>
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>,
[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>,
Configures the SPI peripheral to operate in full duplex master mode
pub fn free(self) -> (SPI1, (SCK, MISO, MOSI))
[src]
pub fn free(self) -> (SPI1, (SCK, MISO, MOSI))
Releases the SPI peripheral and associated pins
impl<SCK, MISO, MOSI> Spi<SPI2, (SCK, MISO, MOSI)>
[src]
impl<SCK, MISO, MOSI> Spi<SPI2, (SCK, MISO, MOSI)>
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>,
[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>,
Configures the SPI peripheral to operate in full duplex master mode
pub fn free(self) -> (SPI2, (SCK, MISO, MOSI))
[src]
pub fn free(self) -> (SPI2, (SCK, MISO, MOSI))
Releases the SPI peripheral and associated pins
impl<SCK, MISO, MOSI> Spi<SPI3, (SCK, MISO, MOSI)>
[src]
impl<SCK, MISO, MOSI> Spi<SPI3, (SCK, MISO, MOSI)>
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>,
[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>,
Configures the SPI peripheral to operate in full duplex master mode
pub fn free(self) -> (SPI3, (SCK, MISO, MOSI))
[src]
pub fn free(self) -> (SPI3, (SCK, MISO, MOSI))
Releases the SPI peripheral and associated pins
Trait Implementations
impl<PINS> FullDuplex<u8> for Spi<SPI1, PINS>
[src]
impl<PINS> FullDuplex<u8> for Spi<SPI1, PINS>
type Error = Error
An enumeration of SPI errors
fn read(&mut self) -> Result<u8, Error>
[src]
fn read(&mut self) -> Result<u8, Error>
Reads the word stored in the shift register Read more
fn send(&mut self, byte: u8) -> Result<(), Error>
[src]
fn send(&mut self, byte: u8) -> Result<(), Error>
Sends a word to the slave
impl<PINS> Default<u8> for Spi<SPI1, PINS>
[src]
impl<PINS> Default<u8> for Spi<SPI1, PINS>
impl<PINS> Default<u8> for Spi<SPI1, PINS>
[src]
impl<PINS> Default<u8> for Spi<SPI1, PINS>
impl<PINS> FullDuplex<u8> for Spi<SPI2, PINS>
[src]
impl<PINS> FullDuplex<u8> for Spi<SPI2, PINS>
type Error = Error
An enumeration of SPI errors
fn read(&mut self) -> Result<u8, Error>
[src]
fn read(&mut self) -> Result<u8, Error>
Reads the word stored in the shift register Read more
fn send(&mut self, byte: u8) -> Result<(), Error>
[src]
fn send(&mut self, byte: u8) -> Result<(), Error>
Sends a word to the slave
impl<PINS> Default<u8> for Spi<SPI2, PINS>
[src]
impl<PINS> Default<u8> for Spi<SPI2, PINS>
impl<PINS> Default<u8> for Spi<SPI2, PINS>
[src]
impl<PINS> Default<u8> for Spi<SPI2, PINS>
impl<PINS> FullDuplex<u8> for Spi<SPI3, PINS>
[src]
impl<PINS> FullDuplex<u8> for Spi<SPI3, PINS>
type Error = Error
An enumeration of SPI errors
fn read(&mut self) -> Result<u8, Error>
[src]
fn read(&mut self) -> Result<u8, Error>
Reads the word stored in the shift register Read more
fn send(&mut self, byte: u8) -> Result<(), Error>
[src]
fn send(&mut self, byte: u8) -> Result<(), Error>
Sends a word to the slave
impl<PINS> Default<u8> for Spi<SPI3, PINS>
[src]
impl<PINS> Default<u8> for Spi<SPI3, PINS>
impl<PINS> Default<u8> for Spi<SPI3, PINS>
[src]
impl<PINS> Default<u8> for Spi<SPI3, PINS>