Trait chipset_device::pio::PortIoIntercept
source · pub trait PortIoIntercept: ChipsetDevice {
// Required methods
fn io_read(&mut self, io_port: u16, data: &mut [u8]) -> IoResult;
fn io_write(&mut self, io_port: u16, data: &[u8]) -> IoResult;
// Provided method
fn get_static_regions(&mut self) -> &[(&str, RangeInclusive<u16>)] { ... }
}
Expand description
Implemented by devices which use port IO intercepts.
Required Methods§
Provided Methods§
sourcefn get_static_regions(&mut self) -> &[(&str, RangeInclusive<u16>)]
fn get_static_regions(&mut self) -> &[(&str, RangeInclusive<u16>)]
Report a set of static io port regions (region_name, port_range) that cannot be remapped at runtime and are always registered.
Note: This is a convenience method that makes it easy for simple
devices to declare some fixed IO regions without having to do through
the rigamarole of obtaining a reference to an instance of
RegisterPortIoIntercept
+ manually registering fixed ranges as part
of device init.