Struct stm32f7xx_hal::qspi::Qspi
source · 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.
size
is log2(flash size in bytes), e.g. 16 MB = 24.adsize
is 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