summaryrefslogtreecommitdiffstats
path: root/builddefs
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-03-30 12:21:02 +1100
committerGitHub <noreply@github.com>2023-03-30 12:21:02 +1100
commit647c2835e65995339fb9380830c53725a62f6299 (patch)
tree8e5b96ea65f2a4c5e0990ac09dfc7f019ac1b90e /builddefs
parent7e1e662dc704736b88cc4a7487457638b72f54e8 (diff)
WS2812 driver improvements (#20262)
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/common_features.mk14
1 files changed, 5 insertions, 9 deletions
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 0880934e95..af6cf81aa8 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -574,7 +574,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
endif
endif
-VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c vendor
+VALID_WS2812_DRIVER_TYPES := bitbang custom i2c pwm spi vendor
WS2812_DRIVER ?= bitbang
ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
@@ -584,15 +584,11 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
OPT_DEFS += -DWS2812_DRIVER_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
- ifeq ($(strip $(WS2812_DRIVER)), bitbang)
- SRC += ws2812.c
- else
- SRC += ws2812_$(strip $(WS2812_DRIVER)).c
+ SRC += ws2812_$(strip $(WS2812_DRIVER)).c
- ifeq ($(strip $(PLATFORM)), CHIBIOS)
- ifeq ($(strip $(WS2812_DRIVER)), pwm)
- OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE
- endif
+ ifeq ($(strip $(PLATFORM)), CHIBIOS)
+ ifeq ($(strip $(WS2812_DRIVER)), pwm)
+ OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE
endif
endif