Abstracts access to the I/O address space.
More...
#include <machine/ioport.h>
Abstracts access to the I/O address space.
x86 PCs have a separated I/O address space that is accessible only via the machine instructions in
and out
. An IOPort object encapsulates the corresponding address in the I/O address space and can be used for byte or word-wise reading or writing.
◆ IOPort()
Constructor.
- Parameters
-
addr | Address from the I/O address space |
◆ outb()
void IOPort::outb |
( |
uint8_t |
val | ) |
const |
|
inline |
Write one byte to the I/O port.
- Parameters
-
val | The value to be written |
◆ outw()
Write one word (2 bytes) to the I/O port.
- Parameters
-
val | The value to be written |
◆ inb()
Read one byte from the I/O port.
- Returns
- Read byte
◆ inw()
Read one word (2 bytes) from the I/O port.
- Returns
- Read word (2 bytes)
◆ address
Address in I/O address space.
The documentation for this class was generated from the following file: