initial keyboard demo
This commit is contained in:
Regular → Executable
Regular → Executable
+16
@@ -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
Regular → Executable
Regular → Executable
Regular → Executable
+5
@@ -13,4 +13,9 @@
|
||||
void keyboard_demo() {
|
||||
|
||||
/* Hier muess Code eingefuegt werden */
|
||||
|
||||
while (true) {
|
||||
kout << kb.key_hit();
|
||||
kout.flush();
|
||||
}
|
||||
}
|
||||
|
||||
Regular → Executable
Reference in New Issue
Block a user