summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/arch/amd64/driver')
-rw-r--r--src/kernel/arch/amd64/driver/ps2.c5
-rw-r--r--src/kernel/arch/amd64/driver/ps2.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/kernel/arch/amd64/driver/ps2.c b/src/kernel/arch/amd64/driver/ps2.c
index 8a5a078..be20c66 100644
--- a/src/kernel/arch/amd64/driver/ps2.c
+++ b/src/kernel/arch/amd64/driver/ps2.c
@@ -1,5 +1,6 @@
#include <kernel/arch/amd64/driver/ps2.h>
#include <kernel/arch/amd64/interrupts/irq.h>
+#include <kernel/arch/amd64/port_io.h>
#include <kernel/mem/virt.h>
#include <kernel/panic.h>
#include <kernel/vfs/request.h>
@@ -18,8 +19,8 @@ static struct vfs_backend backend = BACKEND_KERN(is_ready, accept);
void ps2_init(void) { vfs_mount_root_register("/ps2", &backend); }
-void ps2_recv(uint8_t s) {
- ring_put1b((void*)&backlog, s);
+void ps2_irq(void) {
+ ring_put1b((void*)&backlog, port_in8(0x60));
if (blocked_on) {
accept(blocked_on);
blocked_on = NULL;
diff --git a/src/kernel/arch/amd64/driver/ps2.h b/src/kernel/arch/amd64/driver/ps2.h
index 54e8fb2..e1b1521 100644
--- a/src/kernel/arch/amd64/driver/ps2.h
+++ b/src/kernel/arch/amd64/driver/ps2.h
@@ -1,5 +1,5 @@
#pragma once
#include <stdint.h>
-void ps2_recv(uint8_t s);
+void ps2_irq(void);
void ps2_init(void);