pub trait LinkedListItem:
Copy
+ Default
+ Sized {
type Config: Default + Copy;
const IS_2D: bool;
// Required methods
unsafe fn new_read<MW: Word, PW: Word>(
request: Request,
peri_addr: *mut PW,
buf: &mut [MW],
config: Self::Config,
) -> Self;
unsafe fn new_write<MW: Word, PW: Word>(
request: Request,
buf: &[MW],
peri_addr: *mut PW,
config: Self::Config,
) -> Self;
unsafe fn new_copy<W: Word>(
src: *const W,
dst: *mut W,
len: usize,
incr_src: bool,
incr_dst: bool,
config: Self::Config,
) -> Self;
fn link_to(&mut self, next: u16);
fn unlink(&mut self);
fn transfer_count(&self) -> usize;
}Expand description
Trait for linked-list item types usable in a generic Table.
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourceunsafe fn new_read<MW: Word, PW: Word>(
request: Request,
peri_addr: *mut PW,
buf: &mut [MW],
config: Self::Config,
) -> Self
unsafe fn new_read<MW: Word, PW: Word>( request: Request, peri_addr: *mut PW, buf: &mut [MW], config: Self::Config, ) -> Self
Create a new read DMA transfer item (peripheral to memory).
§Safety
The caller must ensure addresses and buffer remain valid for the transfer duration.
Sourceunsafe fn new_write<MW: Word, PW: Word>(
request: Request,
buf: &[MW],
peri_addr: *mut PW,
config: Self::Config,
) -> Self
unsafe fn new_write<MW: Word, PW: Word>( request: Request, buf: &[MW], peri_addr: *mut PW, config: Self::Config, ) -> Self
Create a new write DMA transfer item (memory to peripheral).
§Safety
The caller must ensure addresses and buffer remain valid for the transfer duration.
Sourceunsafe fn new_copy<W: Word>(
src: *const W,
dst: *mut W,
len: usize,
incr_src: bool,
incr_dst: bool,
config: Self::Config,
) -> Self
unsafe fn new_copy<W: Word>( src: *const W, dst: *mut W, len: usize, incr_src: bool, incr_dst: bool, config: Self::Config, ) -> Self
Create a software-requested (SWREQ) memory-to-memory item: len words from src to
dst. Each side’s address increments if asked: both for a copy between buffers, only
the source to write a buffer into a register, only the destination to fill a buffer.
It runs when loaded, or on its trigger (ItemConfig::trigger).
§Safety
The caller must ensure src and dst remain valid for the transfer duration.
Sourcefn transfer_count(&self) -> usize
fn transfer_count(&self) -> usize
The item’s transfer count in number of destination words.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".