Ensure ps2 interface is always in correct state

This commit is contained in:
Jeremy Soller
2019-11-17 18:37:25 -07:00
parent 49e958fc7d
commit 271b612c57
4 changed files with 18 additions and 12 deletions

View File

@ -396,7 +396,7 @@ void touchpad_event(struct Ps2 * ps2) {
if (kbc_second) {
*(ps2->control) = 0x07;
} else {
*(ps2->control) = 0x01;
ps2_reset(ps2);
}
uint8_t status = *(ps2->status);

View File

@ -1,12 +1,7 @@
#include <board/ps2.h>
void ps2_init(void) {
*(PS2_1.control) = 0x11;
*(PS2_1.interrupt) = 0x04;
*(PS2_2.control) = 0x41;
*(PS2_2.interrupt) = 0x04;
*(PS2_3.control) = 0x41;
*(PS2_3.interrupt) = 0x04;
ps2_reset(&PS2_1);
ps2_reset(&PS2_2);
ps2_reset(&PS2_3);
}