Embassy
embassy-stm32

Crates

git

Versions

stm32g474me

Flavors

Struct embassy_stm32::qspi::Qspi

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

QSPI driver.

Implementations§

source§

impl<'d, T: Instance, M: PeriMode> Qspi<'d, T, M>

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§

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

source

pub fn new_blocking_bank1( 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, config: Config ) -> Self

Create a new QSPI driver for bank 1, in blocking mode.

source

pub fn new_blocking_bank2( 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, config: Config ) -> Self

Create a new QSPI driver for bank 2, in blocking mode.

source§

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

source

pub fn new_bank1( 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 = impl QuadDma<T>> + 'd, config: Config ) -> Self

Create a new QSPI driver for bank 1.

source

pub fn new_bank2( 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 = impl QuadDma<T>> + 'd, config: Config ) -> Self

Create a new QSPI driver for bank 2.

source

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

Blocking read data, using DMA.

source

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

Blocking write data, using DMA.

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

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.