pub struct SpiDma<'d, Dm>where
Dm: DriverMode,{ /* private fields */ }
unstable
only.Expand description
A DMA capable SPI instance.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Implementations§
Source§impl<Dm> SpiDma<'_, Dm>where
Dm: DriverMode,
impl<Dm> SpiDma<'_, Dm>where
Dm: DriverMode,
Sourcepub fn write<'t, TXBUF>(
&'t mut self,
words: &'t TXBUF,
) -> Result<DmaTransferTx<'t, Self>, Error>where
TXBUF: ReadBuffer,
pub fn write<'t, TXBUF>(
&'t mut self,
words: &'t TXBUF,
) -> Result<DmaTransferTx<'t, Self>, Error>where
TXBUF: ReadBuffer,
Register a buffer for a DMA write.
This will return a DmaTransferTx. The maximum amount of data to be sent is 32736 bytes.
The write is driven by the SPI master’s sclk signal and cs line.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn read<'t, RXBUF>(
&'t mut self,
words: &'t mut RXBUF,
) -> Result<DmaTransferRx<'t, Self>, Error>where
RXBUF: WriteBuffer,
pub fn read<'t, RXBUF>(
&'t mut self,
words: &'t mut RXBUF,
) -> Result<DmaTransferRx<'t, Self>, Error>where
RXBUF: WriteBuffer,
Register a buffer for a DMA read.
This will return a DmaTransferRx. The maximum amount of data to be received is 32736 bytes.
The read is driven by the SPI master’s sclk signal and cs line.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn transfer<'t, RXBUF, TXBUF>(
&'t mut self,
read_buffer: &'t mut RXBUF,
words: &'t TXBUF,
) -> Result<DmaTransferRxTx<'t, Self>, Error>where
RXBUF: WriteBuffer,
TXBUF: ReadBuffer,
pub fn transfer<'t, RXBUF, TXBUF>(
&'t mut self,
read_buffer: &'t mut RXBUF,
words: &'t TXBUF,
) -> Result<DmaTransferRxTx<'t, Self>, Error>where
RXBUF: WriteBuffer,
TXBUF: ReadBuffer,
Register buffers for a DMA transfer.
This will return a DmaTransferRxTx. The maximum amount of data to be sent/received is 32736 bytes.
The data transfer is driven by the SPI master’s sclk signal and cs line.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.