pub struct SpiDmaTransfer<'d, Dm, Buf>where
Dm: DriverMode,{ /* private fields */ }
unstable
only.Expand description
A structure representing a DMA transfer for SPI.
This structure holds references to the SPI instance, DMA buffers, and transfer status.
§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, Buf> SpiDmaTransfer<'d, Dm, Buf>where
Dm: DriverMode,
impl<'d, Dm, Buf> SpiDmaTransfer<'d, Dm, Buf>where
Dm: DriverMode,
Sourcepub fn is_done(&self) -> bool
pub fn is_done(&self) -> bool
Checks if the transfer is complete.
This method returns true
if both RX and TX operations are done,
and the SPI instance is no longer busy.
§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 wait(self) -> (SpiDma<'d, Dm>, Buf)
pub fn wait(self) -> (SpiDma<'d, Dm>, Buf)
Waits for the DMA transfer to complete.
This method blocks until the transfer is finished and returns the
SpiDma
instance and the associated buffer.
§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.