Struct stm32_hal2::qspi::Qspi
source · pub struct Qspi {
pub regs: QUADSPI,
pub cfg: QspiConfig,
}Expand description
Represents a Quad Serial Peripheral Interface (QSPI) peripheral.
Fields§
§regs: QUADSPI§cfg: QspiConfigImplementations§
source§impl Qspi
impl Qspi
pub fn new(regs: QUADSPI, cfg: QspiConfig, clocks: &Clocks) -> Self
sourcepub fn is_busy(&self) -> bool
pub fn is_busy(&self) -> bool
Check if the QSPI peripheral is currently busy with a transaction
sourcepub fn enable_interrupt(&mut self, interrupt: QspiInterrupt)
pub fn enable_interrupt(&mut self, interrupt: QspiInterrupt)
Enable an interrupt
sourcepub fn clear_interrupt(&mut self, interrupt: QspiInterrupt)
pub fn clear_interrupt(&mut self, interrupt: QspiInterrupt)
Clear an interrupt flag
sourcepub fn write_indirect(&mut self, addr: u32, data: &[u8])
pub fn write_indirect(&mut self, addr: u32, data: &[u8])
Perform a memory write in indirect mode.
sourcepub fn read_indirect(
&mut self,
addr: u32,
buf: &mut [u8]
) -> Result<(), QspiError>
pub fn read_indirect( &mut self, addr: u32, buf: &mut [u8] ) -> Result<(), QspiError>
Perform a memory read in indirect mode.
sourcepub fn read_1_mem_mapped(&mut self, offset: isize) -> u32
pub fn read_1_mem_mapped(&mut self, offset: isize) -> u32
Read one word from memory in memory-mapped mode