aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/events')
-rw-r--r--src/kernel/events/event.c31
-rw-r--r--src/kernel/events/event.h9
2 files changed, 0 insertions, 40 deletions
diff --git a/src/kernel/events/event.c b/src/kernel/events/event.c
deleted file mode 100644
index a50e0c7..0000000
--- a/src/kernel/events/event.c
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <common.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <system.h>
-
-typedef u32 (*event_func)(u8 *);
-
-u32 (*event_table[])() = { [MAP_KEYBOARD] = NULL, [MAP_MOUSE] = NULL };
-
-u32 event_map(u32 id, u8 *function)
-{
- if (id >= sizeof(event_map) / sizeof(*event_map))
- return -1;
-
- event_table[id] = (u32)function;
- return 0;
-}
-
-u32 event_trigger(u32 id, u8 *data)
-{
- assert(id < sizeof(event_map) / sizeof(*event_map));
-
- event_func location = (event_func)event_table[id];
- if (!location) {
- warn("Event %d not mapped!", id);
- return -1;
- }
-
- location(data);
- return 0;
-} \ No newline at end of file
diff --git a/src/kernel/events/event.h b/src/kernel/events/event.h
deleted file mode 100644
index 3f46632..0000000
--- a/src/kernel/events/event.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef MELVIX_EVENT_H
-#define MELVIX_EVENT_H
-
-#include <stdint.h>
-
-u32 event_map(u32 id, u8 *function);
-u32 event_trigger(u32 id, u8 *data);
-
-#endif \ No newline at end of file