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: QspiConfig
Implementations
sourceimpl 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
Auto Trait Implementations
impl RefUnwindSafe for Qspi
impl Send for Qspi
impl !Sync for Qspi
impl Unpin for Qspi
impl UnwindSafe for Qspi
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more