pub trait DmaClient:
Send
+ Sync
+ Inspect {
// Required methods
fn allocate_dma_buffer(&self, total_size: usize) -> Result<MemoryBlock>;
fn attach_pending_buffers(&self) -> Result<Vec<MemoryBlock>>;
}
Expand description
Device interfaces for DMA.
Required Methods§
Sourcefn allocate_dma_buffer(&self, total_size: usize) -> Result<MemoryBlock>
fn allocate_dma_buffer(&self, total_size: usize) -> Result<MemoryBlock>
Allocate a new DMA buffer. This buffer must be zero initialized.
TODO: string tag for allocation? TODO: contiguous vs non-contiguous? (both on the request side, and if a request contiguous allocation cannot be fulfilled)
Sourcefn attach_pending_buffers(&self) -> Result<Vec<MemoryBlock>>
fn attach_pending_buffers(&self) -> Result<Vec<MemoryBlock>>
Attach all previously allocated memory blocks.