BusDevice

Trait BusDevice 

Source
pub trait BusDevice: Send {
    // Provided methods
    fn read(&mut self, base: u64, offset: u64, data: &mut [u8]) { ... }
    fn write(
        &mut self,
        base: u64,
        offset: u64,
        data: &[u8],
    ) -> Option<Arc<Barrier>> { ... }
}
Expand description

Trait for devices that respond to reads or writes in an arbitrary address space.

The device does not care where it exists in address space as each method is only given an offset into its allocated portion of address space.

Provided Methods§

Source

fn read(&mut self, base: u64, offset: u64, data: &mut [u8])

Reads at offset from this device

Source

fn write(&mut self, base: u64, offset: u64, data: &[u8]) -> Option<Arc<Barrier>>

Writes at offset into this device

Implementors§