hazel/include/kernel/ps2.h

117 lines
2.4 KiB
C
Raw Normal View History

2024-07-28 10:11:15 -04:00
#ifndef HAZEL_PS2_H
#define HAZEL_PS2_H
#define PS2_8042_DATA 0x60
#define PS2_8042_STATUS 0x64
#define PS2_8042_COMMAND 0x64
#define ps2_reboot outb(0x64, 0xFE)
2024-07-28 10:11:15 -04:00
// SCANCODES
#define KBD_ESC 0x01
#define KBD_1 0x02
#define KBD_2 0x03
#define KBD_3 0x04
#define KBD_4 0x05
#define KBD_5 0x06
#define KBD_6 0x07
#define KBD_7 0x08
#define KBD_8 0x09
#define KBD_9 0x0A
#define KBD_0 0x0B
#define KBD_MINUS 0x0C
#define KBD_EQUALS 0x0D
#define KBD_BACKSPACE 0x0E
#define KBD_TAB 0x0F
#define KBD_Q 0x10
#define KBD_W 0x11
#define KBD_E 0x12
#define KBD_R 0x13
#define KBD_T 0x14
#define KBD_Y 0x15
#define KBD_U 0x16
#define KBD_I 0x17
#define KBD_O 0x18
#define KBD_P 0x19
#define KBD_LBRACKET 0x1A
#define KBD_RBRACKET 0x1B
#define KBD_ENTER 0x1C
#define KBD_LCTRL 0x1D
#define KBD_A 0x1E
#define KBD_S 0x1F
#define KBD_D 0x20
#define KBD_F 0x21
#define KBD_G 0x22
#define KBD_H 0x23
#define KBD_J 0x24
#define KBD_K 0x25
#define KBD_L 0x26
#define KBD_SEMICOLON 0x27
#define KBD_APOSTROPHE 0x28
#define KBD_GRAVE 0x29
#define KBD_LSHIFT 0x2A
#define KBD_BACKSLASH 0x2B
#define KBD_Z 0x2C
#define KBD_X 0x2D
#define KBD_C 0x2E
#define KBD_V 0x2F
#define KBD_B 0x30
#define KBD_N 0x31
#define KBD_M 0x32
#define KBD_COMMA 0x33
#define KBD_PERIOD 0x34
#define KBD_SLASH 0x35
#define KBD_RSHIFT 0x36
#define KBD_PRINTSCREEN 0x37
#define KBD_LALT 0x38
#define KBD_SPACE 0x39
#define KBD_CAPSLOCK 0x3A
#define KBD_F1 0x3B
#define KBD_F2 0x3C
#define KBD_F3 0x3D
#define KBD_F4 0x3E
#define KBD_F5 0x3F
#define KBD_F6 0x40
#define KBD_F7 0x41
#define KBD_F8 0x42
#define KBD_F9 0x43
#define KBD_F10 0x44
#define KBD_NUMLOCK 0x45
#define KBD_SCROLLLOCK 0x46
#define KBD_HOME 0x47
#define KBD_UP 0x48
#define KBD_PAGEUP 0x49
#define KBD_KP_MINUS 0x4A
#define KBD_LEFT 0x4B
#define KBD_KP_5 0x4C
#define KBD_RIGHT 0x4D
#define KBD_KP_PLUS 0x4E
#define KBD_END 0x4F
#define KBD_DOWN 0x50
#define KBD_PAGEDOWN 0x51
#define KBD_INSERT 0x52
#define KBD_DELETE 0x53
#define KBD_SYSRQ 0x54
#define KBD_F11 0x57
#define KBD_F12 0x58
#define KBD_KP_ENTER 0x9C
#define KBD_RCTRL 0x9D
#define KBD_KP_DIVIDE 0xB5
#define KBD_PRINTSCREEN2 0xB7
#define KBD_RALT 0xB8
#define KBD_HOME2 0xC7
#define KBD_UP2 0xC8
#define KBD_PAGEUP2 0xC9
#define KBD_LEFT2 0xCB
#define KBD_RIGHT2 0xCD
#define KBD_END2 0xCF
#define KBD_DOWN2 0xD0
#define KBD_PAGEDOWN2 0xD1
#define KBD_INSERT2 0xD2
#define KBD_DELETE2 0xD3
void ps2_init();
void ps2_handler();
#endif