summaryrefslogtreecommitdiff
path: root/keyboards/kbdfans/kbdpad/mk1
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/kbdfans/kbdpad/mk1')
-rw-r--r--keyboards/kbdfans/kbdpad/mk1/mk1.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/keyboards/kbdfans/kbdpad/mk1/mk1.c b/keyboards/kbdfans/kbdpad/mk1/mk1.c
index aa781875ce..f5fe47741b 100644
--- a/keyboards/kbdfans/kbdpad/mk1/mk1.c
+++ b/keyboards/kbdfans/kbdpad/mk1/mk1.c
@@ -16,14 +16,19 @@
#include "mk1.h"
-#define NUMLOCK_PIN D0
+void keyboard_pre_init_kb(void) {
+ led_init_ports();
+ keyboard_pre_init_user();
+}
-void matrix_init_kb(void) {
- setPinOutput(NUMLOCK_PIN);
- matrix_init_user();
+void led_init_ports(void) {
+ setPinOutput(D0);
+ writePinHigh(D0);
}
-void led_set_kb(uint8_t usb_led) {
- writePin(NUMLOCK_PIN, IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
- led_set_user(usb_led);
+bool led_update_kb(led_t led_state) {
+ if (led_update_user(led_state)) {
+ writePin(D0, !led_state.num_lock);
+ }
+ return true;
}