diff options
author | Ceremony <5873369+Ceremony64@users.noreply.github.com> | 2019-08-21 03:26:00 +0200 |
---|---|---|
committer | Joel Challis <git@zvecr.com> | 2019-08-21 02:26:00 +0100 |
commit | a0f248c20ed14303c742365e841ed2482749c972 (patch) | |
tree | 09509521810b6a363696665a1f3f0009f4c8e3ab /keyboards/xd96/xd96.c | |
parent | 9bb4e63a1123861515c1196a624b4a0f04129601 (diff) |
Implement NUMLOCK indicator light for XD96 (#6581)
Diffstat (limited to 'keyboards/xd96/xd96.c')
-rw-r--r-- | keyboards/xd96/xd96.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/keyboards/xd96/xd96.c b/keyboards/xd96/xd96.c index 45cfb3b1f1..e2af9f1004 100644 --- a/keyboards/xd96/xd96.c +++ b/keyboards/xd96/xd96.c @@ -16,9 +16,11 @@ #include "xd96.h" #define CAPS_PIN B6 +#define NUMLOCK_PIN C6 void keyboard_pre_init_kb(void) { setPinOutput(CAPS_PIN); + setPinOutput(NUMLOCK_PIN); keyboard_pre_init_user(); } @@ -29,6 +31,12 @@ void led_set_kb(uint8_t usb_led) { } else { writePinHigh(CAPS_PIN); } + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(NUMLOCK_PIN); + } else { + writePinHigh(NUMLOCK_PIN); + } led_set_user(usb_led); } |