two-way communication between hid and kvmd

This commit is contained in:
Devaev Maxim
2018-08-20 00:57:55 +03:00
parent 61f7db14a8
commit 49b83948c0
2 changed files with 26 additions and 15 deletions

View File

@@ -72,7 +72,6 @@ INLINE void cmdMouseWheelEvent() { // 2 bytes
CMD_SERIAL.read(); // unused
CMD_SERIAL.read(); // unused
AbsoluteMouse.move(0, 0, delta_y);
CMD_SERIAL.println(delta_y);
}
@@ -81,6 +80,7 @@ void setup() {
CMD_SERIAL.begin(CMD_SERIAL_SPEED);
BootKeyboard.begin();
AbsoluteMouse.begin();
CMD_SERIAL.write(0);
}
void loop() {
@@ -93,5 +93,6 @@ void loop() {
case 4: cmdMouseWheelEvent(); break;
default: break;
}
CMD_SERIAL.write(0);
}
}