diff options
Diffstat (limited to 'kernel/drivers/ps2')
-rw-r--r-- | kernel/drivers/ps2/keyboard.c | 8 | ||||
-rw-r--r-- | kernel/drivers/ps2/mouse.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/kernel/drivers/ps2/keyboard.c b/kernel/drivers/ps2/keyboard.c index 3516a7e..b16f4b2 100644 --- a/kernel/drivers/ps2/keyboard.c +++ b/kernel/drivers/ps2/keyboard.c @@ -1,11 +1,11 @@ // MIT License, Copyright (c) 2020 Marvin Borner #include <def.h> +#include <dev.h> #include <drivers/cpu.h> #include <drivers/int.h> #include <drivers/ps2.h> #include <errno.h> -#include <io.h> #include <mem.h> #include <print.h> #include <proc.h> @@ -43,7 +43,7 @@ static void keyboard_handler(void) state = 0; merged = 0; - io_unblock(IO_KEYBOARD); + dev_unblock(DEV_KEYBOARD); } static res keyboard_read(void *buf, u32 offset, u32 count) @@ -75,8 +75,8 @@ CLEAR void ps2_keyboard_install(u8 device) int_event_handler_add(1, keyboard_handler); queue = stack_new(); - struct io_dev *dev = zalloc(sizeof(*dev)); + struct dev_dev *dev = zalloc(sizeof(*dev)); dev->read = keyboard_read; dev->ready = keyboard_ready; - io_add(IO_KEYBOARD, dev); + dev_add(DEV_KEYBOARD, dev); } diff --git a/kernel/drivers/ps2/mouse.c b/kernel/drivers/ps2/mouse.c index ab20c90..086f522 100644 --- a/kernel/drivers/ps2/mouse.c +++ b/kernel/drivers/ps2/mouse.c @@ -1,11 +1,11 @@ // MIT License, Copyright (c) 2020 Marvin Borner #include <assert.h> +#include <dev.h> #include <drivers/cpu.h> #include <drivers/int.h> #include <drivers/ps2.h> #include <errno.h> -#include <io.h> #include <mem.h> #include <print.h> #include <proc.h> @@ -33,7 +33,7 @@ static void mouse_finish(void) event->but.middle = (mouse_byte[0] >> 2) & 1; stack_push_bot(queue, event); mouse_cycle = 0; - io_unblock(IO_MOUSE); + dev_unblock(DEV_MOUSE); } static void mouse_handler(void) @@ -141,8 +141,8 @@ CLEAR void ps2_mouse_install(u8 device) int_event_handler_add(12, mouse_handler); queue = stack_new(); - struct io_dev *dev = zalloc(sizeof(*dev)); + struct dev_dev *dev = zalloc(sizeof(*dev)); dev->read = mouse_read; dev->ready = mouse_ready; - io_add(IO_MOUSE, dev); + dev_add(DEV_MOUSE, dev); } |