[Keyboard] xd87: add capslock led support (#6758)
This commit is contained in:
parent
12cdcd5e10
commit
23186d32a3
1 changed files with 11 additions and 1 deletions
|
@ -18,7 +18,7 @@
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
// put your keyboard start-up code here
|
// put your keyboard start-up code here
|
||||||
// runs once when the firmware starts up
|
// runs once when the firmware starts up
|
||||||
|
led_init_ports();
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,5 +39,15 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
// 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);
|
led_set_user(usb_led);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
|
setPinOutput(E2);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue