From 9a0245b7784e11b34c5f44bcd2079af2e19ab654 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 27 Jan 2020 22:31:54 +0000 Subject: [PATCH] Fix boards which were overriding backlight without setting custom (#7970) --- common_features.mk | 12 +++++++----- keyboards/cannonkeys/ortho48/rules.mk | 1 + keyboards/cannonkeys/ortho60/rules.mk | 1 + keyboards/cannonkeys/ortho75/rules.mk | 1 + keyboards/cannonkeys/practice60/rules.mk | 1 + keyboards/cannonkeys/practice65/rules.mk | 1 + keyboards/clueboard/66_hotswap/gen1/led.c | 1 - keyboards/clueboard/66_hotswap/gen1/matrix.c | 1 - keyboards/clueboard/66_hotswap/gen1/rules.mk | 1 - keyboards/ergodox_infinity/rules.mk | 1 + keyboards/whitefox/rules.mk | 1 + 11 files changed, 14 insertions(+), 8 deletions(-) diff --git a/common_features.mk b/common_features.mk index a431923bcfd93908d4142df5d01888a4699d9596..93c34c7d5427c5adfd81dcb4a970b6d5301b6a8a 100644 --- a/common_features.mk +++ b/common_features.mk @@ -175,7 +175,9 @@ ifneq ($(strip $(LED_MATRIX_ENABLE)), no) ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) $(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type) else - OPT_DEFS += -DLED_MATRIX_ENABLE -DBACKLIGHT_ENABLE -DBACKLIGHT_CUSTOM_DRIVER + BACKLIGHT_ENABLE = yes + BACKLIGHT_DRIVER = custom + OPT_DEFS += -DLED_MATRIX_ENABLE SRC += $(QUANTUM_DIR)/led_matrix.c SRC += $(QUANTUM_DIR)/led_matrix_drivers.c endif @@ -300,10 +302,6 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) $(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type) endif - ifeq ($(strip $(VISUALIZER_ENABLE)), yes) - CIE1931_CURVE := yes - endif - COMMON_VPATH += $(QUANTUM_DIR)/backlight SRC += $(QUANTUM_DIR)/backlight/backlight.c OPT_DEFS += -DBACKLIGHT_ENABLE @@ -343,6 +341,10 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) endif endif +ifeq ($(strip $(VISUALIZER_ENABLE)), yes) + CIE1931_CURVE := yes +endif + ifeq ($(strip $(CIE1931_CURVE)), yes) OPT_DEFS += -DUSE_CIE1931_CURVE LED_TABLES := yes diff --git a/keyboards/cannonkeys/ortho48/rules.mk b/keyboards/cannonkeys/ortho48/rules.mk index 4bca8fde059080c69545afb666c7a621254c904f..808bcacf2576dedd020373690d2647c25468751d 100644 --- a/keyboards/cannonkeys/ortho48/rules.mk +++ b/keyboards/cannonkeys/ortho48/rules.mk @@ -22,6 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes LAYOUTS = ortho_4x12 diff --git a/keyboards/cannonkeys/ortho60/rules.mk b/keyboards/cannonkeys/ortho60/rules.mk index d2fa535f41437952d9239431c0e4bb6cb4384d0a..bd79bb7ea3d817e832de93c39c6d5c8921866aa7 100644 --- a/keyboards/cannonkeys/ortho60/rules.mk +++ b/keyboards/cannonkeys/ortho60/rules.mk @@ -22,6 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes LAYOUTS = ortho_5x12 diff --git a/keyboards/cannonkeys/ortho75/rules.mk b/keyboards/cannonkeys/ortho75/rules.mk index 5b90e87fd7ef69b067586d8671357ff30f85bb02..e5e832dba0eb79fe966d6c968397ece414b5216c 100644 --- a/keyboards/cannonkeys/ortho75/rules.mk +++ b/keyboards/cannonkeys/ortho75/rules.mk @@ -22,6 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes ENCODER_ENABLE = yes diff --git a/keyboards/cannonkeys/practice60/rules.mk b/keyboards/cannonkeys/practice60/rules.mk index 7c3fec31e6394dee405025238fee44614254d3cc..1fae41d66ce75690e70852f008722e43b71b4b1c 100644 --- a/keyboards/cannonkeys/practice60/rules.mk +++ b/keyboards/cannonkeys/practice60/rules.mk @@ -22,6 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes LAYOUTS = 60_ansi diff --git a/keyboards/cannonkeys/practice65/rules.mk b/keyboards/cannonkeys/practice65/rules.mk index b43e591aeb649c14895da5f9bcf7a15889c3a4d9..122dcf8f2645ee9c5f9e4df07e6d35e5952ae436 100644 --- a/keyboards/cannonkeys/practice65/rules.mk +++ b/keyboards/cannonkeys/practice65/rules.mk @@ -22,4 +22,5 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes diff --git a/keyboards/clueboard/66_hotswap/gen1/led.c b/keyboards/clueboard/66_hotswap/gen1/led.c index efbf532022af678759395efcb8867dff2606793b..f67259d2e470ef6d08c3cc9bd037230b5998a9cb 100644 --- a/keyboards/clueboard/66_hotswap/gen1/led.c +++ b/keyboards/clueboard/66_hotswap/gen1/led.c @@ -16,6 +16,5 @@ */ #include "hal.h" -#include "backlight.h" #include "led.h" #include "printf.h" diff --git a/keyboards/clueboard/66_hotswap/gen1/matrix.c b/keyboards/clueboard/66_hotswap/gen1/matrix.c index c3e59b56460f2c337cba02f3d3878bea319919d8..05386215edaeaca5d5a717a6eb2be1f5dccac28b 100644 --- a/keyboards/clueboard/66_hotswap/gen1/matrix.c +++ b/keyboards/clueboard/66_hotswap/gen1/matrix.c @@ -5,7 +5,6 @@ #include "timer.h" #include "wait.h" #include "printf.h" -#include "backlight.h" #include "matrix.h" #include "action.h" #include "keycode.h" diff --git a/keyboards/clueboard/66_hotswap/gen1/rules.mk b/keyboards/clueboard/66_hotswap/gen1/rules.mk index 50f140defa33247201585f0f51f8931a17fb57aa..1de003ce5a938ad93c11a1ad639f7ac87ff00da8 100644 --- a/keyboards/clueboard/66_hotswap/gen1/rules.mk +++ b/keyboards/clueboard/66_hotswap/gen1/rules.mk @@ -7,7 +7,6 @@ LED_MATRIX_ENABLE = IS31FL3731 # Build Options # comment out to disable the options. # -BACKLIGHT_ENABLE = yes BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) MOUSEKEY_ENABLE = yes # Mouse keys diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index b55c9bc8c0ce10037d84d06b449d2c5edeb2e013..4e39ac80818b7c3b973b0b77d8e0a01b0c479402 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -79,6 +79,7 @@ SERIAL_LINK_ENABLE = yes VISUALIZER_ENABLE = yes LCD_ENABLE = yes BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom LCD_BACKLIGHT_ENABLE = yes MIDI_ENABLE = no RGBLIGHT_ENABLE = no diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index 59332d1d5ac3095376431269fb3d8ccdb200d1d3..7b33285004d681a8eeb47cf20a81dc84b22849e1 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -72,6 +72,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom VISUALIZER_ENABLE = yes LED_DRIVER = is31fl3731c