From 99cd0b13e109bb14f1e5af023c5fcb5e50a78e0a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 9 Dec 2022 01:42:22 +0000 Subject: Refactor some led_set_kb instances (#19179) * Refactor some led_set_kb instances * Apply suggestions from code review Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/lfkeyboards/lfk78/lfk78.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'keyboards/lfkeyboards/lfk78/lfk78.c') diff --git a/keyboards/lfkeyboards/lfk78/lfk78.c b/keyboards/lfkeyboards/lfk78/lfk78.c index 6f61d6e2e2..110bbd4168 100644 --- a/keyboards/lfkeyboards/lfk78/lfk78.c +++ b/keyboards/lfkeyboards/lfk78/lfk78.c @@ -151,11 +151,12 @@ void reset_keyboard_kb() { reset_keyboard(); } -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { #ifdef ISSI_ENABLE # ifdef CAPSLOCK_LED - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + if (led_state.caps_lock) { activateLED(0, 3, 7, 255); } else { activateLED(0, 3, 7, 0); @@ -163,7 +164,8 @@ void led_set_kb(uint8_t usb_led) { # endif // CAPSLOCK_LED #endif // ISS_ENABLE - led_set_user(usb_led); + } + return res; } // LFK lighting info -- cgit v1.2.3