From 23222625c201cd960a5b4a99ee52e74d4c13bba9 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 21 Nov 2020 19:11:24 +0000 Subject: Refactor to use led config - Part 5 (#10975) * Refactor to use led config * Refactor to use led config * Refactor to use led config --- keyboards/evil80/config.h | 9 +++++---- keyboards/evil80/evil80.c | 46 ---------------------------------------------- 2 files changed, 5 insertions(+), 50 deletions(-) (limited to 'keyboards/evil80') diff --git a/keyboards/evil80/config.h b/keyboards/evil80/config.h index ae507c74f9..0f0e24529a 100644 --- a/keyboards/evil80/config.h +++ b/keyboards/evil80/config.h @@ -19,16 +19,17 @@ #define MATRIX_COL_PINS { B2, D0, D1, D2, D3, D5, D4, D6, D7, B4, B1, C6, C7, E6, F6, F7 } #define UNUSED_PINS -#define BACKLIGHT_PIN B5 -#define BACKLIGHT_BREATHING - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST -/* number of backlight levels */ +#define LED_CAPS_LOCK_PIN B6 +#define LED_SCROLL_LOCK_PIN B7 + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ diff --git a/keyboards/evil80/evil80.c b/keyboards/evil80/evil80.c index d4653d049b..471580fd80 100644 --- a/keyboards/evil80/evil80.c +++ b/keyboards/evil80/evil80.c @@ -1,47 +1 @@ #include "evil80.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 matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_init_ports(void) { - DDRB |= (1<<6) | (1<<7); // OUT -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<