Embassy
embassy-stm32

Crates

git

Versions

stm32g484qe

Flavors

Struct embassy_stm32::qspi::Qspi

source ·
pub struct Qspi<'d, T: Instance, Dma> { /* private fields */ }
Expand description

QSPI driver.

Implementations§

source§

impl<'d, T: Instance, Dma> Qspi<'d, T, Dma>

source

pub fn new_bk1( peri: impl Peripheral<P = T> + 'd, d0: impl Peripheral<P = impl BK1D0Pin<T>> + 'd, d1: impl Peripheral<P = impl BK1D1Pin<T>> + 'd, d2: impl Peripheral<P = impl BK1D2Pin<T>> + 'd, d3: impl Peripheral<P = impl BK1D3Pin<T>> + 'd, sck: impl Peripheral<P = impl SckPin<T>> + 'd, nss: impl Peripheral<P = impl BK1NSSPin<T>> + 'd, dma: impl Peripheral<P = Dma> + 'd, config: Config ) -> Self

Create a new QSPI driver for bank 1.

source

pub fn new_bk2( peri: impl Peripheral<P = T> + 'd, d0: impl Peripheral<P = impl BK2D0Pin<T>> + 'd, d1: impl Peripheral<P = impl BK2D1Pin<T>> + 'd, d2: impl Peripheral<P = impl BK2D2Pin<T>> + 'd, d3: impl Peripheral<P = impl BK2D3Pin<T>> + 'd, sck: impl Peripheral<P = impl SckPin<T>> + 'd, nss: impl Peripheral<P = impl BK2NSSPin<T>> + 'd, dma: impl Peripheral<P = Dma> + 'd, config: Config ) -> Self

Create a new QSPI driver for bank 2.

source

pub fn command(&mut self, transaction: TransferConfig)

Do a QSPI command.

source

pub fn blocking_read(&mut self, buf: &mut [u8], transaction: TransferConfig)

Blocking read data.

source

pub fn blocking_write(&mut self, buf: &[u8], transaction: TransferConfig)

Blocking write data.

source

pub fn blocking_read_dma(&mut self, buf: &mut [u8], transaction: TransferConfig)
where Dma: QuadDma<T>,

Blocking read data, using DMA.

source

pub fn blocking_write_dma(&mut self, buf: &[u8], transaction: TransferConfig)
where Dma: QuadDma<T>,

Blocking write data, using DMA.

Auto Trait Implementations§

§

impl<'d, T, Dma> Freeze for Qspi<'d, T, Dma>
where T: Freeze, Dma: Freeze,

§

impl<'d, T, Dma> RefUnwindSafe for Qspi<'d, T, Dma>

§

impl<'d, T, Dma> Send for Qspi<'d, T, Dma>
where T: Send, Dma: Send,

§

impl<'d, T, Dma> Sync for Qspi<'d, T, Dma>
where T: Sync, Dma: Sync,

§

impl<'d, T, Dma> Unpin for Qspi<'d, T, Dma>
where T: Unpin, Dma: Unpin,

§

impl<'d, T, Dma> !UnwindSafe for Qspi<'d, T, Dma>

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.