Use uint8_t for keyboard chars

This commit is contained in:
2025-09-19 21:00:33 +02:00
parent 504bdbd4ba
commit 1af0d1f5bc
3 changed files with 16 additions and 26 deletions

View File

@ -215,13 +215,13 @@ void intr_handleintr(IntrStackFrame *frame) {
break;
case INTR_IRQBASE+1:
int32_t c = ps2kb_intr();
intr_eoi(frame->trapnum - INTR_IRQBASE);
if (c >= 0) {
uint8_t *bytes = (uint8_t *)&c;
for (size_t i = 0; i < sizeof(c); i++) {
rbuf_push(&PS2KB_BUF.rbuf, bytes[i]);
}
uint8_t b = c;
spinlock_acquire(&PS2KB_BUF.spinlock);
rbuf_push(&PS2KB_BUF.rbuf, b);
spinlock_release(&PS2KB_BUF.spinlock);
}
intr_eoi(frame->trapnum - INTR_IRQBASE);
break;
}
} else if (frame->trapnum == 0x80) {