summaryrefslogtreecommitdiff
path: root/hid/src
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-03-04 19:41:12 +0200
committerMaxim Devaev <[email protected]>2023-03-04 19:41:12 +0200
commit79e1b457b7fff18577745cfbb0b96d03c60281eb (patch)
tree8a43c3ef0b0585922ea886591c8428df3e76e877 /hid/src
parent52ac8d93a18521f19dc45e9b4283417ed06f63d8 (diff)
refactoring
Diffstat (limited to 'hid/src')
-rw-r--r--hid/src/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/hid/src/main.cpp b/hid/src/main.cpp
index 6692bd93..63e776f1 100644
--- a/hid/src/main.cpp
+++ b/hid/src/main.cpp
@@ -115,7 +115,7 @@ static uint8_t _handleRequest(const uint8_t *data) { // 8 bytes
if (data[0] == PROTO::MAGIC && PROTO::crc16(data, 6) == PROTO::merge8(data[6], data[7])) {
# define HANDLE(_handler) { _handler(data + 2); return PROTO::PONG::OK; }
switch (data[1]) {
- case PROTO::CMD::PING: return PROTO::PONG::OK;
+ case PROTO::CMD::PING: return PROTO::PONG::OK;
case PROTO::CMD::SET_KEYBOARD: HANDLE(_cmdSetKeyboard);
case PROTO::CMD::SET_MOUSE: HANDLE(_cmdSetMouse);
case PROTO::CMD::SET_CONNECTED: HANDLE(_cmdSetConnected);
@@ -220,7 +220,7 @@ static void _onTimeout() {
_sendResponse(PROTO::RESP::TIMEOUT_ERROR);
}
-static void _onData(const uint8_t * data, size_t len) {
+static void _onData(const uint8_t *data, size_t size) {
_sendResponse(_handleRequest(data));
}