Skip to main content

DmaHeader

Struct DmaHeader 

Source
#[repr(C)]
pub struct DmaHeader {
Show 26 fields pub dmabuf_magic_m: u16, pub dmabuf_magic_s: u16, pub dmabuf_size: u32, pub cpu_desc_count: u32, pub bd_desc_count: u32, pub tdma_desc_count: u32, pub tpu_clk_rate: u32, pub pmubuf_size: u32, pub pmubuf_offset: u32, pub arraybase_0_l: u32, pub arraybase_0_h: u32, pub arraybase_1_l: u32, pub arraybase_1_h: u32, pub arraybase_2_l: u32, pub arraybase_2_h: u32, pub arraybase_3_l: u32, pub arraybase_3_h: u32, pub arraybase_4_l: u32, pub arraybase_4_h: u32, pub arraybase_5_l: u32, pub arraybase_5_h: u32, pub arraybase_6_l: u32, pub arraybase_6_h: u32, pub arraybase_7_l: u32, pub arraybase_7_h: u32, pub reserve: [u32; 8],
}
Expand description

DMA buffer header used by the TPU firmware.

Fields§

§dmabuf_magic_m: u16§dmabuf_magic_s: u16§dmabuf_size: u32§cpu_desc_count: u32§bd_desc_count: u32§tdma_desc_count: u32§tpu_clk_rate: u32§pmubuf_size: u32§pmubuf_offset: u32§arraybase_0_l: u32§arraybase_0_h: u32§arraybase_1_l: u32§arraybase_1_h: u32§arraybase_2_l: u32§arraybase_2_h: u32§arraybase_3_l: u32§arraybase_3_h: u32§arraybase_4_l: u32§arraybase_4_h: u32§arraybase_5_l: u32§arraybase_5_h: u32§arraybase_6_l: u32§arraybase_6_h: u32§arraybase_7_l: u32§arraybase_7_h: u32§reserve: [u32; 8]

Implementations§

Source§

impl DmaHeader

Source

pub const MAGIC: u16 = TPU_DMABUF_HEADER_M

Source

pub fn is_valid(&self) -> bool

Source

pub fn arraybase(&self, idx: usize) -> u64

Source

pub fn arraybase_l(&self) -> [u32; 8]

Trait Implementations§

Source§

impl Clone for DmaHeader

Source§

fn clone(&self) -> DmaHeader

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 DmaHeader

Source§

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

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

impl Default for DmaHeader

Source§

fn default() -> DmaHeader

Returns the “default value” for a type. Read more
Source§

impl Copy for DmaHeader

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.