Skip to main content

BaseDriverOps

Trait BaseDriverOps 

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

    // Provided method
    fn irq_num(&self) -> Option<usize> { ... }
}
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 irq_num(&self) -> Option<usize>

The IRQ number of the device, if applicable.

Implementations on Foreign Types§

Source§

impl<T: BaseDriverOps + ?Sized> BaseDriverOps for Box<T>

Implementors§