FrostWing
A lightweight raw-control operating system.
Loading...
Searching...
No Matches
hal.h
Go to the documentation of this file.
1
11
12#include <stdint.h>
13#include <basics.h>
14
15#define pic1_command 0x20
16#define pic1_data 0x21
17#define pic2_command 0xA0
18#define pic2_data 0xA1
19
25
34void outb(int16 port, int8 value);
35
44int8 inb(int16 port);
45
54void outw(int16 portNumber, int16 data);
55
64int16 inw(int16 portNumber);
65
74int32 inl(int16 portNumber);
75
84void outl(int16 portNumber, int32 data);
85
92void io_wait();
This is a basic header files with FrostWing specific short forms and basically a good for life header...
void outb(int16 port, int8 value)
Output a byte to the specified I/O port.
int16 inw(int16 portNumber)
Read a 16-bit value from the specified I/O port.
void init_hardware_abstraction_layer()
Initializes HAL by remapping the PIC interrupts to avoid conflicts.
void io_wait()
Perform an I/O wait operation.
int32 inl(int16 portNumber)
Read a 32-bit value from the specified I/O port.
int8 inb(int16 port)
Read a byte from the specified I/O port.
void outl(int16 portNumber, int32 data)
Output a 32-bit value to the specified I/O port.
void outw(int16 portNumber, int16 data)
Output a 16-bit value to the specified I/O port.