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>
impl<'d, T: Instance, Dma> Qspi<'d, T, Dma>
sourcepub 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
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.
sourcepub 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
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.
sourcepub fn command(&mut self, transaction: TransferConfig)
pub fn command(&mut self, transaction: TransferConfig)
Do a QSPI command.
sourcepub fn blocking_read(&mut self, buf: &mut [u8], transaction: TransferConfig)
pub fn blocking_read(&mut self, buf: &mut [u8], transaction: TransferConfig)
Blocking read data.
sourcepub fn blocking_write(&mut self, buf: &[u8], transaction: TransferConfig)
pub fn blocking_write(&mut self, buf: &[u8], transaction: TransferConfig)
Blocking write data.
sourcepub fn blocking_read_dma(&mut self, buf: &mut [u8], transaction: TransferConfig)where
Dma: QuadDma<T>,
pub fn blocking_read_dma(&mut self, buf: &mut [u8], transaction: TransferConfig)where
Dma: QuadDma<T>,
Blocking read data, using DMA.
sourcepub fn blocking_write_dma(&mut self, buf: &[u8], transaction: TransferConfig)where
Dma: QuadDma<T>,
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> RefUnwindSafe for Qspi<'d, T, Dma>where
Dma: RefUnwindSafe,
T: RefUnwindSafe,
impl<'d, T, Dma> Send for Qspi<'d, T, Dma>
impl<'d, T, Dma> Sync for Qspi<'d, T, Dma>
impl<'d, T, Dma> Unpin for Qspi<'d, T, Dma>
impl<'d, T, Dma> !UnwindSafe for Qspi<'d, T, Dma>
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