pub struct Qspi { /* private fields */ }Expand description
The QSPI driver interface.
Implementations§
Source§impl Qspi
impl Qspi
Sourcepub fn new(_rcc: &mut RCC, qspi: QUADSPI, size: u8, adsize: u8) -> Self
pub fn new(_rcc: &mut RCC, qspi: QUADSPI, size: u8, adsize: u8) -> Self
Initialize and configure the QSPI flash driver.
sizeis log2(flash size in bytes), e.g. 16 MB = 24.adsizeis the number of bytes needed to specify the address (1, 2, 3, or 4).
Sourcepub fn read_all<B>(
&mut self,
data: Pin<B>,
transaction: QspiTransaction,
dma: &Handle<<RxTx<QUADSPI> as Target>::Instance, Enabled>,
stream: <RxTx<QUADSPI> as Target>::Stream,
) -> Result<Transfer<RxTx<QUADSPI>, B, Started>, Error>
pub fn read_all<B>( &mut self, data: Pin<B>, transaction: QspiTransaction, dma: &Handle<<RxTx<QUADSPI> as Target>::Instance, Enabled>, stream: <RxTx<QUADSPI> as Target>::Stream, ) -> Result<Transfer<RxTx<QUADSPI>, B, Started>, Error>
DMA read. Wrapper around the HAL DMA driver. Performs QSPI register programming, creates a
DMA transfer from peripheral to memory, and starts the transfer. Caller can use the DMA
wait API to block until the transfer is complete.
Sourcepub fn write_all<B>(
&mut self,
data: Pin<B>,
transaction: QspiTransaction,
dma: &Handle<<RxTx<QUADSPI> as Target>::Instance, Enabled>,
stream: <RxTx<QUADSPI> as Target>::Stream,
) -> Result<Transfer<RxTx<QUADSPI>, B, Started>, Error>
pub fn write_all<B>( &mut self, data: Pin<B>, transaction: QspiTransaction, dma: &Handle<<RxTx<QUADSPI> as Target>::Instance, Enabled>, stream: <RxTx<QUADSPI> as Target>::Stream, ) -> Result<Transfer<RxTx<QUADSPI>, B, Started>, Error>
DMA write. Wrapper around the HAL DMA driver. Performs QSPI register programming, creates a
DMA transfer from memory to peripheral, and starts the transfer. Caller can use the DMA
wait API to block until the transfer is complete.
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