DeviceTestDmaClientCallbacks

Trait DeviceTestDmaClientCallbacks 

Source
pub trait DeviceTestDmaClientCallbacks: Sync + Send {
    // Required methods
    fn allocate_dma_buffer(
        &self,
        allocator: &PagePoolAllocator,
        total_size: usize,
    ) -> Result<MemoryBlock>;
    fn attach_pending_buffers(
        &self,
        inner: &PagePoolAllocator,
    ) -> Result<Vec<MemoryBlock>>;
}
Expand description

Callbacks for the DeviceTestDmaClient. Tests supply these to customize the behaviour of the dma client.

Required Methods§

Source

fn allocate_dma_buffer( &self, allocator: &PagePoolAllocator, total_size: usize, ) -> Result<MemoryBlock>

Called when the DMA client needs to allocate a new DMA buffer.

Source

fn attach_pending_buffers( &self, inner: &PagePoolAllocator, ) -> Result<Vec<MemoryBlock>>

Called when the DMA client needs to attach pending buffers.

Implementors§