aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/input/ps2
diff options
context:
space:
mode:
authorMarvin Borner2019-12-21 22:22:03 +0100
committerMarvin Borner2019-12-21 22:22:03 +0100
commit499784a824c541001c2fd52ae95eba88dcfc952b (patch)
treec3c26d7c8a3b9291d909f4655b7d27a5ae2369bc /src/kernel/input/ps2
parent38610cd06dc0b5a3a4ee46f5fe7c341191aa2bc1 (diff)
Many debugging/serial improvements
Sorry for the little information, but I did many things :)
Diffstat (limited to 'src/kernel/input/ps2')
-rw-r--r--src/kernel/input/ps2/keyboard.c4
-rw-r--r--src/kernel/input/ps2/mouse.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/kernel/input/ps2/keyboard.c b/src/kernel/input/ps2/keyboard.c
index bafecd5..4cbbf04 100644
--- a/src/kernel/input/ps2/keyboard.c
+++ b/src/kernel/input/ps2/keyboard.c
@@ -4,8 +4,6 @@
#include <kernel/input/input.h>
#include <kernel/lib/stdlib/liballoc.h>
#include <kernel/lib/string.h>
-#include <kernel/paging/paging.h>
-#include <kernel/lib/lib.h>
int shift_pressed;
int control_pressed;
@@ -109,7 +107,7 @@ void keyboard_handler(struct regs *r)
keyboard_char_buffer = current_keymap[scan_code];
keyboard_buffer[strlen(keyboard_buffer)] = keyboard_char_buffer;
} else { // RELEASE
- if (current_keymap[scan_code] == -107) // TODO: IDK WHY -107?!
+ if (current_keymap[scan_code] == (int) 0xffffffb5) // TODO: IDK WHY -107?!
control_pressed = 0;
}
}
diff --git a/src/kernel/input/ps2/mouse.c b/src/kernel/input/ps2/mouse.c
index 75d80a1..8b36ef9 100644
--- a/src/kernel/input/ps2/mouse.c
+++ b/src/kernel/input/ps2/mouse.c
@@ -1,6 +1,7 @@
#include <kernel/interrupts/interrupts.h>
#include <kernel/io/io.h>
#include <kernel/graphics/vesa.h>
+#include <kernel/lib/stdio.h>
char mouse_cycle = 0;
char mouse_byte[3];
@@ -109,7 +110,7 @@ void mouse_install()
mouse_write(0xF2);
mouse_read();
status = mouse_read();
- if (status == 3) serial_write("Scrollwheel support!\n");
+ if (status == 3) serial_printf("Scrollwheel support!");
// Activate 4th and 5th mouse buttons
mouse_write(0xF2);
@@ -130,7 +131,7 @@ void mouse_install()
mouse_write(0xF2);
mouse_read();
status = mouse_read();
- if (status == 4) serial_write("4th and 5th mouse button support!\n");
+ if (status == 4) serial_printf("4th and 5th mouse button support!");
/* TODO: Fix mouse laggyness
mouse_write(0xE8);