Set second buffer full bit

This commit is contained in:
Jeremy Soller 2019-11-10 20:18:48 -07:00
parent 8f69ece191
commit d7c15e02ab
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1

View File

@ -28,12 +28,14 @@ static bool kbc_wait(struct Kbc * kbc, int timeout) {
bool kbc_keyboard(struct Kbc * kbc, uint8_t data, int timeout) { bool kbc_keyboard(struct Kbc * kbc, uint8_t data, int timeout) {
if (!kbc_wait(kbc, timeout)) return false; if (!kbc_wait(kbc, timeout)) return false;
*(kbc->status) &= ~0x20;
*(kbc->keyboard_out) = data; *(kbc->keyboard_out) = data;
return true; return true;
} }
bool kbc_mouse(struct Kbc * kbc, uint8_t data, int timeout) { bool kbc_mouse(struct Kbc * kbc, uint8_t data, int timeout) {
if (!kbc_wait(kbc, timeout)) return false; if (!kbc_wait(kbc, timeout)) return false;
*(kbc->status) |= 0x20;
*(kbc->mouse_out) = data; *(kbc->mouse_out) = data;
return true; return true;
} }