pub struct DmaBuffer { /* private fields */ }Expand description
DMA Buffer
Implementations§
Source§impl DmaBuffer
impl DmaBuffer
Sourcepub fn from_frame(frame: FrameNumber, index: u16) -> Self
pub fn from_frame(frame: FrameNumber, index: u16) -> Self
Create a DMA buffer from an allocated physical frame.
Converts the frame number to physical and virtual addresses using the kernel’s direct physical memory mapping.
Sourcepub fn phys_addr(&self) -> PhysicalAddress
pub fn phys_addr(&self) -> PhysicalAddress
Get physical address for DMA
Sourcepub fn as_mut_slice(&mut self) -> &mut [u8]
pub fn as_mut_slice(&mut self) -> &mut [u8]
Get buffer as mutable slice