Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XD87 Caps Lock LED refactor #9585

Merged
merged 1 commit into from
Jul 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions keyboards/xd87/xd87.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down