From 9ded3a2bde80eede5fd887812d70c2f834b53c84 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 13 Apr 2021 22:09:23 +0200 Subject: Started IO dev manager --- kernel/inc/io.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 kernel/inc/io.h (limited to 'kernel/inc/io.h') diff --git a/kernel/inc/io.h b/kernel/inc/io.h new file mode 100644 index 0000000..e05a419 --- /dev/null +++ b/kernel/inc/io.h @@ -0,0 +1,30 @@ +// MIT License, Copyright (c) 2021 Marvin Borner + +#ifndef DEV_H +#define DEV_H + +#include +#include + +enum io_type { + IO_MIN, + IO_FRAMEBUFFER, + IO_NETWORK, + IO_KEYBOARD, + IO_MOUSE, + IO_BUS, + IO_MAX, +}; + +struct io_dev { + const char *name; +}; + +void io_install(void); + +res io_control(); +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(); + +#endif -- cgit v1.2.3