pub struct Channel<'d> { /* private fields */ }Expand description
DMAC channel.
Implementations§
Source§impl<'d> Channel<'d>
impl<'d> Channel<'d>
Sourcepub fn new<C: Instance, Int: InterruptType>(
channel: Peri<'d, C>,
irq: impl Binding<Int, DmacInterruptHandler<C>> + 'd,
) -> Self
pub fn new<C: Instance, Int: InterruptType>( channel: Peri<'d, C>, irq: impl Binding<Int, DmacInterruptHandler<C>> + 'd, ) -> Self
Creates a new DMAC driver for a specific channel.
Sourcepub fn write<W: Word>(
&mut self,
src: &[W],
dest: *mut W,
event: InterruptEvent,
) -> Transfer<'_> ⓘ
pub fn write<W: Word>( &mut self, src: &[W], dest: *mut W, event: InterruptEvent, ) -> Transfer<'_> ⓘ
Configures a DMAC transfer that reads from an address incremented by the specified InterruptEvent and writes to a fixed address.
e.g. memory-to-peripheral.
§Arguments
srcdestevent
§Returns
A future that will finish upon completion of the transfer.
Sourcepub fn read<W: Word>(
&mut self,
src: *const W,
dest: &mut [W],
event: InterruptEvent,
) -> Transfer<'_> ⓘ
pub fn read<W: Word>( &mut self, src: *const W, dest: &mut [W], event: InterruptEvent, ) -> Transfer<'_> ⓘ
Configures a DMAC transfer that reads from a fixed address and writes to an address incremented by the specified InterruptEvent.
e.g. peripheral-to-memory.
§Arguments
srcdestevent
§Returns
A future that will finish upon completion of the transfer.
Trait Implementations§
Auto Trait Implementations§
impl<'d> !UnwindSafe for Channel<'d>
impl<'d> Forget for Channel<'d>
impl<'d> Freeze for Channel<'d>
impl<'d> Move for Channel<'d>
impl<'d> RefUnwindSafe for Channel<'d>
impl<'d> Send for Channel<'d>
impl<'d> Sync for Channel<'d>
impl<'d> Unpin for Channel<'d>
impl<'d> UnsafeUnpin for Channel<'d>
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