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: add capslock led support #6758

Merged
merged 1 commit into from
Sep 17, 2019
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
12 changes: 11 additions & 1 deletion keyboards/xd87/xd87.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up

led_init_ports();
matrix_init_user();
}

Expand All @@ -39,5 +39,15 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here

if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(E2);
} else {
writePinHigh(E2);
}

led_set_user(usb_led);
}

void led_init_ports(void) {
setPinOutput(E2);
}