diff options
author | Joel Challis <git@zvecr.com> | 2022-12-09 01:42:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-09 01:42:22 +0000 |
commit | 99cd0b13e109bb14f1e5af023c5fcb5e50a78e0a (patch) | |
tree | f6b3198bca1321fb9f4b8c0903d87869a8816630 /keyboards/org60 | |
parent | ba6ee2904066aa64fa83417dc865f24dc76d991b (diff) |
Refactor some led_set_kb instances (#19179)
* Refactor some led_set_kb instances
* Apply suggestions from code review
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/org60')
-rw-r--r-- | keyboards/org60/org60.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/keyboards/org60/org60.c b/keyboards/org60/org60.c index 77a5e7c18b..940067538e 100644 --- a/keyboards/org60/org60.c +++ b/keyboards/org60/org60.c @@ -8,12 +8,14 @@ extern inline void org60_caps_led_off(void); extern inline void org60_bl_led_off(void); -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<<USB_LED_CAPS_LOCK)) { - org60_caps_led_on(); - } else { - org60_caps_led_off(); - } - - led_set_user(usb_led); +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + if (led_state.caps_lock) { + org60_caps_led_on(); + } else { + org60_caps_led_off(); + } + } + return res; } |