pub struct Channel<const N: u8> { /* private fields */ }Expand description
One DMA channel, identified by its number at the type level.
Implementations§
Source§impl<const N: u8> Channel<N>where
Channel<N>: ChannelOps,
impl<const N: u8> Channel<N>where
Channel<N>: ChannelOps,
Sourcepub fn write_to<P: DmaDst<N>>(
self,
periph: P,
buf: &'static [P::Word],
prio: Prio,
) -> Transfer<N, P, &'static [P::Word]>
pub fn write_to<P: DmaDst<N>>( self, periph: P, buf: &'static [P::Word], prio: Prio, ) -> Transfer<N, P, &'static [P::Word]>
Starts a memory-to-peripheral transfer, moving buf into periph.
All three are taken by value and come back from Transfer::wait. The
transfer width follows from the peripheral’s word type, so buf must
match it.
Sourcepub fn read_from<P: DmaSrc<N>>(
self,
periph: P,
buf: &'static mut [P::Word],
prio: Prio,
) -> Transfer<N, P, &'static mut [P::Word]>
pub fn read_from<P: DmaSrc<N>>( self, periph: P, buf: &'static mut [P::Word], prio: Prio, ) -> Transfer<N, P, &'static mut [P::Word]>
Starts a peripheral-to-memory transfer, filling buf from periph.
All three are taken by value and come back from Transfer::wait, so
buf cannot be read before the transfer completes. The transfer width
follows from the peripheral’s word type, so buf must match it.
Auto Trait Implementations§
impl<const N: u8> Freeze for Channel<N>
impl<const N: u8> RefUnwindSafe for Channel<N>
impl<const N: u8> Send for Channel<N>
impl<const N: u8> Sync for Channel<N>
impl<const N: u8> Unpin for Channel<N>
impl<const N: u8> UnsafeUnpin for Channel<N>
impl<const N: u8> UnwindSafe for Channel<N>
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