diff options
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; } |