pub struct Transfer<'a> { /* private fields */ }Expand description
The core DMA transfer future
Transfer is a future that drives the DMA transfer. Transfer will
initiate a DMA transfer when it is first polled. You may then poll it
to understand when the transfer completes.
To cancel a transfer, drop the Transfer.
If you’ve enabled DMA interrupts, consider using on_interrupt
to wake an executor when the DMA transfer completes, The interrupt interface assumes that you’ve
- configured your channel to generate interrupts
- registered a DMA ISR with your embedded runtime
- unmasked the DMA interrupt in the NVIC
Transfer calls the unsafe enable method to enable a
DMA transfer. To properly use Transfer, make sure that you’ve configured your DMA
channel for a valid transfer.
Transfer is the core DMA future used in imxrt_dma. For safe DMA transfers, consider
using
Memcpyfor buffer-to-buffer DMA transfersReadfor peripheral-to-memory DMA transfersWritefor memory-to-peripheral DMA transfers
Transfer is designed to the DMA Channel public interface. If you need to implement
your own transfer future, you may do so.
use imxrt_dma::{channel::Channel, Transfer};
let my_channel: Channel = // Acquire your channel...
// Properly prepare your transfer...
// Safety: transfer properly prepared
unsafe { Transfer::new(&my_channel) }.await?;Implementations§
Trait Implementations§
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> !Unpin 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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn map<U, F>(self, f: F) -> Map<Self, F>
fn map<U, F>(self, f: F) -> Map<Self, F>
Source§fn map_into<U>(self) -> MapInto<Self, U>
fn map_into<U>(self) -> MapInto<Self, U>
Source§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
f. Read moreSource§fn left_future<B>(self) -> Either<Self, B>
fn left_future<B>(self) -> Either<Self, B>
Source§fn right_future<A>(self) -> Either<A, Self>
fn right_future<A>(self) -> Either<A, Self>
Source§fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
Source§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
Source§fn flatten_stream(self) -> FlattenStream<Self>
fn flatten_stream(self) -> FlattenStream<Self>
Source§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
poll will never again be called once it has
completed. This method can be used to turn any Future into a
FusedFuture. Read moreSource§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Source§fn unit_error(self) -> UnitError<Self>where
Self: Sized,
fn unit_error(self) -> UnitError<Self>where
Self: Sized,
Future<Output = T> into a
TryFuture<Ok = T, Error = ()>.Source§fn never_error(self) -> NeverError<Self>where
Self: Sized,
fn never_error(self) -> NeverError<Self>where
Self: Sized,
Future<Output = T> into a
TryFuture<Ok = T, Error = Never>.