pub struct SpiDmaTransfer<'d, Dm, Buf>where
Dm: DriverMode,{ /* private fields */ }
unstable
only.Expand description
§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.
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.
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.
Source§impl<Buf> SpiDmaTransfer<'_, Async, Buf>
impl<Buf> SpiDmaTransfer<'_, Async, Buf>
Sourcepub async fn wait_for_done(&mut self)
pub async fn wait_for_done(&mut self)
Waits for the DMA transfer to complete asynchronously.
This method awaits the completion of both RX and TX operations.
§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.