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
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 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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more