Struct gd32f1x0_hal::dma::C2
source · [−]pub struct C2 { /* private fields */ }
Expand description
A singleton that represents a single DMA channel (channel X in this case)
This singleton has exclusive access to the registers of the DMA channel X
Implementations
sourceimpl C2
impl C2
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)
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more