summaryrefslogtreecommitdiff
path: root/kernel/drivers
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-04-07 08:24:06 -0400
committerFreya Murphy <freya@freyacat.org>2025-04-07 08:24:06 -0400
commit78def513c710f12d35c1d22e7112d750c2e733d3 (patch)
treee1b20760d654acc28a76bedb9b098b435c5396df /kernel/drivers
parentfix tripple pci device print (diff)
downloadcomus-78def513c710f12d35c1d22e7112d750c2e733d3.tar.gz
comus-78def513c710f12d35c1d22e7112d750c2e733d3.tar.bz2
comus-78def513c710f12d35c1d22e7112d750c2e733d3.zip
remove tty_init fn
Diffstat (limited to 'kernel/drivers')
-rw-r--r--kernel/drivers/drivers.c1
-rw-r--r--kernel/drivers/tty.c15
2 files changed, 3 insertions, 13 deletions
diff --git a/kernel/drivers/drivers.c b/kernel/drivers/drivers.c
index b4c2c90..00ee247 100644
--- a/kernel/drivers/drivers.c
+++ b/kernel/drivers/drivers.c
@@ -7,7 +7,6 @@
void drivers_init(void)
{
uart_init();
- tty_init();
pci_init();
clock_update();
}
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)