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
Memcpy
for buffer-to-buffer DMA transfersRead
for peripheral-to-memory DMA transfersWrite
for 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
>.