summaryrefslogtreecommitdiff
path: root/hid/src/main.cpp
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-07-08 23:06:23 +0300
committerMaxim Devaev <[email protected]>2022-07-08 23:06:23 +0300
commitc840ea73068f855e1ebbf738f8ae9e62dde05286 (patch)
tree017b0817c2710b435496839d14f945e7b7418573 /hid/src/main.cpp
parente864aafcf7f9dea75582c1ebcbca5e8ac1a1ae26 (diff)
refactoring
Diffstat (limited to 'hid/src/main.cpp')
-rw-r--r--hid/src/main.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/hid/src/main.cpp b/hid/src/main.cpp
index 7d575b54..a512b65b 100644
--- a/hid/src/main.cpp
+++ b/hid/src/main.cpp
@@ -284,29 +284,29 @@ static void _sendResponse(uint8_t code) {
response[2] = PROTO::OUTPUTS1::DYNAMIC;
# endif
if (_usb_kbd) {
- response[1] |= _usb_kbd->isOffline() ? PROTO::PONG::KEYBOARD_OFFLINE : 0;
+ response[1] |= (_usb_kbd->isOffline() ? PROTO::PONG::KEYBOARD_OFFLINE : 0);
KeyboardLedsState leds = _usb_kbd->getLeds();
- response[1] |= leds.caps ? PROTO::PONG::CAPS : 0;
- response[1] |= leds.num ? PROTO::PONG::NUM : 0;
- response[1] |= leds.scroll ? PROTO::PONG::SCROLL : 0;
+ response[1] |= (leds.caps ? PROTO::PONG::CAPS : 0);
+ response[1] |= (leds.num ? PROTO::PONG::NUM : 0);
+ response[1] |= (leds.scroll ? PROTO::PONG::SCROLL : 0);
response[2] |= PROTO::OUTPUTS1::KEYBOARD::USB;
} else if (_ps2_kbd) {
- response[1] |= _ps2_kbd->isOffline() ? PROTO::PONG::KEYBOARD_OFFLINE : 0;
+ response[1] |= (_ps2_kbd->isOffline() ? PROTO::PONG::KEYBOARD_OFFLINE : 0);
KeyboardLedsState leds = _usb_kbd->getLeds();
- response[1] |= leds.caps ? PROTO::PONG::CAPS : 0;
- response[1] |= leds.num ? PROTO::PONG::NUM : 0;
- response[1] |= leds.scroll ? PROTO::PONG::SCROLL : 0;
+ response[1] |= (leds.caps ? PROTO::PONG::CAPS : 0);
+ response[1] |= (leds.num ? PROTO::PONG::NUM : 0);
+ response[1] |= (leds.scroll ? PROTO::PONG::SCROLL : 0);
response[2] |= PROTO::OUTPUTS1::KEYBOARD::PS2;
}
if (_usb_mouse_abs) {
- response[1] |= _usb_mouse_abs->isOffline() ? PROTO::PONG::MOUSE_OFFLINE : 0;
+ response[1] |= (_usb_mouse_abs->isOffline() ? PROTO::PONG::MOUSE_OFFLINE : 0);
if (_usb_mouse_abs->isWin98FixEnabled()) {
response[2] |= PROTO::OUTPUTS1::MOUSE::USB_WIN98;
} else {
response[2] |= PROTO::OUTPUTS1::MOUSE::USB_ABS;
}
} else if (_usb_mouse_rel) {
- response[1] |= _usb_mouse_rel->isOffline() ? PROTO::PONG::MOUSE_OFFLINE : 0;
+ response[1] |= (_usb_mouse_rel->isOffline() ? PROTO::PONG::MOUSE_OFFLINE : 0);
response[2] |= PROTO::OUTPUTS1::MOUSE::USB_REL;
} // TODO: ps2
# ifdef AUM