aboutsummaryrefslogtreecommitdiff
path: root/common_features.mk
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2019-11-02 21:20:03 +0000
committerGitHub <noreply@github.com>2019-11-02 21:20:03 +0000
commit4531cc874e1bb8602fede9dc038b692673521590 (patch)
tree8e0ca8571a0de21513e00829e638f998387af1b7 /common_features.mk
parentff8d43694659b36ea5215a4183d43f58fc7f01e9 (diff)
downloadqmk_firmware-4531cc874e1bb8602fede9dc038b692673521590.tar.gz
qmk_firmware-4531cc874e1bb8602fede9dc038b692673521590.zip
Initial migration of software PWM backlight (#6709)
* Initial migration of software PWM backlight * First pass at backlight driver docs * Correct driver name in docs * Run backlight_task when using BACKLIGHT_PINS * Resolve backlight docs TODOs
Diffstat (limited to 'common_features.mk')
-rw-r--r--common_features.mk21
1 files changed, 12 insertions, 9 deletions
diff --git a/common_features.mk b/common_features.mk
index 7bb9187bb..a1f95955a 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -234,7 +234,7 @@ ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
234 BACKLIGHT_ENABLE = custom 234 BACKLIGHT_ENABLE = custom
235endif 235endif
236 236
237VALID_BACKLIGHT_TYPES := yes custom 237VALID_BACKLIGHT_TYPES := yes software custom
238 238
239BACKLIGHT_ENABLE ?= no 239BACKLIGHT_ENABLE ?= no
240ifneq ($(strip $(BACKLIGHT_ENABLE)), no) 240ifneq ($(strip $(BACKLIGHT_ENABLE)), no)
@@ -246,19 +246,22 @@ ifneq ($(strip $(BACKLIGHT_ENABLE)), no)
246 CIE1931_CURVE = yes 246 CIE1931_CURVE = yes
247 endif 247 endif
248 248
249
250 COMMON_VPATH += $(QUANTUM_DIR)/backlight 249 COMMON_VPATH += $(QUANTUM_DIR)/backlight
251 SRC += $(QUANTUM_DIR)/backlight/backlight.c 250 SRC += $(QUANTUM_DIR)/backlight/backlight.c
252 OPT_DEFS += -DBACKLIGHT_ENABLE 251 OPT_DEFS += -DBACKLIGHT_ENABLE
253 252
254 ifeq ($(strip $(BACKLIGHT_ENABLE)), custom) 253 ifeq ($(strip $(BACKLIGHT_ENABLE)), software)
255 OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER 254 SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c
256 endif
257
258 ifeq ($(PLATFORM),AVR)
259 SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c
260 else 255 else
261 SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c 256 ifeq ($(strip $(BACKLIGHT_ENABLE)), custom)
257 OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
258 endif
259
260 ifeq ($(PLATFORM),AVR)
261 SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c
262 else
263 SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c
264 endif
262 endif 265 endif
263endif 266endif
264 267