pub struct IoMem<const SIZE: usize = 0> { /* private fields */ }Expand description
Implementations§
Methods from Deref<Target = Mmio<SIZE>>§
Sourcepub fn relaxed(&self) -> &RelaxedMmio<SIZE>
pub fn relaxed(&self) -> &RelaxedMmio<SIZE>
Returns a RelaxedMmio reference that performs relaxed I/O operations.
Relaxed accessors do not provide ordering guarantees with respect to DMA or memory accesses and can be used when such ordering is not required.
§Examples
use kernel::io::{
Io,
Mmio,
RelaxedMmio,
};
fn do_io(io: &Mmio<0x100>) {
// The access is performed using `readl_relaxed` instead of `readl`.
let v = io.relaxed().read32(0x10);
}
Trait Implementations§
Auto Trait Implementations§
impl<const SIZE: usize> Freeze for IoMem<SIZE>
impl<const SIZE: usize> RefUnwindSafe for IoMem<SIZE>
impl<const SIZE: usize> Send for IoMem<SIZE>
impl<const SIZE: usize> Sync for IoMem<SIZE>
impl<const SIZE: usize> Unpin for IoMem<SIZE>
impl<const SIZE: usize> UnsafeUnpin for IoMem<SIZE>
impl<const SIZE: usize> UnwindSafe for IoMem<SIZE>
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
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>
Initializes
slot. Read more