Skip to main content

AsyncDmaTransfer

Trait AsyncDmaTransfer 

Source
pub trait AsyncDmaTransfer: DmaTransfer {
    type WaitFuture: Future<Output = Self::Buffer>;

    // Required method
    fn wait_async(self) -> Self::WaitFuture;
}
Expand description

An asynchronous DMA transfer that can be awaited as a future.

This allows integration with async executors (e.g. Embassy, RTOS task executors) without blocking the CPU while the DMA transfer is in progress.

Required Associated Types§

Source

type WaitFuture: Future<Output = Self::Buffer>

The future type returned by wait_async.

Required Methods§

Source

fn wait_async(self) -> Self::WaitFuture

Return a future that resolves to the framebuffer once the DMA transfer completes.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§