#[repr(C)]pub struct DevArea {
pub addr: DevAddr,
pub len: usize,
}Expand description
Device memory area representation.
This is a DevAddr paired with a length, representing an area in device memory.
Fields§
§addr: DevAddrBase address of buffer.
len: usizeLength of buffer, in bytes.
Implementations§
Source§impl DevArea
impl DevArea
Sourcepub const fn from_u32_len(raw: u32, len: usize) -> Self
pub const fn from_u32_len(raw: u32, len: usize) -> Self
Create a device area from a raw integer and length.
Sourcepub const fn const_from_slice(ptr: *mut [u8]) -> Self
pub const fn const_from_slice(ptr: *mut [u8]) -> Self
Create a device area from a slice pointer (only on 32-bit platforms).
Sourcepub fn from_slice(ptr: *mut [u8]) -> Self
pub fn from_slice(ptr: *mut [u8]) -> Self
Create a device area from a slice pointer.
Sourcepub const fn const_from_ptr_len(ptr: *mut u8, len: usize) -> Self
pub const fn const_from_ptr_len(ptr: *mut u8, len: usize) -> Self
Create a device area from a base pointer and length (only on 32-bit platforms).
Sourcepub fn from_ptr_len(ptr: *mut u8, len: usize) -> Self
pub fn from_ptr_len(ptr: *mut u8, len: usize) -> Self
Create a device area from a base pointer and length.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DevArea
impl RefUnwindSafe for DevArea
impl !Send for DevArea
impl Sync for DevArea
impl Unpin for DevArea
impl UnwindSafe for DevArea
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