diff options
author | Joel Challis <[email protected]> | 2022-12-09 01:42:22 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2022-12-09 01:42:22 +0000 |
commit | 99cd0b13e109bb14f1e5af023c5fcb5e50a78e0a (patch) | |
tree | f6b3198bca1321fb9f4b8c0903d87869a8816630 /keyboards/mechlovin | |
parent | ba6ee2904066aa64fa83417dc865f24dc76d991b (diff) | |
download | qmk_firmware-99cd0b13e109bb14f1e5af023c5fcb5e50a78e0a.tar.gz qmk_firmware-99cd0b13e109bb14f1e5af023c5fcb5e50a78e0a.zip |
Refactor some led_set_kb instances (#19179)
* Refactor some led_set_kb instances
* Apply suggestions from code review
Co-authored-by: Ryan <[email protected]>
Co-authored-by: Ryan <[email protected]>
Diffstat (limited to 'keyboards/mechlovin')
-rw-r--r-- | keyboards/mechlovin/hannah910/hannah910.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/keyboards/mechlovin/hannah910/hannah910.c b/keyboards/mechlovin/hannah910/hannah910.c index 70c1a7b8e3..fa5b04ea76 100644 --- a/keyboards/mechlovin/hannah910/hannah910.c +++ b/keyboards/mechlovin/hannah910/hannah910.c @@ -22,13 +22,13 @@ void led_init_ports(void) { setPinOutput(D2); } -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(B2); - } else { - writePinLow(B2); - } - led_set_user(usb_led); + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(B2, led_state.caps_lock); + } + return res; } layer_state_t layer_state_set_user(layer_state_t state) |