From ae5499137e377e08feb523c08b26495e79ed16df Mon Sep 17 00:00:00 2001 From: Aleksa Vuckovic Date: Fri, 2 Dec 2022 00:56:33 +0100 Subject: now also working on amd cpus --- kernel/src/devices/keyboard.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'kernel/src/devices/keyboard.c') 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) { -- cgit v1.2.3