GpdmaStreamConfig

Struct GpdmaStreamConfig 

Source
#[repr(C)]
pub struct GpdmaStreamConfig {
Show 16 fields pub channel: u16, pub stream: u16, pub controller: u16, pub transfer_type: u16, pub source: usize, pub dest: usize, pub transfer_len: usize, pub circular_source: bool, pub circular_dest: bool, pub interrupts: u8, pub is_triggered: bool, pub trigger: u8, pub priority: u8, pub transfer_mode: u8, pub src_beat_len: u8, pub dest_beat_len: u8,
}
Expand description

DMA static configuration information

§Usage

This structure is delivered by the kernel into svc_exchange when calling successfully crate::syscall::dma_get_stream_info().

The structure content correspond to the static build-time information as defined in the device-tree and do not require any DTS manipulation in user-space.

§Example

let dmacfg: dma_stream_cfg;
match get_dma_stream_info(dmah) {
   Status::Ok => (svc_exchange::copy_from(&dma_stream_cfg, mem::sizeof(dma_stream_cfg)))
}

Fields§

§channel: u16§stream: u16§controller: u16§transfer_type: u16§source: usize§dest: usize§transfer_len: usize§circular_source: bool§circular_dest: bool§interrupts: u8§is_triggered: bool§trigger: u8§priority: u8§transfer_mode: u8§src_beat_len: u8§dest_beat_len: u8

Trait Implementations§

Source§

impl Clone for GpdmaStreamConfig

Source§

fn clone(&self) -> GpdmaStreamConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GpdmaStreamConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl SentryExchangeable for GpdmaStreamConfig

SentryExchangeable trait implementation for dma::GpdmaStreamConfig. dma::GpdmaStreamConfig is a typical structure which is returned by the kernel to the userspace in order to delivers various DMA stream-related information to a given task that is using the corresponding DMA handle.

In test mode only, this structure can be written back to the Exchange Area. In production mode, the application can’t write such a content to the exchange as the kernel as strictly no use of it.

Source§

fn from_kernel(&mut self) -> Result<Status, Status>

set the current object using the data delivered by the kernel in the exchange zone
Source§

fn to_kernel(&self) -> Result<Status, Status>

Copy the current object to the kernel exchagne zone
Source§

impl Copy for GpdmaStreamConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.