refactoring

This commit is contained in:
Maxim Devaev
2022-07-08 23:06:23 +03:00
parent e864aafcf7
commit c840ea7306
4 changed files with 22 additions and 21 deletions

View File

@@ -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;
}