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 | |
| parent | 9bb4e63a1123861515c1196a624b4a0f04129601 (diff) | |
| download | qmk_firmware-a0f248c20ed14303c742365e841ed2482749c972.tar.gz qmk_firmware-a0f248c20ed14303c742365e841ed2482749c972.zip | |
Implement NUMLOCK indicator light for XD96 (#6581)
| -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 45cfb3b1f..e2af9f100 100644 --- a/keyboards/xd96/xd96.c +++ b/keyboards/xd96/xd96.c | |||
| @@ -16,9 +16,11 @@ | |||
| 16 | #include "xd96.h" | 16 | #include "xd96.h" |
| 17 | 17 | ||
| 18 | #define CAPS_PIN B6 | 18 | #define CAPS_PIN B6 |
| 19 | #define NUMLOCK_PIN C6 | ||
| 19 | 20 | ||
| 20 | void keyboard_pre_init_kb(void) { | 21 | void keyboard_pre_init_kb(void) { |
| 21 | setPinOutput(CAPS_PIN); | 22 | setPinOutput(CAPS_PIN); |
| 23 | setPinOutput(NUMLOCK_PIN); | ||
| 22 | 24 | ||
| 23 | keyboard_pre_init_user(); | 25 | keyboard_pre_init_user(); |
| 24 | } | 26 | } |
| @@ -29,6 +31,12 @@ void led_set_kb(uint8_t usb_led) { | |||
| 29 | } else { | 31 | } else { |
| 30 | writePinHigh(CAPS_PIN); | 32 | writePinHigh(CAPS_PIN); |
| 31 | } | 33 | } |
| 34 | |||
| 35 | if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { | ||
| 36 | writePinLow(NUMLOCK_PIN); | ||
| 37 | } else { | ||
| 38 | writePinHigh(NUMLOCK_PIN); | ||
| 39 | } | ||
| 32 | 40 | ||
| 33 | led_set_user(usb_led); | 41 | led_set_user(usb_led); |
| 34 | } | 42 | } |
