summaryrefslogtreecommitdiff
path: root/arch/i386/include/kernel
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2024-05-27 13:58:00 -0500
committerDanny Holman <dholman@gymli.org>2024-05-27 13:58:00 -0500
commit61760f9301427ea56a62ec02af3d0d8ae4745be7 (patch)
treec63057d16075b2b411eab36424f1d481b4a8c9f1 /arch/i386/include/kernel
parentaaf7355c5ededfcdc877c7f2989fb1ba02dfb848 (diff)
drivers: create a subdir just for driver code
Create a subdirectory branching from the project root. This directory will contain nothing but driver and device code. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386/include/kernel')
-rw-r--r--arch/i386/include/kernel/framebuffer.h17
-rw-r--r--arch/i386/include/kernel/keyboard.h32
-rw-r--r--arch/i386/include/kernel/vga.h33
3 files changed, 0 insertions, 82 deletions
diff --git a/arch/i386/include/kernel/framebuffer.h b/arch/i386/include/kernel/framebuffer.h
deleted file mode 100644
index ef0249c..0000000
--- a/arch/i386/include/kernel/framebuffer.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef I386_FRAMEBUFFER_H
-#define I386_FRAMEBUFFER_H
-
-#include <stddef.h>
-#include <stdint.h>
-
-void fb_init(void);
-void fb_setcolor(uint8_t color);
-void fb_putchar(char c);
-void fb_setpos(int x, int y);
-
-static inline void fb_write(const char *data, size_t size) {
- for (size_t i = 0; i < size; i++)
- fb_putchar(data[i]);
-}
-
-#endif
diff --git a/arch/i386/include/kernel/keyboard.h b/arch/i386/include/kernel/keyboard.h
deleted file mode 100644
index 7b63993..0000000
--- a/arch/i386/include/kernel/keyboard.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef I386_KEYBOARD_H
-#define I386_KEYBOARD_H
-
-#include <stdint.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(void);
-
-#endif
diff --git a/arch/i386/include/kernel/vga.h b/arch/i386/include/kernel/vga.h
deleted file mode 100644
index e89f202..0000000
--- a/arch/i386/include/kernel/vga.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef I386_VGA_H
-#define I386_VGA_H
-
-#include <stdint.h>
-
-enum vga_color {
- VGA_COLOR_BLACK = 0,
- VGA_COLOR_BLUE = 1,
- VGA_COLOR_GREEN = 2,
- VGA_COLOR_CYAN = 3,
- VGA_COLOR_RED = 4,
- VGA_COLOR_MAGENTA = 5,
- VGA_COLOR_BROWN = 6,
- VGA_COLOR_LIGHT_GREY = 7,
- VGA_COLOR_DARK_GREY = 8,
- VGA_COLOR_LIGHT_BLUE = 9,
- VGA_COLOR_LIGHT_GREEN = 10,
- VGA_COLOR_LIGHT_CYAN = 11,
- VGA_COLOR_LIGHT_RED = 12,
- VGA_COLOR_LIGHT_MAGENTA = 13,
- VGA_COLOR_LIGHT_BROWN = 14,
- VGA_COLOR_LIGHT_WHITE = 15,
-};
-
-static inline uint8_t vga_entry_color(enum vga_color fg, enum vga_color bg) {
- return fg | bg << 4;
-}
-
-static inline uint16_t vga_entry(unsigned char uc, uint8_t color) {
- return (uint16_t)uc | (uint16_t)color << 8;
-}
-
-#endif