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(uint16 port, uint8 value);
35
44uint8 inb(uint16 port);
45
54void outw(uint16 portNumber, uint16 data);
55
64uint16 inw(uint16 portNumber);
65
74uint32 inl(uint16 portNumber);
75
84void outl(uint16 portNumber, uint32 data);
85
92void io_wait(void);
93void io_wait_us(uint32_t usec);
94void io_wait_ms(uint32_t msec);
This is a basic header files with FrostWing specific short forms and basically a good for life header...
uint32 inl(uint16 portNumber)
Read a 32-bit value from the specified I/O port.
uint8 inb(uint16 port)
Read a byte from the specified I/O port.
void outw(uint16 portNumber, uint16 data)
Output a 16-bit value to the specified I/O port.
void init_hardware_abstraction_layer(void)
Initializes HAL by remapping the PIC interrupts to avoid conflicts.
void outl(uint16 portNumber, uint32 data)
Output a 32-bit value to the specified I/O port.
uint16 inw(uint16 portNumber)
Read a 16-bit value from the specified I/O port.
void io_wait(void)
Perform an I/O wait operation.
void outb(uint16 port, uint8 value)
Output a byte to the specified I/O port.