From f5209aa4e941c7f3a942ef4a7e256ab432ec98ce Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 19 Jan 2020 18:00:32 +1100 Subject: Remove custom backlight code for PS2AVRGB boards (#7775) * Remove custom backlight code for PS2AVRGB boards * Remove custom driver setting * BACKLIGHT_BREATHING goes in config.h, not here * Don't need to include backlight.c again here either * Turn on backlight for Canoe * Disable console on a few boards due to oversize --- keyboards/kbdfans/kbdpad/mk1/mk1.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'keyboards/kbdfans/kbdpad/mk1') 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; } -- cgit v1.2.1