pub struct RxDescriptor { /* private fields */ }Expand description
RX DMA descriptor — enhanced 8-word layout (32 bytes).
See TxDescriptor for why we run the enhanced layout.
Implementations§
Source§impl RxDescriptor
impl RxDescriptor
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Create a new zeroed RX descriptor. Call setup_chained before use.
Sourcepub fn setup_chained(
&self,
buffer: *mut u8,
buffer_size: usize,
next_desc: *const RxDescriptor,
)
pub fn setup_chained( &self, buffer: *mut u8, buffer_size: usize, next_desc: *const RxDescriptor, )
Configure descriptor in chained mode and give to DMA.
Sets the buffer pointer, buffer size, next-descriptor pointer,
the SECOND_ADDR_CHAINED flag, and the OWN bit.
Sourcepub fn clear_owned(&self)
pub fn clear_owned(&self)
Take ownership from DMA.
Sourcepub fn is_complete_frame(&self) -> bool
pub fn is_complete_frame(&self) -> bool
Complete frame in a single descriptor (both first and last).
Sourcepub fn error_flags(&self) -> u32
pub fn error_flags(&self) -> u32
Raw error flags from RDES0.
Sourcepub fn frame_length(&self) -> usize
pub fn frame_length(&self) -> usize
Frame length including CRC (valid on last descriptor).
Sourcepub fn payload_length(&self) -> usize
pub fn payload_length(&self) -> usize
Frame length excluding the 4-byte CRC.
Sourcepub fn buffer_addr(&self) -> u32
pub fn buffer_addr(&self) -> u32
Buffer address (RDES2).
Sourcepub fn next_desc_addr(&self) -> u32
pub fn next_desc_addr(&self) -> u32
Next descriptor address (RDES3, chained mode).
Sourcepub fn buffer_size(&self) -> usize
pub fn buffer_size(&self) -> usize
Configured buffer size from RDES1.
Trait Implementations§
Source§impl Default for RxDescriptor
impl Default for RxDescriptor
impl Send for RxDescriptor
impl Sync for RxDescriptor
Auto Trait Implementations§
impl !Freeze for RxDescriptor
impl !RefUnwindSafe for RxDescriptor
impl Unpin for RxDescriptor
impl UnsafeUnpin for RxDescriptor
impl UnwindSafe for RxDescriptor
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