Trait cpuio::InOut
[−]
[src]
pub trait InOut { unsafe fn port_in(port: u16) -> Self; unsafe fn port_out(port: u16, value: Self); }
This trait is defined for any type which can be read or written over a
port. The processor supports I/O with u8
, u16
and u32
. The
functions in this trait are all unsafe because they can write to
arbitrary ports.
Required Methods
unsafe fn port_in(port: u16) -> Self
Read a value from the specified port.
unsafe fn port_out(port: u16, value: Self)
Write a value to the specified port.
Implementors
impl InOut for u8
impl InOut for u16
impl InOut for u32