summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorsiano <siano@sianecki.pl>2020-07-05 05:31:07 +0200
committerGitHub <noreply@github.com>2020-07-04 20:31:07 -0700
commitade3bdf7e746278057b51c11b2ac8cee366c391f (patch)
treec04af545cf44dfa9c0552608e8c50d5125fc06ed /keyboards
parent83bc0b9e80ddbc3d494fb5fa348e601e90f08f01 (diff)
downloadqmk_firmware-ade3bdf7e746278057b51c11b2ac8cee366c391f.tar.gz
qmk_firmware-ade3bdf7e746278057b51c11b2ac8cee366c391f.zip
[Keyboard] XD87 Caps Lock LED refactor (#9585)
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/xd87/xd87.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/keyboards/xd87/xd87.c b/keyboards/xd87/xd87.c
index e14480b054..a41b4f2dba 100644
--- a/keyboards/xd87/xd87.c
+++ b/keyboards/xd87/xd87.c
@@ -36,16 +36,14 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record);
}
-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 (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
- writePinLow(E2);
- } else {
- writePinHigh(E2);
- }
+ if (res) {
+ writePin(E2, !led_state.caps_lock);
+ }
- led_set_user(usb_led);
+ return res;
}
void led_init_ports(void) {