diff options
Diffstat (limited to 'kernel/inc')
-rw-r--r-- | kernel/inc/io.h | 8 | ||||
-rw-r--r-- | kernel/inc/ps2.h | 9 |
2 files changed, 10 insertions, 7 deletions
diff --git a/kernel/inc/io.h b/kernel/inc/io.h index fc294f1..5176bd3 100644 --- a/kernel/inc/io.h +++ b/kernel/inc/io.h @@ -3,21 +3,23 @@ #ifndef DEV_H #define DEV_H +#include <boot.h> #include <def.h> #include <sys.h> struct io_dev { - const char *name; res (*read)(void *buf, u32 offset, u32 count) NONNULL; res (*write)(void *buf, u32 offset, u32 count) NONNULL; res (*control)(u32 request, void *arg1, void *arg2, void *arg3); + res (*ready)(void); }; -void io_install(void); +void io_install(struct boot_info *boot); +void io_add(enum io_type io, struct io_dev *dev) NONNULL; res io_control(enum io_type io, u32 request, void *arg1, void *arg2, void *arg3); res io_write(enum io_type io, void *buf, u32 offset, u32 count); res io_read(enum io_type io, void *buf, u32 offset, u32 count); -res io_poll(u32 *devs); +res io_poll(u32 *devs) NONNULL; #endif diff --git a/kernel/inc/ps2.h b/kernel/inc/ps2.h index fb923bf..42d8127 100644 --- a/kernel/inc/ps2.h +++ b/kernel/inc/ps2.h @@ -33,14 +33,15 @@ u8 ps2_read_data(void); u8 ps2_write_data(u8 byte); struct ps2_status ps2_read_status(void); u8 ps2_write_command(u8 byte); +u8 ps2_write_device(u8 device, u8 data); void ps2_detect(void); -u8 ps2_keyboard_support(void); -u8 ps2_mouse_support(void); +u8 ps2_keyboard_detect(void); +u8 ps2_mouse_detect(void); -void ps2_keyboard_install(void); +void ps2_keyboard_install(u8 device); void ps2_keyboard_reset(void); -void ps2_mouse_install(void); +void ps2_mouse_install(u8 device); #endif |