initial keyboard demo

This commit is contained in:
churl
2022-04-28 00:40:34 +02:00
parent 2861c07c1a
commit ac5173ff66
7 changed files with 35 additions and 14 deletions
Regular → Executable
View File
Regular → Executable
+16
View File
@@ -252,6 +252,22 @@ Key Keyboard::key_hit() {
/* Hier muss Code eingefuegt werden. */
bool outbyte;
do {
outbyte = ctrl_port.inb() & outb;
} while (!outbyte);
// Ignore PS2 Mouse
bool auxbyte = ctrl_port.inb() & auxb;
if (auxbyte) {
return invalid;
}
code = (unsigned char)data_port.inb();
if (key_decoded()) {
return gather;
}
return invalid;
}
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
+5
View File
@@ -13,4 +13,9 @@
void keyboard_demo() {
/* Hier muess Code eingefuegt werden */
while (true) {
kout << kb.key_hit();
kout.flush();
}
}
Regular → Executable
View File