Clear PS/2 touchpad status when waiting for write to finish

This commit is contained in:
Jeremy Soller
2024-06-17 10:36:52 -06:00
committed by Tim Crawford
parent 2c5c708569
commit d88a175e23

View File

@ -468,6 +468,7 @@ void kbc_event(struct Kbc *const kbc) {
// Wait for touchpad write transaction to finish
kbc_second_wait -= 1;
uint8_t sts = *(PS2_TOUCHPAD.status);
*(PS2_TOUCHPAD.status) = sts;
// If transaction is done, stop waiting
if (sts & PSSTS_DONE) {
kbc_second_wait = 0;