pub struct DmaDescriptorFlags(pub u32);
unstable
only.Expand description
DMA descriptor flags.
Tuple Fields§
§0: u32
Implementations§
Source§impl DmaDescriptorFlags
impl DmaDescriptorFlags
Sourcepub fn length(&self) -> u16
pub fn length(&self) -> u16
Specifies the number of valid bytes in the buffer that this descriptor points to.
This field in a transmit descriptor is written by software and indicates how many bytes can be read from the buffer.
This field in a receive descriptor is written by hardware automatically and indicates how many valid bytes have been stored into the buffer.
Sourcepub fn suc_eof(&self) -> bool
pub fn suc_eof(&self) -> bool
For receive descriptors, software needs to clear this bit to 0, and hardware will set it to 1 after receiving data containing the EOF flag. For transmit descriptors, software needs to set this bit to 1 as needed. If software configures this bit to 1 in a descriptor, the DMA will include the EOF flag in the data sent to the corresponding peripheral, indicating to the peripheral that this data segment marks the end of one transfer phase.
Sourcepub fn owner(&self) -> bool
pub fn owner(&self) -> bool
Specifies who is allowed to access the buffer that this descriptor points to.
- 0: CPU can access the buffer;
- 1: The GDMA controller can access the buffer.
Sourcepub fn set_size(&mut self, value: u16)
pub fn set_size(&mut self, value: u16)
Specifies the size of the buffer that this descriptor points to.
Sourcepub fn set_length(&mut self, value: u16)
pub fn set_length(&mut self, value: u16)
Specifies the number of valid bytes in the buffer that this descriptor points to.
This field in a transmit descriptor is written by software and indicates how many bytes can be read from the buffer.
This field in a receive descriptor is written by hardware automatically and indicates how many valid bytes have been stored into the buffer.
Sourcepub fn set_suc_eof(&mut self, value: bool)
pub fn set_suc_eof(&mut self, value: bool)
For receive descriptors, software needs to clear this bit to 0, and hardware will set it to 1 after receiving data containing the EOF flag. For transmit descriptors, software needs to set this bit to 1 as needed. If software configures this bit to 1 in a descriptor, the DMA will include the EOF flag in the data sent to the corresponding peripheral, indicating to the peripheral that this data segment marks the end of one transfer phase.
Trait Implementations§
Source§impl<T> BitRange<T> for DmaDescriptorFlagswhere
u32: BitRange<T>,
impl<T> BitRange<T> for DmaDescriptorFlagswhere
u32: BitRange<T>,
Source§impl<T> BitRangeMut<T> for DmaDescriptorFlagswhere
u32: BitRangeMut<T>,
impl<T> BitRangeMut<T> for DmaDescriptorFlagswhere
u32: BitRangeMut<T>,
Source§fn set_bit_range(&mut self, msb: usize, lsb: usize, value: T)
fn set_bit_range(&mut self, msb: usize, lsb: usize, value: T)
Source§impl Clone for DmaDescriptorFlags
impl Clone for DmaDescriptorFlags
Source§fn clone(&self) -> DmaDescriptorFlags
fn clone(&self) -> DmaDescriptorFlags
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DmaDescriptorFlags
impl Debug for DmaDescriptorFlags
Source§impl Format for DmaDescriptorFlags
impl Format for DmaDescriptorFlags
Source§impl PartialEq for DmaDescriptorFlags
impl PartialEq for DmaDescriptorFlags
impl Copy for DmaDescriptorFlags
impl Eq for DmaDescriptorFlags
impl StructuralPartialEq for DmaDescriptorFlags
Auto Trait Implementations§
impl Freeze for DmaDescriptorFlags
impl RefUnwindSafe for DmaDescriptorFlags
impl Send for DmaDescriptorFlags
impl Sync for DmaDescriptorFlags
impl Unpin for DmaDescriptorFlags
impl UnwindSafe for DmaDescriptorFlags
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
Source§impl<T> BitMut for Twhere
T: BitRangeMut<u8>,
impl<T> BitMut for Twhere
T: BitRangeMut<u8>,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
clone_to_uninit
)