aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/events/event.c
diff options
context:
space:
mode:
authorMarvin Borner2020-06-17 18:31:46 +0200
committerMarvin Borner2020-06-17 18:31:46 +0200
commiteed77bd2970a00d1394ed027ceca5b646e4671ce (patch)
treec44643d98aed2b6818f2b33417c0dea9c5853094 /src/kernel/events/event.c
parent49dfa1f4021026bf7c4d77817959c8aa24067016 (diff)
Started rewrite
Diffstat (limited to 'src/kernel/events/event.c')
-rw-r--r--src/kernel/events/event.c31
1 files changed, 0 insertions, 31 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