From 790f94533c936409e6be56e8b638969b42350180 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 10 Mar 2021 22:48:18 +0000 Subject: Refactor to use led config - Part 6 (#12115) * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * revert changes --- keyboards/hid_liber/config.h | 4 ++++ keyboards/hid_liber/hid_liber.c | 21 --------------------- 2 files changed, 4 insertions(+), 21 deletions(-) (limited to 'keyboards/hid_liber') diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h index f35799b1ac..e0f92dee84 100755 --- a/keyboards/hid_liber/config.h +++ b/keyboards/hid_liber/config.h @@ -34,6 +34,10 @@ // HID Liberation Device uses custom matrix code to accomodate a 74HC238 3 to 8 decoder on pins B1, B2 and B3. //#define DIODE_DIRECTION +#define LED_CAPS_LOCK_PIN B5 +#define LED_SCROLL_LOCK_PIN B6 +#define LED_PIN_ON_STATE 0 + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/hid_liber/hid_liber.c b/keyboards/hid_liber/hid_liber.c index 2d2130743f..2e4ddb3293 100755 --- a/keyboards/hid_liber/hid_liber.c +++ b/keyboards/hid_liber/hid_liber.c @@ -16,24 +16,3 @@ * along with this program. If not, see . */ #include "hid_liber.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - led_init_ports(); - matrix_init_user(); -} - -void led_init_ports(void) { - setPinOutput(B5); - setPinOutput(B6); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - writePin(B5, !led_state.caps_lock); - writePin(B6, !led_state.scroll_lock); - } - return res; -} -- cgit v1.2.3