embassy-stm32

Crates

git

Versions

stm32f750v8

Flavors

embassy_stm32::qspi

Struct 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 blocking_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 async fn read_dma(&mut self, buf: &mut [u8], transaction: TransferConfig)

Async read data, using DMA.

Source

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

Blocking write data, using DMA.

Source

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

Async 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>,

Source§

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>,

Source§

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.