From ddcb1794fa83e62e5e48536f4bc02ada63da411a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 17 Nov 2020 17:06:30 +0000 Subject: Refactor to use led config - Part 1 (#10905) * Refactor to use led config * Refactor to use led config * Refactor to use led config * Refactor to use led config * Refactor to use led config --- keyboards/xd84pro/config.h | 3 +++ keyboards/xd84pro/xd84pro.c | 14 -------------- 2 files changed, 3 insertions(+), 14 deletions(-) (limited to 'keyboards/xd84pro') diff --git a/keyboards/xd84pro/config.h b/keyboards/xd84pro/config.h index 7fd4496fe3..01f410ea6b 100644 --- a/keyboards/xd84pro/config.h +++ b/keyboards/xd84pro/config.h @@ -35,6 +35,9 @@ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define RGB_DI_PIN F6 #ifdef RGB_DI_PIN #define RGBLED_NUM 12 diff --git a/keyboards/xd84pro/xd84pro.c b/keyboards/xd84pro/xd84pro.c index cba8a57f26..0eb52fda0f 100644 --- a/keyboards/xd84pro/xd84pro.c +++ b/keyboards/xd84pro/xd84pro.c @@ -14,17 +14,3 @@ * along with this program. If not, see . */ #include "xd84pro.h" - -void keyboard_pre_init_kb(void) { - led_init_ports(); - keyboard_pre_init_user(); -} -void led_init_ports(void) { - setPinOutput(B2); -} -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - writePin(B2, !led_state.caps_lock); - } - return false; -} \ No newline at end of file -- cgit v1.2.1