diff options
author | Maxim Devaev <[email protected]> | 2022-07-08 23:06:23 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-07-08 23:06:23 +0300 |
commit | c840ea73068f855e1ebbf738f8ae9e62dde05286 (patch) | |
tree | 017b0817c2710b435496839d14f945e7b7418573 /hid/src/usb/hid.h | |
parent | e864aafcf7f9dea75582c1ebcbca5e8ac1a1ae26 (diff) |
refactoring
Diffstat (limited to 'hid/src/usb/hid.h')
-rw-r--r-- | hid/src/usb/hid.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hid/src/usb/hid.h b/hid/src/usb/hid.h index ac35179e..cd58a1f8 100644 --- a/hid/src/usb/hid.h +++ b/hid/src/usb/hid.h @@ -107,10 +107,11 @@ class UsbKeyboard { KeyboardLedsState getLeds() { uint8_t leds = _kbd.getLeds(); - KeyboardLedsState result; - result.caps = leds & LED_CAPS_LOCK; - result.scroll = leds & LED_SCROLL_LOCK; - result.num = leds & LED_NUM_LOCK; + KeyboardLedsState result = { + .caps = leds & LED_CAPS_LOCK, + .scroll = leds & LED_SCROLL_LOCK, + .num = leds & LED_NUM_LOCK, + }; return result; } |