pub trait BusDriver: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn compatible(&self) -> &[&str];
fn init(&mut self, base: usize) -> Result<(), BusError>;
fn shutdown(&mut self) -> Result<(), BusError>;
fn read_reg(&self, offset: usize) -> Result<u32, BusError>;
fn write_reg(&mut self, offset: usize, value: u32) -> Result<(), BusError>;
// Provided methods
fn suspend(&mut self) -> Result<(), BusError> { ... }
fn resume(&mut self) -> Result<(), BusError> { ... }
fn error_count(&self) -> u64 { ... }
fn children(&self) -> Vec<BusChild> { ... }
fn handle_irq(&mut self) -> bool { ... }
}Required Methods§
Sourcefn compatible(&self) -> &[&str]
fn compatible(&self) -> &[&str]
Performs the compatible operation.
Provided Methods§
Sourcefn error_count(&self) -> u64
fn error_count(&self) -> u64
Performs the error count operation.
Sourcefn handle_irq(&mut self) -> bool
fn handle_irq(&mut self) -> bool
Handles irq.