historical/gems-kernel.git/source/kbd.h

20 lines
391 B
C
Raw Normal View History

2024-01-26 23:50:01 +00:00
unsigned char inport(char keyid, char state) {
2024-01-16 17:20:27 +00:00
return inportb(keyid); //super hacky way to inport
}
2024-01-26 23:50:01 +00:00
unsigned char outport(char scancode, char state) {
2024-01-16 17:20:27 +00:00
return (outport(scancode, state)); //hacky way to set key state.
}
void kbd_ack(void){
while(!(inport(0x60, 0xfa)==0xfa));
}
2024-01-26 23:50:01 +00:00
void kbd_led_handling(char ledstatus){;
2024-01-16 17:20:27 +00:00
outport(0x60,0xed);
kbd_ack();
outport(0x60,ledstatus);
}