pub struct SpiDma<'d, Dm>where
    Dm: DriverMode,{ /* private fields */ }unstable only.Expand description
A structure representing a DMA transfer for SPI.
§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<'d, Dm> SpiDma<'d, Dm>where
    Dm: DriverMode,
 
impl<'d, Dm> SpiDma<'d, Dm>where
    Dm: DriverMode,
Sourcepub fn write<TX>(
    self,
    bytes_to_write: usize,
    buffer: TX,
) -> Result<SpiDmaTransfer<'d, Dm, TX>, (Error, Self, TX)>where
    TX: DmaTxBuffer,
 
pub fn write<TX>(
    self,
    bytes_to_write: usize,
    buffer: TX,
) -> Result<SpiDmaTransfer<'d, Dm, TX>, (Error, Self, TX)>where
    TX: DmaTxBuffer,
Register a buffer for a DMA write.
This will return a SpiDmaTransfer. 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<RX>(
    self,
    bytes_to_read: usize,
    buffer: RX,
) -> Result<SpiDmaTransfer<'d, Dm, RX>, (Error, Self, RX)>where
    RX: DmaRxBuffer,
 
pub fn read<RX>(
    self,
    bytes_to_read: usize,
    buffer: RX,
) -> Result<SpiDmaTransfer<'d, Dm, RX>, (Error, Self, RX)>where
    RX: DmaRxBuffer,
Register a buffer for a DMA read.
This will return a SpiDmaTransfer. 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<RX, TX>(
    self,
    bytes_to_read: usize,
    rx_buffer: RX,
    bytes_to_write: usize,
    tx_buffer: TX,
) -> Result<SpiDmaTransfer<'d, Dm, (RX, TX)>, (Error, Self, RX, TX)>where
    RX: DmaRxBuffer,
    TX: DmaTxBuffer,
 
pub fn transfer<RX, TX>(
    self,
    bytes_to_read: usize,
    rx_buffer: RX,
    bytes_to_write: usize,
    tx_buffer: TX,
) -> Result<SpiDmaTransfer<'d, Dm, (RX, TX)>, (Error, Self, RX, TX)>where
    RX: DmaRxBuffer,
    TX: DmaTxBuffer,
Register buffers for a DMA transfer.
This will return a SpiDmaTransfer. 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.