summaryrefslogtreecommitdiff
path: root/kernel/drivers/tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/tty.c')
-rw-r--r--kernel/drivers/tty.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/kernel/drivers/tty.c b/kernel/drivers/tty.c
index 88e161f..20a8f14 100644
--- a/kernel/drivers/tty.c
+++ b/kernel/drivers/tty.c
@@ -9,13 +9,13 @@
static const uint8_t width = 80;
static const uint8_t height = 25;
-static volatile uint16_t *buffer = NULL;
+static volatile uint16_t *buffer = (uint16_t*)VGA_ADDR;
// position
-static uint32_t x, y;
+static uint32_t x = 0, y = 0;
// color
-static uint8_t fg, bg;
+static uint8_t fg = 15, bg = 0;
// blank color
const uint16_t blank = (uint16_t)0 | 0 << 12 | 15 << 8;
@@ -54,15 +54,6 @@ static void term_scroll(int lines)
sti();
}
-void tty_init(void)
-{
- buffer = mapaddr((void *)VGA_ADDR, width * height * sizeof(uint16_t));
- x = 0;
- y = 0;
- fg = 15;
- bg = 0;
-}
-
void tty_out(char c)
{
if (buffer == NULL)