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§
Sourcefn allocate_dma_buffer(
&self,
allocator: &PagePoolAllocator,
total_size: usize,
) -> Result<MemoryBlock>
fn allocate_dma_buffer( &self, allocator: &PagePoolAllocator, total_size: usize, ) -> Result<MemoryBlock>
Called when the DMA client needs to allocate a new DMA buffer.
Sourcefn attach_pending_buffers(
&self,
inner: &PagePoolAllocator,
) -> Result<Vec<MemoryBlock>>
fn attach_pending_buffers( &self, inner: &PagePoolAllocator, ) -> Result<Vec<MemoryBlock>>
Called when the DMA client needs to attach pending buffers.