Handle ps2 keyboard via special process
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user