drain
This commit is contained in:
@@ -110,7 +110,7 @@ void init() {
|
||||
bool fetch(Key &pressed) {
|
||||
uint8_t status_reg = ctrl_port.inb();
|
||||
if(!(status_reg & HAS_OUTPUT) )
|
||||
return false; // TODO Remove mouse events from buffer
|
||||
return false;
|
||||
DBG_VERBOSE << "status: " << hex << static_cast<int>(status_reg) << "\n" << flush;
|
||||
|
||||
uint8_t out_buffer = data_port.inb();
|
||||
@@ -142,6 +142,8 @@ void setLed(enum LED led, bool on) {
|
||||
sendData(leds); // Parameter
|
||||
}
|
||||
|
||||
void drainBuffer() {}
|
||||
|
||||
void drainBuffer() {
|
||||
while(ctrl_port.inb() & HAS_OUTPUT)
|
||||
data_port.inb();
|
||||
}
|
||||
} // namespace PS2Controller
|
||||
|
||||
@@ -146,7 +146,6 @@ void setLed(enum LED led, bool on);
|
||||
* should be emptied once right before allowing keyboard interrupts
|
||||
* (even if keystrokes might be lost).
|
||||
*
|
||||
* \todo(12) Implement method
|
||||
*/
|
||||
void drainBuffer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user