summaryrefslogtreecommitdiff
path: root/kc/core/i8042.c
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2026-05-26 21:32:27 +0000
committerAda Christine <adachristine18@gmail.com>2026-05-26 21:32:27 +0000
commita10aabfcd52f702057316018cd7847ab2bfe4aa1 (patch)
treecc4652d2b602798934e8a48b4939cfb20eda1989 /kc/core/i8042.c
parent90c29fdde317c39384011a6ba97077c138f13ad6 (diff)
we're bringing kjarna back and not doing the crazy stuff with trying to have task management during efi. that was a bit extra.kjarna
Diffstat (limited to 'kc/core/i8042.c')
-rw-r--r--kc/core/i8042.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/kc/core/i8042.c b/kc/core/i8042.c
index 0ba12dc..f6b63b0 100644
--- a/kc/core/i8042.c
+++ b/kc/core/i8042.c
@@ -2,7 +2,7 @@
#include "port.h"
#include "i8042.h"
#include "pic8259.h"
-#include <lib/kstdio.h>
+#include <libc/stdio.h>
static void i8042_init(void);
static void i8042_enable(void) {}
@@ -99,21 +99,21 @@ static void i8042_set_config(void)
i8042_command(0x20);
uint8_t config_byte;
i8042_read(&config_byte);
- kprintf("i8042: current config: %#0.2x\n", config_byte);
+ printf("i8042: current config: %#0.2x\n", config_byte);
config_byte &= 0xfc;
if (config_byte & (0x1 << 5))
{
maybe_dual_channel = true;
}
config_byte |= 0x01;
- kprintf("i8042: new config: %#0.2x\n", config_byte);
+ printf("i8042: new config: %#0.2x\n", config_byte);
i8042_command(0x60);
i8042_write(config_byte);
i8042_command(0xaa);
uint8_t bist_result;
if (i8042_read(&bist_result) && bist_result != 0x55)
{
- kprintf("i8042: warning: error self-testing device. aborting.\n");
+ printf("i8042: warning: error self-testing device. aborting.\n");
return;
}
@@ -124,11 +124,11 @@ static void i8042_set_config(void)
uint8_t config_byte;
if (i8042_read(&config_byte) && config_byte & (0x1 << 5))
{
- kprintf("i8042: single-channel controller detected\n");
+ printf("i8042: single-channel controller detected\n");
}
else
{
- kprintf("i8042: dual-channel controller detected\n");
+ printf("i8042: dual-channel controller detected\n");
is_dual_channel = true;
}
}
@@ -136,7 +136,7 @@ static void i8042_set_config(void)
outb(PS2_COMMAND, 0xab);
if (inb(PS2_DATA) != 0x00)
{
- kprintf("i8042: failed testing port a\n");
+ printf("i8042: failed testing port a\n");
}
else
{
@@ -147,7 +147,7 @@ static void i8042_set_config(void)
outb(PS2_COMMAND, 0xa9);
if (inb(PS2_DATA) != 0x00)
{
- kprintf("i8042: failed testing port b\n");
+ printf("i8042: failed testing port b\n");
}
else
{
@@ -162,7 +162,7 @@ static void i8042_set_config(void)
i8042_write(0xff);
if(inb(PS2_DATA) == 0xfa && inb(PS2_DATA) == 0xaa)
{
- kprintf("i8042: detected device on channel, type %#0.2x\n", inb(PS2_DATA));
+ printf("i8042: detected device on channel, type %#0.2x\n", inb(PS2_DATA));
}
}