#[repr(C)]pub struct LinearItem {
pub tr1: ChTr1,
pub tr2: ChTr2,
pub br1: ChBr1,
pub sar: u32,
pub dar: u32,
pub llr: ChLlr,
}Expand description
A linked-list item for linear GPDMA transfers.
Also works for 2D-capable GPDMA channels, but does not use 2D capabilities.
Fields§
§tr1: ChTr1Transfer register 1.
tr2: ChTr2Transfer register 2.
br1: ChBr1Block register 2.
sar: u32Source address register.
dar: u32Destination address register.
llr: ChLlrLinked-list address register.
Implementations§
Source§impl LinearItem
impl LinearItem
Sourcepub unsafe fn new_read<'d, MW: Word, PW: Word>(
request: Request,
peri_addr: *mut PW,
buf: &'d mut [MW],
) -> Self
pub unsafe fn new_read<'d, MW: Word, PW: Word>( request: Request, peri_addr: *mut PW, buf: &'d mut [MW], ) -> Self
Create a new read DMA transfer (peripheral to memory).
Sourcepub unsafe fn new_write<'d, MW: Word, PW: Word>(
request: Request,
buf: &'d [MW],
peri_addr: *mut PW,
) -> Self
pub unsafe fn new_write<'d, MW: Word, PW: Word>( request: Request, buf: &'d [MW], peri_addr: *mut PW, ) -> Self
Create a new write DMA transfer (memory to peripheral).
Sourcepub fn link_to(&mut self, next: u16)
pub fn link_to(&mut self, next: u16)
Link to the next linear item at the given address.
Enables channel update bits.
Sourcepub fn set_transfer_complete_mode(&mut self, mode: TransferCompleteMode)
pub fn set_transfer_complete_mode(&mut self, mode: TransferCompleteMode)
Set the transfer complete event mode (TR2.TCEM) for this item.
In linked-list mode, the channel’s TR2 register is overwritten by
each LLI when UT2 is set, so TCEM must be configured per-item.
See TransferCompleteMode for details.
Sourcepub fn transfer_count(&self) -> usize
pub fn transfer_count(&self) -> usize
The item’s transfer count in number of words.
Trait Implementations§
Source§impl Clone for LinearItem
impl Clone for LinearItem
Source§fn clone(&self) -> LinearItem
fn clone(&self) -> LinearItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinearItem
impl Debug for LinearItem
Source§impl Default for LinearItem
impl Default for LinearItem
Source§fn default() -> LinearItem
fn default() -> LinearItem
Returns the “default value” for a type. Read more
impl Copy for LinearItem
Auto Trait Implementations§
impl Freeze for LinearItem
impl RefUnwindSafe for LinearItem
impl Send for LinearItem
impl Sync for LinearItem
impl Unpin for LinearItem
impl UnwindSafe for LinearItem
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