Struct x86_64::instructions::port::PortGeneric
source · pub struct PortGeneric<T, A> { /* private fields */ }
Expand description
An I/O port.
The port reads or writes values of type T
and has read/write access specified by A
.
Use the provided marker types or aliases to get a port type with the access you need:
PortGeneric<T, ReadWriteAccess>
->Port<T>
PortGeneric<T, ReadOnlyAccess>
->PortReadOnly<T>
PortGeneric<T, WriteOnlyAccess>
->PortWriteOnly<T>
Implementations§
source§impl<T, A> PortGeneric<T, A>
impl<T, A> PortGeneric<T, A>
sourcepub const fn new(port: u16) -> PortGeneric<T, A>
pub const fn new(port: u16) -> PortGeneric<T, A>
Creates an I/O port with the given port number.