summaryrefslogtreecommitdiff
path: root/hid
diff options
context:
space:
mode:
Diffstat (limited to 'hid')
-rw-r--r--hid/src/main.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/hid/src/main.cpp b/hid/src/main.cpp
index 9fad576c..93a90b8b 100644
--- a/hid/src/main.cpp
+++ b/hid/src/main.cpp
@@ -17,11 +17,14 @@
// -----------------------------------------------------------------------------
+INLINE void readNoop() {
+ for (int count = 0; count < 4; ++count) {
+ CMD_SERIAL.read();
+ }
+}
+
INLINE void cmdResetHid() { // 0 bytes
- CMD_SERIAL.read(); // unused
- CMD_SERIAL.read(); // unused
- CMD_SERIAL.read(); // unused
- CMD_SERIAL.read(); // unused
+ readNoop();
BootKeyboard.releaseAll();
SingleAbsoluteMouse.releaseAll();
}
@@ -96,7 +99,7 @@ void loop() {
case 2: cmdMouseMoveEvent(); break;
case 3: cmdMouseButtonEvent(); break;
case 4: cmdMouseWheelEvent(); break;
- default: break;
+ default: readNoop(); break;
}
cmd_processed = true;
}