diff options
Diffstat (limited to 'kernel/drivers/ps2')
-rw-r--r-- | kernel/drivers/ps2/keyboard.c | 7 | ||||
-rw-r--r-- | kernel/drivers/ps2/mouse.c | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/kernel/drivers/ps2/keyboard.c b/kernel/drivers/ps2/keyboard.c index bf1a520..3516a7e 100644 --- a/kernel/drivers/ps2/keyboard.c +++ b/kernel/drivers/ps2/keyboard.c @@ -2,7 +2,7 @@ #include <def.h> #include <drivers/cpu.h> -#include <drivers/interrupts.h> +#include <drivers/int.h> #include <drivers/ps2.h> #include <errno.h> #include <io.h> @@ -18,9 +18,8 @@ PROTECTED static struct stack *queue = NULL; static struct event_keyboard *event = NULL; static int state = 0; static int merged = 0; -static void keyboard_handler(struct regs *r) +static void keyboard_handler(void) { - UNUSED(r); u8 scancode = ps2_read_data(); // TODO: Support more than two-byte scancodes @@ -73,7 +72,7 @@ CLEAR void ps2_keyboard_install(u8 device) { UNUSED(device); - irq_install_handler(1, keyboard_handler); + int_event_handler_add(1, keyboard_handler); queue = stack_new(); struct io_dev *dev = zalloc(sizeof(*dev)); diff --git a/kernel/drivers/ps2/mouse.c b/kernel/drivers/ps2/mouse.c index 680183d..ab20c90 100644 --- a/kernel/drivers/ps2/mouse.c +++ b/kernel/drivers/ps2/mouse.c @@ -2,7 +2,7 @@ #include <assert.h> #include <drivers/cpu.h> -#include <drivers/interrupts.h> +#include <drivers/int.h> #include <drivers/ps2.h> #include <errno.h> #include <io.h> @@ -36,9 +36,8 @@ static void mouse_finish(void) io_unblock(IO_MOUSE); } -static void mouse_handler(struct regs *r) +static void mouse_handler(void) { - UNUSED(r); switch (mouse_cycle) { case 0: mouse_byte[0] = ps2_read_data(); @@ -139,7 +138,7 @@ CLEAR void ps2_mouse_install(u8 device) { ps2_mouse_enable(device); - irq_install_handler(12, mouse_handler); + int_event_handler_add(12, mouse_handler); queue = stack_new(); struct io_dev *dev = zalloc(sizeof(*dev)); |