Struct cpuio::UnsafePort
[−]
[src]
pub struct UnsafePort<T: InOut> { /* fields omitted */ }
An unsafe I/O port over an arbitrary type supporting the InOut
interface.
This version of Port
has unsafe read
and write
functions, and
it's appropriate for speaking to hardware that can potentially corrupt
memory or cause undefined behavior.
Methods
impl<T: InOut> UnsafePort<T>
[src]
const unsafe fn new(port: u16) -> UnsafePort<T>
Create a new I/O port.
unsafe fn read(&mut self) -> T
Read data from the port.
unsafe fn write(&mut self, value: T)
Write data to the port.