aboutsummaryrefslogtreecommitdiff
path: root/common_features.mk
diff options
context:
space:
mode:
authorzvecr <git@zvecr.com>2019-11-05 23:44:43 +0000
committerzvecr <git@zvecr.com>2019-12-14 03:25:06 +0000
commitd4c23d881fcd9fafcd3ea678614f006203b64e71 (patch)
treebe76d36db6000b2d393fcbe02eec719781542146 /common_features.mk
parent80c2e2674181191a41c4ca2c774d1a95b8a75838 (diff)
downloadqmk_firmware-d4c23d881fcd9fafcd3ea678614f006203b64e71.tar.gz
qmk_firmware-d4c23d881fcd9fafcd3ea678614f006203b64e71.zip
Convert backlight to follow driver rules pattern
Diffstat (limited to 'common_features.mk')
-rw-r--r--common_features.mk15
1 files changed, 8 insertions, 7 deletions
diff --git a/common_features.mk b/common_features.mk
index 1c814286c..9b60eeed0 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -231,15 +231,16 @@ endif
231 231
232# backward compat 232# backward compat
233ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) 233ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
234 BACKLIGHT_ENABLE = custom 234 BACKLIGHT_DRIVER = custom
235endif 235endif
236 236
237VALID_BACKLIGHT_TYPES := yes software custom 237VALID_BACKLIGHT_TYPES := pwm software custom
238 238
239BACKLIGHT_ENABLE ?= no 239BACKLIGHT_ENABLE ?= no
240ifneq ($(strip $(BACKLIGHT_ENABLE)), no) 240BACKLIGHT_DRIVER ?= pwm
241 ifeq ($(filter $(BACKLIGHT_ENABLE),$(VALID_BACKLIGHT_TYPES)),) 241ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
242 $(error BACKLIGHT_ENABLE="$(BACKLIGHT_ENABLE)" is not a valid backlight type) 242 ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
243 $(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
243 endif 244 endif
244 245
245 ifeq ($(strip $(VISUALIZER_ENABLE)), yes) 246 ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
@@ -250,10 +251,10 @@ ifneq ($(strip $(BACKLIGHT_ENABLE)), no)
250 SRC += $(QUANTUM_DIR)/backlight/backlight.c 251 SRC += $(QUANTUM_DIR)/backlight/backlight.c
251 OPT_DEFS += -DBACKLIGHT_ENABLE 252 OPT_DEFS += -DBACKLIGHT_ENABLE
252 253
253 ifeq ($(strip $(BACKLIGHT_ENABLE)), software) 254 ifeq ($(strip $(BACKLIGHT_DRIVER)), software)
254 SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c 255 SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c
255 else 256 else
256 ifeq ($(strip $(BACKLIGHT_ENABLE)), custom) 257 ifeq ($(strip $(BACKLIGHT_DRIVER)), custom)
257 OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER 258 OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
258 endif 259 endif
259 260