pub trait PortOps {
// Required methods
unsafe fn read8(&self, port: u16) -> u8;
unsafe fn read16(&self, port: u16) -> u16;
unsafe fn read32(&self, port: u16) -> u32;
unsafe fn write8(&self, port: u16, val: u8);
unsafe fn write16(&self, port: u16, val: u16);
unsafe fn write32(&self, port: u16, val: u32);
}
Expand description
A trait defining port I/O operations.
All port I/O operations are parametric over this trait. This allows operating systems to use this crate without modifications, by suitably instantiating this trait with their own primitives.