#[repr(u32)]pub enum DataDirection {
Bidirectional = 0,
ToDevice = 1,
FromDevice = 2,
None = 3,
}
Expand description
DMA data direction.
Corresponds to the C enum dma_data_direction
.
Variants§
Bidirectional = 0
The DMA mapping is for bidirectional data transfer.
This is used when the buffer can be both read from and written to by the device. The cache for the corresponding memory region is both flushed and invalidated.
ToDevice = 1
The DMA mapping is for data transfer from memory to the device (write).
The CPU has prepared data in the buffer, and the device will read it. The cache for the corresponding memory region is flushed before device access.
FromDevice = 2
The DMA mapping is for data transfer from the device to memory (read).
The device will write data into the buffer for the CPU to read. The cache for the corresponding memory region is invalidated before CPU access.
None = 3
The DMA mapping is not for data transfer.
This is primarily for debugging purposes. With this direction, the DMA mapping API will not perform any cache coherency operations.
Trait Implementations§
Source§impl Clone for DataDirection
impl Clone for DataDirection
Source§fn clone(&self) -> DataDirection
fn clone(&self) -> DataDirection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DataDirection
impl Debug for DataDirection
Source§impl From<DataDirection> for dma_data_direction
impl From<DataDirection> for dma_data_direction
Source§fn from(direction: DataDirection) -> Self
fn from(direction: DataDirection) -> Self
Returns the raw representation of [enum dma_data_direction
].
Source§impl PartialEq for DataDirection
impl PartialEq for DataDirection
impl Copy for DataDirection
impl Eq for DataDirection
impl StructuralPartialEq for DataDirection
Auto Trait Implementations§
impl Freeze for DataDirection
impl RefUnwindSafe for DataDirection
impl Send for DataDirection
impl Sync for DataDirection
impl Unpin for DataDirection
impl UnwindSafe for DataDirection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
slot
. Read more