summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/hal/serial_com.c
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2026-10-19 11:06:32 -0400
committerJon Santmyer <jon@jonsantmyer.com>2026-10-19 11:06:32 -0400
commit44f9642bfc9ce9f740d508670befb569e06621a2 (patch)
treeff64ec6fd0562b4b9e6ba665fceeec52f2371840 /arch/x86_64/hal/serial_com.c
parentb2920331b103d43793ac8be927a80a593ce0be5a (diff)
downloadjove-kernel-44f9642bfc9ce9f740d508670befb569e06621a2.tar.gz
jove-kernel-44f9642bfc9ce9f740d508670befb569e06621a2.tar.bz2
jove-kernel-44f9642bfc9ce9f740d508670befb569e06621a2.zip
add debug console. start work on userland pagedir manipulation toolsHEADmain
Diffstat (limited to 'arch/x86_64/hal/serial_com.c')
-rw-r--r--arch/x86_64/hal/serial_com.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86_64/hal/serial_com.c b/arch/x86_64/hal/serial_com.c
index c571057..ec39d21 100644
--- a/arch/x86_64/hal/serial_com.c
+++ b/arch/x86_64/hal/serial_com.c
@@ -10,26 +10,26 @@ serial_com_recv(uint16_t port)
return inb(SERIAL_COM_LSR(port)) & 1;
}
-static char
-serial_com_getc(uint16_t port)
-{
- while(serial_com_recv(port) == 0);
- return inb(port);
-}
-
static int
serial_com_put_ready(uint16_t port)
{
return inb(SERIAL_COM_LSR(port)) & 0x20;
}
-static void
+void
serial_com_putc(uint16_t port, char c)
{
while(serial_com_put_ready(port) == 0);
outb(port, c);
}
+char
+serial_com_getc(uint16_t port)
+{
+ while(serial_com_recv(port) == 0);
+ return inb(port);
+}
+
int
serial_com_init_port(
uint16_t port,