From 391ed256d21a6ae2e2456d1809f357e6e96e15d1 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 20 Jan 2020 23:12:54 +0100 Subject: Added pure awesomeness Actually quite some days of work but ok --- src/kernel/input/ps2/keyboard.c | 6 +++--- src/kernel/input/ps2/mouse.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/kernel/input/ps2') diff --git a/src/kernel/input/ps2/keyboard.c b/src/kernel/input/ps2/keyboard.c index 4cbbf04..3c4ef0a 100644 --- a/src/kernel/input/ps2/keyboard.c +++ b/src/kernel/input/ps2/keyboard.c @@ -2,8 +2,8 @@ #include #include #include -#include #include +#include int shift_pressed; int control_pressed; @@ -126,8 +126,8 @@ void keyboard_rate() void keyboard_clear_buffer() { - ufree(keyboard_buffer); - keyboard_buffer = (char *) umalloc(4096); // 4KiB + kfree(keyboard_buffer); + keyboard_buffer = (char *) kmalloc(4096); // 4KiB } // Installs the keyboard handler into IRQ1 diff --git a/src/kernel/input/ps2/mouse.c b/src/kernel/input/ps2/mouse.c index 8b36ef9..c9fa94f 100644 --- a/src/kernel/input/ps2/mouse.c +++ b/src/kernel/input/ps2/mouse.c @@ -85,7 +85,7 @@ void mouse_install() mouse_wait(1); outb(0x64, 0x20); mouse_wait(0); - status = (inb(0x60) | 3); + status = (unsigned char) (inb(0x60) | 3); mouse_wait(1); outb(0x64, 0x60); mouse_wait(1); @@ -109,7 +109,7 @@ void mouse_install() mouse_read(); mouse_write(0xF2); mouse_read(); - status = mouse_read(); + status = (unsigned char) mouse_read(); if (status == 3) serial_printf("Scrollwheel support!"); // Activate 4th and 5th mouse buttons @@ -130,7 +130,7 @@ void mouse_install() mouse_read(); mouse_write(0xF2); mouse_read(); - status = mouse_read(); + status = (unsigned char) mouse_read(); if (status == 4) serial_printf("4th and 5th mouse button support!"); /* TODO: Fix mouse laggyness -- cgit v1.2.3