Trait IoAccess

Source
pub trait IoAccess {
    // Required methods
    unsafe fn inb(&self, port: u16) -> u8;
    unsafe fn outb(&self, port: u16, data: u8);
}
Expand description

A trait to access io ports used by the serial device.

Required Methods§

Source

unsafe fn inb(&self, port: u16) -> u8

Issue an in byte instruction.

§Safety

The caller must be sure that the given port is safe to read from.

Source

unsafe fn outb(&self, port: u16, data: u8)

Issue an out byte instruction.

§Safety

The caller must be sure that the given port is safe to write to, and that the given value is safe for it.

Implementors§