![]() |
FrostWing
A lightweight raw-control operating system.
|
Header file for Hardware Abstraction Layer -> Source from GoGX OS. More...


Go to the source code of this file.
Macros | |
| #define | pic1_command 0x20 |
| #define | pic1_data 0x21 |
| #define | pic2_command 0xA0 |
| #define | pic2_data 0xA1 |
Functions | |
| void | init_hardware_abstraction_layer () |
| Initializes HAL by remapping the PIC interrupts to avoid conflicts. | |
| void | outb (int16 port, int8 value) |
| Output a byte to the specified I/O port. | |
| int8 | inb (int16 port) |
| Read a byte from the specified I/O port. | |
| void | outw (int16 portNumber, int16 data) |
| Output a 16-bit value to the specified I/O port. | |
| int16 | inw (int16 portNumber) |
| Read a 16-bit value from the specified I/O port. | |
| int32 | inl (int16 portNumber) |
| Read a 32-bit value from the specified I/O port. | |
| void | outl (int16 portNumber, int32 data) |
| Output a 32-bit value to the specified I/O port. | |
| void | io_wait () |
| Perform an I/O wait operation. | |
Header file for Hardware Abstraction Layer -> Source from GoGX OS.
Definition in file hal.h.
| int8 inb | ( | int16 | port | ) |
Read a byte from the specified I/O port.
This function reads a byte from the specified I/O port using inline assembly.
| port | The 16-bit I/O port number. |
| int32 inl | ( | int16 | portNumber | ) |
Read a 32-bit value from the specified I/O port.
This function reads a 32-bit value from the specified I/O port using inline assembly.
| portNumber | The 16-bit I/O port number. |
| int16 inw | ( | int16 | portNumber | ) |
Read a 16-bit value from the specified I/O port.
This function reads a 16-bit value from the specified I/O port using inline assembly.
| portNumber | The 16-bit I/O port number. |
| void io_wait | ( | ) |
Perform an I/O wait operation.
This function performs an I/O wait operation using inline assembly. It is used to add a small delay in I/O operations.
| void outb | ( | int16 | port, |
| int8 | value ) |
Output a byte to the specified I/O port.
This function sends a byte to the specified I/O port using inline assembly.
| port | The 16-bit I/O port number. |
| value | The 8-bit value to be sent to the port. |
| void outl | ( | int16 | portNumber, |
| int32 | data ) |
Output a 32-bit value to the specified I/O port.
This function sends a 32-bit value to the specified I/O port using inline assembly.
| portNumber | The 16-bit I/O port number. |
| data | The 32-bit value to be sent to the port. |
| void outw | ( | int16 | portNumber, |
| int16 | data ) |
Output a 16-bit value to the specified I/O port.
This function sends a 16-bit value to the specified I/O port using inline assembly.
| portNumber | The 16-bit I/O port number. |
| data | The 16-bit value to be sent to the port. |