Struct stm32f7xx_hal::qspi::Qspi

source ·
pub struct Qspi { /* private fields */ }
Expand description

The QSPI driver interface.

Implementations§

source§

impl Qspi

source

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).
source

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>
where B: Deref + 'static, B::Target: AsSlice<Element = u8>,

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.

source

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>
where B: Deref + 'static, B::Target: AsSlice<Element = u8>,

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.

source

pub fn read( &mut self, buf: &mut [u8], transaction: QspiTransaction, ) -> Result<(), Error>

Polling indirect read. Can also be used to perform transactions with no data.

source

pub fn write( &mut self, buf: &[u8], transaction: QspiTransaction, ) -> Result<(), Error>

Polling indirect write.

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.