Struct x86_64::instructions::port::Port [−][src]
pub struct Port<T: PortReadWrite> { /* fields omitted */ }
An I/O port.
Methods
impl<T: PortReadWrite> Port<T>
[src]
impl<T: PortReadWrite> Port<T>
pub const fn new(port: u16) -> Port<T>
[src]
pub const fn new(port: u16) -> Port<T>
Creates an I/O port with the given port number.
pub unsafe fn read(&self) -> T
[src]
pub unsafe fn read(&self) -> T
Reads from the port.
This function is unsafe because the I/O port could have side effects that violate memory safety.
pub unsafe fn write(&mut self, value: T)
[src]
pub unsafe fn write(&mut self, value: T)
Writes to the port.
This function is unsafe because the I/O port could have side effects that violate memory safety.