Struct stm32f4xx_hal::spi::Inner

source ·
pub struct Inner<SPI: Instance> { /* private fields */ }

Implementations§

source§

impl<SPI: Instance> Inner<SPI>

source

pub fn enable(&mut self, enable: bool)

Enable/disable spi

source

pub fn bit_format(&mut self, format: BitFormat)

Select which frame format is used for data transfers

source

pub fn is_tx_empty(&self) -> bool

Return true if the TXE flag is set, i.e. new data to transmit can be written to the SPI.

source

pub fn is_rx_not_empty(&self) -> bool

Return true if the RXNE flag is set, i.e. new data has been received and can be read from the SPI.

source

pub fn is_modf(&self) -> bool

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)

source

pub fn is_busy(&self) -> bool

Returns true if the transfer is in progress

source

pub fn is_overrun(&self) -> bool

Return true if the OVR flag is set, i.e. new data has been received while the receive data register was already filled.

Trait Implementations§

source§

impl<SPI: Instance> ClearFlags for Inner<SPI>

§

type Flag = CFlag

Enum of manually clearable flags
source§

fn clear_flags(&mut self, flags: impl Into<BitFlags<Self::Flag>>)

Clear interrupts flags with Self::Flagss Read more
source§

fn clear_all_flags(&mut self)

Clears all interrupts flags
source§

impl<SPI: Debug + Instance> Debug for Inner<SPI>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<SPI: Instance> Listen for Inner<SPI>

§

type Event = Event

Enum of bit flags associated with events
source§

fn listen(&mut self, event: impl Into<BitFlags<Self::Event>>)

Start listening for Events Read more
source§

fn listen_only(&mut self, event: impl Into<BitFlags<Self::Event>>)

Start listening for Events, stop all other Read more
source§

fn unlisten(&mut self, event: impl Into<BitFlags<Self::Event>>)

Stop listening for Events
source§

fn listen_all(&mut self)

Start listening all Events
source§

fn unlisten_all(&mut self)

Stop listening all Events
source§

impl<SPI: Instance> ReadFlags for Inner<SPI>

§

type Flag = Flag

Enum of bit flags
source§

fn flags(&self) -> BitFlags<Self::Flag>

Get all interrupts flags a once.

Auto Trait Implementations§

§

impl<SPI> RefUnwindSafe for Inner<SPI>
where SPI: RefUnwindSafe,

§

impl<SPI> Send for Inner<SPI>
where SPI: Send,

§

impl<SPI> Sync for Inner<SPI>
where SPI: Sync,

§

impl<SPI> Unpin for Inner<SPI>
where SPI: Unpin,

§

impl<SPI> UnwindSafe for Inner<SPI>
where SPI: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.