vmcore::isa_dma_channel

Trait IsaDmaChannel

Source
pub trait IsaDmaChannel: Send {
    // Required methods
    fn check_transfer_size(&mut self) -> u16;
    fn request(&mut self, direction: IsaDmaDirection) -> Option<IsaDmaBuffer>;
    fn complete(&mut self);
}
Expand description

A handle to an ISA DMA channel.

This trait does not “leak” which partiuclar ISA DMA channel a device is connected to.

Devices that use ISA DMA should simply accept an instance of Box<dyn IsaDmaChannel>, leaving the details of DMA channel assignment to upper-level system init code that backs the IsaDmaChannel trait object.

Required Methods§

Source

fn check_transfer_size(&mut self) -> u16

Check the value of the DMA channel’s configured transfer size.

Source

fn request(&mut self, direction: IsaDmaDirection) -> Option<IsaDmaBuffer>

Requests an access to ISA DMA channel buffer.

Returns None if the channel has not been configured correctly.

Source

fn complete(&mut self)

Signals to the DMA controller that the transfer is concluded.

Implementors§