diff options
author | Marvin Borner | 2020-08-15 18:02:49 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-15 18:02:49 +0200 |
commit | 9a827eb5f6ff58bf801bc98bcb653876428ebe69 (patch) | |
tree | 6fd75fd29a2bd55fd4e1ebb7271176abb3936115 /kernel/drivers | |
parent | 9f16b032d38613ca95e321e1d1e652c43129c68b (diff) |
Removed vesa from kernel
Diffstat (limited to 'kernel/drivers')
-rw-r--r-- | kernel/drivers/keyboard.c | 3 | ||||
-rw-r--r-- | kernel/drivers/vesa.c | 42 |
2 files changed, 1 insertions, 44 deletions
diff --git a/kernel/drivers/keyboard.c b/kernel/drivers/keyboard.c index d9ac5bb..16809b6 100644 --- a/kernel/drivers/keyboard.c +++ b/kernel/drivers/keyboard.c @@ -2,7 +2,6 @@ #include <cpu.h> #include <def.h> -#include <gui.h> #include <interrupts.h> char keymap[128]; @@ -16,7 +15,7 @@ void keyboard_handler() return; if ((scan_code & 0x80) == 0) { // PRESS - gui_term_write_char(keymap[scan_code]); + /* gui_term_write_char(keymap[scan_code]); */ } } diff --git a/kernel/drivers/vesa.c b/kernel/drivers/vesa.c deleted file mode 100644 index 2d3e107..0000000 --- a/kernel/drivers/vesa.c +++ /dev/null @@ -1,42 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#include <def.h> -#include <vesa.h> - -void vesa_draw_rectangle(int x1, int y1, int x2, int y2, const u32 color[3]) -{ - int pos1 = x1 * vbe_bpl + y1 * vbe_pitch; - u8 *draw = &fb[pos1]; - for (int i = 0; i <= y2 - y1; i++) { - for (int j = 0; j <= x2 - x1; j++) { - draw[vbe_bpl * j] = color[2]; - draw[vbe_bpl * j + 1] = color[1]; - draw[vbe_bpl * j + 2] = color[0]; - } - draw += vbe_pitch; - } -} - -void vesa_set_pixel(u16 x, u16 y, const u32 color[3]) -{ - u8 pos = x * vbe_bpl + y * vbe_pitch; - u8 *draw = &fb[pos]; - draw[pos] = (char)color[2]; - draw[pos + 1] = (char)color[1]; - draw[pos + 2] = (char)color[0]; -} - -void vesa_fill(const u32 color[3]) -{ - vesa_draw_rectangle(0, 0, vbe->width - 1, vbe->height - 1, color); -} - -void vesa_init(struct vbe *info) -{ - vbe = info; - vbe_height = vbe->height; - vbe_width = vbe->width; - vbe_bpl = vbe->bpp >> 3; - vbe_pitch = vbe->pitch; - fb = (u8 *)vbe->framebuffer; -} |