Handle ps2 keyboard via special process

This commit is contained in:
2025-09-07 20:53:36 +02:00
parent 4f3053bc8e
commit 9644ad0b4e
16 changed files with 312 additions and 40 deletions

View File

@ -13,6 +13,8 @@
#include "syscall/syscall.h"
#include "errors.h"
#include "drivers/ps2kb/ps2kb.h"
#include "ipc/pipe/pipe.h"
#include "proc/ps2kbproc/ps2kbproc.h"
void hal_intr_disable(void) {
asm volatile("cli");
@ -197,7 +199,9 @@ void intr_handleintr(IntrStackFrame *frame) {
proc_sched((void *)frame);
break;
case INTR_IRQBASE+1:
ps2kb_intr();
int32_t c = ps2kb_intr();
uint8_t *bytes = (uint8_t *)&c;
ipc_pipewrite(PS2KBPROC->pipes[0], bytes, sizeof(c));
intr_eoi(frame->trapnum - INTR_IRQBASE);
break;
}