diff options
author | dzwdz | 2022-08-03 21:34:58 +0200 |
---|---|---|
committer | dzwdz | 2022-08-03 21:34:58 +0200 |
commit | 4a844820866094ff7d57435a16b7c23a9126814d (patch) | |
tree | a13643ddf95a4b310e9d615857bb0eed1038cd28 /src/kernel/arch/amd64/driver/ps2.c | |
parent | c510603cedcd3e39681ae38560f62adc9d70a53b (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.c | 5 |
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; |