[−][src]Struct stm32f3xx_hal_v2::spi::Spi
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]
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,
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]
F: Into<Hertz>,
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]
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,
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]
F: Into<Hertz>,
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]
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,
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]
F: Into<Hertz>,
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
fn read(&mut self) -> Result<WORD, Error>
[src]
fn send(&mut self, word: WORD) -> Result<(), Error>
[src]
impl<PINS, WORD> FullDuplex<WORD> for Spi<SPI2, PINS, WORD>
[src]
type Error = Error
An enumeration of SPI errors
fn read(&mut self) -> Result<WORD, Error>
[src]
fn send(&mut self, word: WORD) -> Result<(), Error>
[src]
impl<PINS, WORD> FullDuplex<WORD> for Spi<SPI3, PINS, WORD>
[src]
Auto Trait Implementations
impl<SPI, PINS, WORD> Send for Spi<SPI, PINS, WORD> where
PINS: Send,
SPI: Send,
WORD: Send,
PINS: Send,
SPI: Send,
WORD: Send,
impl<SPI, PINS, WORD> Sync for Spi<SPI, PINS, WORD> where
PINS: Sync,
SPI: Sync,
WORD: Sync,
PINS: Sync,
SPI: Sync,
WORD: Sync,
impl<SPI, PINS, WORD> Unpin for Spi<SPI, PINS, WORD> where
PINS: Unpin,
SPI: Unpin,
WORD: Unpin,
PINS: Unpin,
SPI: Unpin,
WORD: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
Error type
pub fn transfer(
&mut self,
words: &'w mut [W]
) -> Result<&'w [W], <S as FullDuplex<W>>::Error>
[src]
&mut self,
words: &'w mut [W]
) -> Result<&'w [W], <S as FullDuplex<W>>::Error>
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<W, S> Write<W> for S where
S: Default<W>,
W: Clone,
[src]
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
Error type