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/dz60/config.h | 3 +++ keyboards/dz60/dz60.c | 20 -------------------- 2 files changed, 3 insertions(+), 20 deletions(-) (limited to 'keyboards/dz60') diff --git a/keyboards/dz60/config.h b/keyboards/dz60/config.h index 3699ef7552..24fd63836d 100644 --- a/keyboards/dz60/config.h +++ b/keyboards/dz60/config.h @@ -30,6 +30,9 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/dz60/dz60.c b/keyboards/dz60/dz60.c index 936d027a31..23db2e4d75 100644 --- a/keyboards/dz60/dz60.c +++ b/keyboards/dz60/dz60.c @@ -1,21 +1 @@ #include "dz60.h" - -void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; - -void led_init_ports(void) { - setPinOutput(B2); - writePinHigh(B2); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - writePinLow(B2); - } else { - writePinHigh(B2); - } - - led_set_user(usb_led); -} -- cgit v1.2.3