aboutsummaryrefslogtreecommitdiffstats
path: root/common_features.mk
diff options
context:
space:
mode:
authorGravatar Joel Challis <git@zvecr.com>2020-03-07 12:09:49 +0000
committerGravatar GitHub <noreply@github.com>2020-03-07 12:09:49 +0000
commit3a303bd2aec57fd2d4d0f6d3e5583d746367d6e1 (patch)
tree8ab57281f90be800b6e3556e2705ffbcabf1494c /common_features.mk
parentd7ba0ad684a18c07952963427ca89a8e8e7e1903 (diff)
downloadqmk_firmware-3a303bd2aec57fd2d4d0f6d3e5583d746367d6e1.tar.gz
Backlight - Carve out a better location for private driver functionality (#8329)
* rename backlight_soft to match rules.mk * rename backlight_soft to match rules.mk - update common_features * Carve out a better location for private driver backlight functionality
Diffstat (limited to 'common_features.mk')
-rw-r--r--common_features.mk15
1 files changed, 9 insertions, 6 deletions
diff --git a/common_features.mk b/common_features.mk
index 36cae7865..fe65974e7 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -297,24 +297,27 @@ VALID_BACKLIGHT_TYPES := pwm software custom
BACKLIGHT_ENABLE ?= no
BACKLIGHT_DRIVER ?= pwm
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
- SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
$(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
endif
COMMON_VPATH += $(QUANTUM_DIR)/backlight
SRC += $(QUANTUM_DIR)/backlight/backlight.c
+ SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
OPT_DEFS += -DBACKLIGHT_ENABLE
ifeq ($(strip $(BACKLIGHT_DRIVER)), custom)
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
- else ifeq ($(strip $(BACKLIGHT_DRIVER)), software)
- SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c
else
- ifeq ($(PLATFORM),AVR)
- SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c
+ SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
+ ifeq ($(strip $(BACKLIGHT_DRIVER)), pwm)
+ ifeq ($(PLATFORM),AVR)
+ SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c
+ else
+ SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c
+ endif
else
- SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c
+ SRC += $(QUANTUM_DIR)/backlight/backlight_$(strip $(BACKLIGHT_DRIVER)).c
endif
endif
endif