feat: made more definitions constant and did some more minor

improvements
This commit is contained in:
2021-01-29 20:25:37 +01:00
parent d7f0e8dd36
commit 5a1caef5b1
13 changed files with 114 additions and 30 deletions

View File

@@ -1,6 +1,11 @@
#ifndef MY_KERNEL_DRIVERS_PORT_H
#define MY_KERNEL_DRIVERS_PORT_H
#define PORT_PIC_MASTER_COMMAND 0x20
#define PORT_PIC_MASTER_DATA 0x21
#define PORT_PIC_SLAVE_COMMAND 0xA0
#define PORT_PIC_SLAVE_DATA 0xA1
//http://www.osdever.net/FreeVGA/vga/crtcreg.htm#0A
#define PORT_REG_SCREEN_CTRL 0x3d4
#define PORT_REG_SCREEN_CTRL_CURSOR_H 0x0E
@@ -26,11 +31,6 @@
// https://wiki.osdev.org/PIT
#define PORT_PIT_COMMAND 0x43
#define PIT_MODE_BIN 0x0
#define PIT_MODE_HW_STROBE 0b0101
#define PIT_MODE_SQUARE_WAVE 0b0110
#define PIT_ACCESS_MODE_HL 0b000011
#define PIT_CHANNEL_0 0b00000000
#define PORT_PIT_DATA_0 0x40
#define PORT_PIT_DATA_1 0x41
#define PORT_PIT_DATA_3 0x42