1
0
Fork 0

[Keyboard] XD87 Caps Lock LED refactor (#9585)

This commit is contained in:
siano 2020-07-05 05:31:07 +02:00 committed by GitHub
parent 83bc0b9e80
commit ade3bdf7e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,16 +36,14 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record); return process_record_user(keycode, record);
} }
void led_set_kb(uint8_t usb_led) { bool led_update_kb(led_t led_state) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here bool res = led_update_user(led_state);
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { if (res) {
writePinLow(E2); writePin(E2, !led_state.caps_lock);
} else {
writePinHigh(E2);
} }
led_set_user(usb_led); return res;
} }
void led_init_ports(void) { void led_init_ports(void) {