Implement NUMLOCK indicator light for XD96 (#6581)
This commit is contained in:
parent
9bb4e63a11
commit
a0f248c20e
1 changed files with 8 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
@ -30,5 +32,11 @@ void led_set_kb(uint8_t usb_led) {
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue