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.

Implementors§