summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/driver/ps2.c
diff options
context:
space:
mode:
authordzwdz2022-08-03 21:34:58 +0200
committerdzwdz2022-08-03 21:34:58 +0200
commit4a844820866094ff7d57435a16b7c23a9126814d (patch)
treea13643ddf95a4b310e9d615857bb0eed1038cd28 /src/kernel/arch/amd64/driver/ps2.c
parentc510603cedcd3e39681ae38560f62adc9d70a53b (diff)
amd64: cleanup the irq code, #define the magic numbers
Diffstat (limited to 'src/kernel/arch/amd64/driver/ps2.c')
-rw-r--r--src/kernel/arch/amd64/driver/ps2.c5
1 files changed, 3 insertions, 2 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;