summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2024-05-29 00:32:27 -0500
committerDanny Holman <dholman@gymli.org>2024-05-29 00:32:27 -0500
commit77938e5926361ef8c4979df59481fe1478e2c038 (patch)
tree0dc4d8e0f268f0bde993336d93f41dc87bccfb2e
parent32441640aa2e78fd4aa8db00ec07a62c9d12f2d2 (diff)
include: kernel: input: add in keyboard.h
Add in a missing header file that allows the AT keyboard driver to be used. Signed-off-by: Danny Holman <dholman@gymli.org>
-rw-r--r--include/kernel/input/keyboard.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/kernel/input/keyboard.h b/include/kernel/input/keyboard.h
new file mode 100644
index 0000000..a0d1470
--- /dev/null
+++ b/include/kernel/input/keyboard.h
@@ -0,0 +1,32 @@
+#ifndef KERNEL_KEYBOARD_H
+#define KERNEL_KEYBOARD_H
+
+#include <kernel/asm.h>
+
+#define KB_STAT 0x64
+#define KB_DATA 0x60
+
+#define KB_DIB 0x01
+#define KB_SHIFT (1<<0)
+#define KB_CTL (1<<1)
+#define KB_ALT (1<<2)
+#define KB_CPSLK (1<<3)
+#define KB_NUMLK (1<<4)
+#define KB_SCLLK (1<<5)
+#define KB_E0ESC (1<<6)
+
+#define KB_HOME 0xE0
+#define KB_END 0xE1
+#define KB_UP 0xE2
+#define KB_DOWN 0xE3
+#define KB_LEFT 0xE4
+#define KB_RGHT 0xE5
+#define KB_PGUP 0xE6
+#define KB_PGDN 0xE7
+#define KB_INS 0xE8
+#define KB_DEL 0xE9
+
+char keyboard_getchar(void);
+void keyboard_handler(struct isr_frame *frame);
+
+#endif