summaryrefslogtreecommitdiff
path: root/builddefs
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-09-21 15:50:01 +1000
committerGitHub <noreply@github.com>2023-09-21 15:50:01 +1000
commitf8cea06be3f364e35b5f33c13cf025f010ab158f (patch)
tree52a0e35ad05c9b100c348713a7a070df6e9acbec /builddefs
parent3062c98093dd88c4de644d1940b86aa904802616 (diff)
RGBLight/Backlight: add prefixed driver defines (#22089)
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/common_features.mk6
1 files changed, 2 insertions, 4 deletions
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 2dd759973d..a594e2b1d5 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -328,6 +328,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
COMMON_VPATH += $(QUANTUM_DIR)/rgblight
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h
OPT_DEFS += -DRGBLIGHT_ENABLE
+ OPT_DEFS += -DRGBLIGHT_$(strip $(shell echo $(RGBLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]'))
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
CIE1931_CURVE := yes
@@ -341,10 +342,6 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
ifeq ($(strip $(RGBLIGHT_DRIVER)), apa102)
APA102_DRIVER_REQUIRED := yes
endif
-
- ifeq ($(strip $(RGBLIGHT_DRIVER)), custom)
- OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
- endif
endif
# Deprecated driver names - do not use
@@ -584,6 +581,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/backlight/backlight.c
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
OPT_DEFS += -DBACKLIGHT_ENABLE
+ OPT_DEFS += -DBACKLIGHT_$(strip $(shell echo $(BACKLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]'))
ifneq ($(strip $(BACKLIGHT_DRIVER)), custom)
SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c