pub trait BaseDriverOps: Send + Sync {
    // Required methods
    fn device_name(&self) -> &str;
    fn device_type(&self) -> DeviceType;

    // Provided methods
    fn get_irq_num(&self) -> Option<usize> { ... }
    fn ack_interrupt(&mut self) -> bool { ... }
}
Expand description

Common operations that require all device drivers to implement.

Required Methods§

source

fn device_name(&self) -> &str

The name of the device.

source

fn device_type(&self) -> DeviceType

The type of the device.

Provided Methods§

source

fn get_irq_num(&self) -> Option<usize>

Get the interrupt number. Only interrupt drivers need to implement this function.

source

fn ack_interrupt(&mut self) -> bool

Ack the interrupt. Only interrupt drivers need to implement this function.

Implementations on Foreign Types§

source§

impl<H, T> BaseDriverOps for VirtIoBlkDev<H, T>where H: Hal, T: Transport,

source§

impl<H, T> BaseDriverOps for VirtIoGpuDev<H, T>where H: Hal, T: Transport,

source§

impl<H, T, const QS: usize> BaseDriverOps for VirtIoNetDev<'_, H, T, QS>where H: Hal, T: Transport,

source§

impl BaseDriverOps for RamDisk

Implementors§