From 1ff5ee255fadcd6bfc4defb68ef097d67ebd40ad Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 8 Nov 2020 22:31:16 +0000 Subject: Indicator LEDs as config (#10816) * First pass * Add config options to docs * Update some wording * Slight tidy up of backlight caps logic * Init pin to correct state * Move init location * Reverse default state --- keyboards/cospad/config.h | 3 +++ keyboards/cospad/cospad.c | 16 ---------------- 2 files changed, 3 insertions(+), 16 deletions(-) (limited to 'keyboards/cospad') diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h index 8d2994b7bd..648fa29a6f 100644 --- a/keyboards/cospad/config.h +++ b/keyboards/cospad/config.h @@ -53,6 +53,9 @@ along with this program. If not, see . */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define LED_NUM_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN F7 // #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/cospad/cospad.c b/keyboards/cospad/cospad.c index c1f3a70479..e7772f2908 100644 --- a/keyboards/cospad/cospad.c +++ b/keyboards/cospad/cospad.c @@ -14,19 +14,3 @@ * along with this program. If not, see . */ #include "cospad.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.num_lock); - } - return true; -} -- cgit v1.2.3