blob: 28af387117812c7aa5e712c7d7389353928f3d49 [file] [log] [blame]
swissChilid8137922021-02-17 15:34:07 -08001#pragma once
2
3#include "kint.h"
swissChili19ef4182021-02-21 17:45:51 -08004#include "registers.h"
5
6#define KBD_CMD_PORT 0x64
7#define KBD_DATA_PORT 0x60
8
9struct kbd_scan_code_info
10{
11 bool pressed;
12 bool escape;
13 char key;
14};
15
16extern struct kbd_scan_code_info scan_code_table[0xff];
swissChilid8137922021-02-17 15:34:07 -080017
18void outb(ushort port, uchar val);
19uchar inb(ushort port);
20ushort inw(ushort port);
21
22void *memset(void *s, int c, size_t n);
23void *memcpy(void *dest, const void *src, size_t n);
swissChili9b3584b2021-02-18 13:57:27 -080024
25void io_wait();
swissChili19ef4182021-02-21 17:45:51 -080026
27uchar kbd_scan_code();
28void kbd_handle_input(struct registers *registers);
29void init_kbd();