pub struct Transfer<'a> { /* private fields */ }Expand description
An in-progress DMA transfer.
This type implements Future and can be .awaited to wait for the
transfer to complete. Dropping the transfer will abort it.
Implementations§
Source§impl<'a> Transfer<'a>
impl<'a> Transfer<'a>
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if the transfer is still running.
Sourcepub fn blocking_wait(self)
pub fn blocking_wait(self)
Block until the transfer completes.
Sourcepub async fn wait_half(&mut self) -> Result<bool, TransferErrorRaw>
pub async fn wait_half(&mut self) -> Result<bool, TransferErrorRaw>
Wait for the half-transfer interrupt asynchronously.
This is useful for double-buffering scenarios where you want to process the first half of the buffer while the second half is being filled.
Returns true if the half-transfer occurred, false if the transfer
completed before the half-transfer interrupt.
§Note
The transfer must be configured with TransferOptions::half_transfer_interrupt = true
for this method to work correctly.
Trait Implementations§
impl<'a> Unpin for Transfer<'a>
Auto Trait Implementations§
impl<'a> Freeze for Transfer<'a>
impl<'a> RefUnwindSafe for Transfer<'a>
impl<'a> Send for Transfer<'a>
impl<'a> Sync for Transfer<'a>
impl<'a> UnwindSafe for Transfer<'a>
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
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more