diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/include/vga.h | 3 | ||||
| -rw-r--r-- | drivers/tty.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/include/vga.h b/drivers/include/vga.h index 278601c..b83ec95 100644 --- a/drivers/include/vga.h +++ b/drivers/include/vga.h @@ -31,5 +31,8 @@ enum vga_color_t { #define VGA_MAKE_COLOR(fg, bg) (fg | bg << 4) #define VGA_MAKE_ENTRY(ch, col) (((uint16_t)ch)|((uint16_t)col<<8)) +#define VGA_RGBPACK(r, g, b) ((r << 16)|(g << 8)|(b << 0)) void vga_init(); + +void vga_drawpixel(int x, int y, uint32_t pix); diff --git a/drivers/tty.c b/drivers/tty.c index 6b83232..7bce7e7 100644 --- a/drivers/tty.c +++ b/drivers/tty.c @@ -1,4 +1,5 @@ #include <stdint.h> +#include <stdio.h> #include "io.h" #include "panic.h" #include "tty.h" @@ -34,6 +35,8 @@ void tty_init(void) } tty_set_color(VGA_MAKE_COLOR(VGA_LIGHT_GRAY, VGA_BLACK)); tty_clear(); + set_putchar(tty_putchar); + set_puts(tty_puts); } static void move_cursor(uint16_t cursor_idx) |