stm32_hal2::qspi

Struct Qspi

Source
pub struct Qspi {
    pub regs: OCTOSPI1,
    pub cfg: QspiConfig,
}
Expand description

Represents a Quad Serial Peripheral Interface (QSPI) peripheral.

Fields§

§regs: OCTOSPI1§cfg: QspiConfig

Implementations§

Source§

impl Qspi

Source

pub fn new(regs: QUADSPI, cfg: QspiConfig, clocks: &Clocks) -> Self

Source

pub fn is_busy(&self) -> bool

Check if the QSPI peripheral is currently busy with a transaction

Source

pub fn enable_interrupt(&mut self, interrupt: QspiInterrupt)

Enable an interrupt

Source

pub fn clear_interrupt(&mut self, interrupt: QspiInterrupt)

Clear an interrupt flag

Source

pub fn write_indirect(&mut self, addr: u32, data: &[u8])

Perform a memory write in indirect mode.

Source

pub fn read_indirect( &mut self, addr: u32, buf: &mut [u8], ) -> Result<(), QspiError>

Perform a memory read in indirect mode.

Source

pub fn read_1_mem_mapped(&mut self, offset: isize) -> u32

Read one word from memory in memory-mapped mode

Auto Trait Implementations§

§

impl Freeze for Qspi

§

impl RefUnwindSafe for Qspi

§

impl Send for Qspi

§

impl !Sync for Qspi

§

impl Unpin for Qspi

§

impl UnwindSafe for Qspi

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>,

Source§

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>,

Source§

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.