diff options
author | fougner <fougner89@gmail.com> | 2019-09-17 19:37:01 +0200 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-09-17 10:37:01 -0700 |
commit | 23186d32a36e5ca114e71fc2807c5e4a133edfa7 (patch) | |
tree | b6d0c8f10d6e67ea3d7d54b329d6155105e3ffdc /keyboards/xd87 | |
parent | 12cdcd5e104353d757def68d8b51e6a15760eaa8 (diff) |
[Keyboard] xd87: add capslock led support (#6758)
Diffstat (limited to 'keyboards/xd87')
-rw-r--r-- | keyboards/xd87/xd87.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/keyboards/xd87/xd87.c b/keyboards/xd87/xd87.c index da07c71d88..e14480b054 100644 --- a/keyboards/xd87/xd87.c +++ b/keyboards/xd87/xd87.c @@ -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(); } @@ -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); +} |