diff options
Diffstat (limited to 'keyboards/kbdfans/kbdpad/mk1/mk1.c')
| -rw-r--r-- | keyboards/kbdfans/kbdpad/mk1/mk1.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/keyboards/kbdfans/kbdpad/mk1/mk1.c b/keyboards/kbdfans/kbdpad/mk1/mk1.c index aa781875c..f5fe47741 100644 --- a/keyboards/kbdfans/kbdpad/mk1/mk1.c +++ b/keyboards/kbdfans/kbdpad/mk1/mk1.c | |||
| @@ -16,14 +16,19 @@ | |||
| 16 | 16 | ||
| 17 | #include "mk1.h" | 17 | #include "mk1.h" |
| 18 | 18 | ||
| 19 | #define NUMLOCK_PIN D0 | 19 | void keyboard_pre_init_kb(void) { |
| 20 | led_init_ports(); | ||
| 21 | keyboard_pre_init_user(); | ||
| 22 | } | ||
| 20 | 23 | ||
| 21 | void matrix_init_kb(void) { | 24 | void led_init_ports(void) { |
| 22 | setPinOutput(NUMLOCK_PIN); | 25 | setPinOutput(D0); |
| 23 | matrix_init_user(); | 26 | writePinHigh(D0); |
| 24 | } | 27 | } |
| 25 | 28 | ||
| 26 | void led_set_kb(uint8_t usb_led) { | 29 | bool led_update_kb(led_t led_state) { |
| 27 | writePin(NUMLOCK_PIN, IS_LED_ON(usb_led, USB_LED_NUM_LOCK)); | 30 | if (led_update_user(led_state)) { |
| 28 | led_set_user(usb_led); | 31 | writePin(D0, !led_state.num_lock); |
| 32 | } | ||
| 33 | return true; | ||
| 29 | } | 34 | } |
