From 4a844820866094ff7d57435a16b7c23a9126814d Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 3 Aug 2022 21:34:58 +0200 Subject: amd64: cleanup the irq code, #define the magic numbers --- src/kernel/arch/amd64/driver/ps2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/kernel/arch/amd64/driver/ps2.c') 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 #include +#include #include #include #include @@ -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; -- cgit v1.2.3