#[non_exhaustive]pub struct Ch<DMA, const C: u8>(/* private fields */);
Expand description
A singleton that represents a single DMAx channel (channel X in this case)
This singleton has exclusive access to the registers of the DMAx channel X
Implementations§
Source§impl<DMA: DmaExt, const C: u8> Ch<DMA, C>
impl<DMA: DmaExt, const C: u8> Ch<DMA, C>
Sourcepub fn set_peripheral_address(&mut self, address: u32, inc: bool)
pub fn set_peripheral_address(&mut self, address: u32, inc: bool)
Associated peripheral address
inc
indicates whether the address will be incremented after every byte transfer
Sourcepub fn set_memory_address(&mut self, address: u32, inc: bool)
pub fn set_memory_address(&mut self, address: u32, inc: bool)
address
where from/to data will be read/write
inc
indicates whether the address will be incremented after every byte transfer
Sourcepub fn set_transfer_length(&mut self, len: usize)
pub fn set_transfer_length(&mut self, len: usize)
Number of bytes to transfer
Sourcepub fn in_progress(&self) -> bool
pub fn in_progress(&self) -> bool
Returns true
if there’s a transfer in progress
pub fn listen(&mut self, event: Event)
pub fn unlisten(&mut self, event: Event)
pub fn ch(&mut self) -> &CH
pub fn isr(&self) -> R
pub fn ifcr(&self) -> &IFCR
pub fn get_ndtr(&self) -> u32
Auto Trait Implementations§
impl<DMA, const C: u8> Freeze for Ch<DMA, C>
impl<DMA, const C: u8> RefUnwindSafe for Ch<DMA, C>where
DMA: RefUnwindSafe,
impl<DMA, const C: u8> Send for Ch<DMA, C>where
DMA: Send,
impl<DMA, const C: u8> Sync for Ch<DMA, C>where
DMA: Sync,
impl<DMA, const C: u8> Unpin for Ch<DMA, C>where
DMA: Unpin,
impl<DMA, const C: u8> UnwindSafe for Ch<DMA, C>where
DMA: UnwindSafe,
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