[−][src]Struct nucleo_f401re::spi::Spi
Methods
impl<PINS> Spi<SPI1, PINS>
[src]
pub fn spi1(
spi: SPI1,
pins: PINS,
mode: Mode,
freq: Hertz,
clocks: Clocks
) -> Spi<SPI1, PINS> where
PINS: Pins<SPI1>,
[src]
spi: SPI1,
pins: PINS,
mode: Mode,
freq: Hertz,
clocks: Clocks
) -> Spi<SPI1, PINS> where
PINS: Pins<SPI1>,
impl<PINS> Spi<SPI2, PINS>
[src]
pub fn spi2(
spi: SPI2,
pins: PINS,
mode: Mode,
freq: Hertz,
clocks: Clocks
) -> Spi<SPI2, PINS> where
PINS: Pins<SPI2>,
[src]
spi: SPI2,
pins: PINS,
mode: Mode,
freq: Hertz,
clocks: Clocks
) -> Spi<SPI2, PINS> where
PINS: Pins<SPI2>,
impl<PINS> Spi<SPI3, PINS>
[src]
pub fn spi3(
spi: SPI3,
pins: PINS,
mode: Mode,
freq: Hertz,
clocks: Clocks
) -> Spi<SPI3, PINS> where
PINS: Pins<SPI3>,
[src]
spi: SPI3,
pins: PINS,
mode: Mode,
freq: Hertz,
clocks: Clocks
) -> Spi<SPI3, PINS> where
PINS: Pins<SPI3>,
impl<PINS> Spi<SPI4, PINS>
[src]
pub fn spi4(
spi: SPI4,
pins: PINS,
mode: Mode,
freq: Hertz,
clocks: Clocks
) -> Spi<SPI4, PINS> where
PINS: Pins<SPI4>,
[src]
spi: SPI4,
pins: PINS,
mode: Mode,
freq: Hertz,
clocks: Clocks
) -> Spi<SPI4, PINS> where
PINS: Pins<SPI4>,
impl<SPI, PINS> Spi<SPI, PINS> where
SPI: Deref<Target = RegisterBlock>,
[src]
SPI: Deref<Target = RegisterBlock>,
pub fn init(self, mode: Mode, freq: Hertz, clock: Hertz) -> Spi<SPI, PINS>
[src]
pub fn listen(&mut self, event: Event)
[src]
Enable interrupts for the given event
:
- Received data ready to be read (RXNE)
- Transmit data register empty (TXE)
- Transfer error
pub fn unlisten(&mut self, event: Event)
[src]
Disable interrupts for the given event
:
- Received data ready to be read (RXNE)
- Transmit data register empty (TXE)
- Transfer error
pub fn is_txe(&self) -> bool
[src]
Return true
if the TXE flag is set, i.e. new data to transmit
can be written to the SPI.
pub fn is_rxne(&self) -> bool
[src]
Return true
if the RXNE flag is set, i.e. new data has been received
and can be read from the SPI.
pub fn is_modf(&self) -> bool
[src]
Return true
if the MODF flag is set, i.e. the SPI has experienced a
Master Mode Fault. (see chapter 28.3.10 of the STM32F4 Reference Manual)
pub fn is_ovr(&self) -> bool
[src]
Return true
if the OVR flag is set, i.e. new data has been received
while the receive data register was already filled.
pub fn free(self) -> (SPI, PINS)
[src]
Trait Implementations
impl<SPI, PINS> Default<u8> for Spi<SPI, PINS> where
SPI: Deref<Target = RegisterBlock>,
[src]
SPI: Deref<Target = RegisterBlock>,
impl<SPI, PINS> Default<u8> for Spi<SPI, PINS> where
SPI: Deref<Target = RegisterBlock>,
[src]
SPI: Deref<Target = RegisterBlock>,
impl<SPI, PINS> Debug for Spi<SPI, PINS> where
PINS: Debug,
SPI: Debug,
[src]
PINS: Debug,
SPI: Debug,
impl<SPI, PINS> FullDuplex<u8> for Spi<SPI, PINS> where
SPI: Deref<Target = RegisterBlock>,
[src]
SPI: Deref<Target = RegisterBlock>,
Auto Trait Implementations
impl<SPI, PINS> Send for Spi<SPI, PINS> where
PINS: Send,
SPI: Send,
PINS: Send,
SPI: Send,
impl<SPI, PINS> Sync for Spi<SPI, PINS> where
PINS: Sync,
SPI: Sync,
PINS: Sync,
SPI: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto 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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<W, S> Write for S where
S: Default<W>,
W: Clone,
[src]
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
Error type
fn write(&mut self, words: &[W]) -> Result<(), <S as FullDuplex<W>>::Error>
[src]
impl<W, S> Transfer for S where
S: Default<W>,
W: Clone,
[src]
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
Error type
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> Same for T
type Output = T
Should always be Self