pub struct Channel<'d> { /* private fields */ }Expand description
DMA channel driver
Implementations§
Source§impl<'d> Channel<'d>
impl<'d> Channel<'d>
Sourcepub unsafe fn transfer<'a, MW: Word, PW: Word>(
&'a mut self,
request: Request,
buf: *const [MW],
dest_addr: *mut PW,
options: TransferOptions,
) -> Transfer<'a> ⓘ
pub unsafe fn transfer<'a, MW: Word, PW: Word>( &'a mut self, request: Request, buf: *const [MW], dest_addr: *mut PW, options: TransferOptions, ) -> Transfer<'a> ⓘ
Create a memory DMA transfer (memory to memory), using raw pointers.
Sourcepub unsafe fn transfer_raw<'a, MW: Word, PW: Word>(
&'a mut self,
request: Request,
src_addr: *const MW,
src_size: usize,
dest_addr: *mut PW,
options: TransferOptions,
) -> Transfer<'a> ⓘ
pub unsafe fn transfer_raw<'a, MW: Word, PW: Word>( &'a mut self, request: Request, src_addr: *const MW, src_size: usize, dest_addr: *mut PW, options: TransferOptions, ) -> Transfer<'a> ⓘ
Create a memory DMA transfer (memory to memory), using raw pointers.
Sourcepub unsafe fn read<'a, W: Word>(
&'a mut self,
request: Request,
peri_addr: *mut W,
buf: &'a mut [W],
options: TransferOptions,
) -> Transfer<'a> ⓘ
pub unsafe fn read<'a, W: Word>( &'a mut self, request: Request, peri_addr: *mut W, buf: &'a mut [W], options: TransferOptions, ) -> Transfer<'a> ⓘ
Create a read DMA transfer (peripheral to memory).
Sourcepub unsafe fn read_raw<'a, MW: Word, PW: Word>(
&'a mut self,
request: Request,
peri_addr: *mut PW,
buf: *mut [MW],
options: TransferOptions,
) -> Transfer<'a> ⓘ
pub unsafe fn read_raw<'a, MW: Word, PW: Word>( &'a mut self, request: Request, peri_addr: *mut PW, buf: *mut [MW], options: TransferOptions, ) -> Transfer<'a> ⓘ
Create a read DMA transfer (peripheral to memory), using raw pointers.
Sourcepub unsafe fn write<'a, MW: Word, PW: Word>(
&'a mut self,
request: Request,
buf: &'a [MW],
peri_addr: *mut PW,
options: TransferOptions,
) -> Transfer<'a> ⓘ
pub unsafe fn write<'a, MW: Word, PW: Word>( &'a mut self, request: Request, buf: &'a [MW], peri_addr: *mut PW, options: TransferOptions, ) -> Transfer<'a> ⓘ
Create a write DMA transfer (memory to peripheral).
Sourcepub unsafe fn write_raw<'a, MW: Word, PW: Word>(
&'a mut self,
request: Request,
buf: *const [MW],
peri_addr: *mut PW,
options: TransferOptions,
) -> Transfer<'a> ⓘ
pub unsafe fn write_raw<'a, MW: Word, PW: Word>( &'a mut self, request: Request, buf: *const [MW], peri_addr: *mut PW, options: TransferOptions, ) -> Transfer<'a> ⓘ
Create a write DMA transfer (memory to peripheral), using raw pointers.
Sourcepub unsafe fn write_repeated<'a, W: Word>(
&'a mut self,
request: Request,
repeated: &'a W,
count: usize,
peri_addr: *mut W,
options: TransferOptions,
) -> Transfer<'a> ⓘ
pub unsafe fn write_repeated<'a, W: Word>( &'a mut self, request: Request, repeated: &'a W, count: usize, peri_addr: *mut W, options: TransferOptions, ) -> Transfer<'a> ⓘ
Create a write DMA transfer (memory to peripheral), writing the same value repeatedly.
Auto Trait Implementations§
impl<'d> Freeze 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> UnwindSafe 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