diff options
author | zvecr <git@zvecr.com> | 2019-11-05 23:44:43 +0000 |
---|---|---|
committer | zvecr <git@zvecr.com> | 2019-12-14 03:25:06 +0000 |
commit | d4c23d881fcd9fafcd3ea678614f006203b64e71 (patch) | |
tree | be76d36db6000b2d393fcbe02eec719781542146 /common_features.mk | |
parent | 80c2e2674181191a41c4ca2c774d1a95b8a75838 (diff) | |
download | qmk_firmware-d4c23d881fcd9fafcd3ea678614f006203b64e71.tar.gz |
Convert backlight to follow driver rules pattern
Diffstat (limited to 'common_features.mk')
-rw-r--r-- | common_features.mk | 15 |
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 # backward compat ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) - BACKLIGHT_ENABLE = custom + BACKLIGHT_DRIVER = custom endif -VALID_BACKLIGHT_TYPES := yes software custom +VALID_BACKLIGHT_TYPES := pwm software custom BACKLIGHT_ENABLE ?= no -ifneq ($(strip $(BACKLIGHT_ENABLE)), no) - ifeq ($(filter $(BACKLIGHT_ENABLE),$(VALID_BACKLIGHT_TYPES)),) - $(error BACKLIGHT_ENABLE="$(BACKLIGHT_ENABLE)" is not a valid backlight type) +BACKLIGHT_DRIVER ?= pwm +ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) + ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),) + $(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type) endif ifeq ($(strip $(VISUALIZER_ENABLE)), yes) @@ -250,10 +251,10 @@ ifneq ($(strip $(BACKLIGHT_ENABLE)), no) SRC += $(QUANTUM_DIR)/backlight/backlight.c OPT_DEFS += -DBACKLIGHT_ENABLE - ifeq ($(strip $(BACKLIGHT_ENABLE)), software) + ifeq ($(strip $(BACKLIGHT_DRIVER)), software) SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c else - ifeq ($(strip $(BACKLIGHT_ENABLE)), custom) + ifeq ($(strip $(BACKLIGHT_DRIVER)), custom) OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER endif |