diff options
| author | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-12-02 00:56:33 +0100 |
|---|---|---|
| committer | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-12-02 00:56:33 +0100 |
| commit | ae5499137e377e08feb523c08b26495e79ed16df (patch) | |
| tree | 225f97cce28e31e064f08670cc9feb7ba101a45f /kernel/src/devices/keyboard.c | |
| parent | 9b3dd99abc763f5e2039933eda510ec62d395f8a (diff) | |
now also working on amd cpus
Diffstat (limited to 'kernel/src/devices/keyboard.c')
| -rw-r--r-- | kernel/src/devices/keyboard.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/src/devices/keyboard.c b/kernel/src/devices/keyboard.c index 0a2e364..73c052c 100644 --- a/kernel/src/devices/keyboard.c +++ b/kernel/src/devices/keyboard.c @@ -15,6 +15,17 @@ bool is_pressed[128]; #define BUFFER_SIZE 10000 stdbuff* keyboard_buffer; +void init_keyboard() +{ +// outb(KEYBOARD_CMD_PORT, 0xF3); +// io_wait(); +// outb(KEYBOARD_DATA_PORT, 0x00); +// io_wait(); +// while (!(inb(KEYBOARD_STATUS_PORT) & 1)) {} +// if (inb(KEYBOARD_DATA_PORT) == 0xFA) +// printf("[keyboard init]\n"); +} + void keyboard_handler() { if (keyboard_buffer == NULL) { |
