aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nick Brassel <nick@tzarc.org>2020-08-25 18:58:22 +1000
committerGravatar James Young <18669334+noroadsleft@users.noreply.github.com>2020-08-29 14:30:02 -0700
commit1de39e5632a1cc9c4541a6b62b6eb3b360ce8747 (patch)
tree0906b266a81e2b5aac626619cefbfb09332c1692
parentb89b2030af655132e2708cbdffd7fb1b8e1aaeb4 (diff)
downloadqmk_firmware-1de39e5632a1cc9c4541a6b62b6eb3b360ce8747.tar.gz
Define STM32_DMA_REQUIRED when using DMA-based WS2812 driver on STM32. (#10127)
-rw-r--r--common_features.mk6
-rw-r--r--keyboards/zvecr/split_blackpill/rules.mk1
-rw-r--r--keyboards/zvecr/zv48/rules.mk1
3 files changed, 6 insertions, 2 deletions
diff --git a/common_features.mk b/common_features.mk
index 2806544f8..088db89ca 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -304,6 +304,12 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
SRC += ws2812.c
else
SRC += ws2812_$(strip $(WS2812_DRIVER)).c
+
+ ifeq ($(strip $(PLATFORM)), CHIBIOS)
+ ifeq ($(strip $(WS2812_DRIVER)), pwm)
+ OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE
+ endif
+ endif
endif
# add extra deps
diff --git a/keyboards/zvecr/split_blackpill/rules.mk b/keyboards/zvecr/split_blackpill/rules.mk
index 151ed15d8..6feec7dd9 100644
--- a/keyboards/zvecr/split_blackpill/rules.mk
+++ b/keyboards/zvecr/split_blackpill/rules.mk
@@ -31,6 +31,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
SPLIT_KEYBOARD = yes
SERIAL_DRIVER = usart
WS2812_DRIVER = pwm
-OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE
LAYOUTS = ortho_4x12
diff --git a/keyboards/zvecr/zv48/rules.mk b/keyboards/zvecr/zv48/rules.mk
index 41ec506e6..d725f9cb1 100644
--- a/keyboards/zvecr/zv48/rules.mk
+++ b/keyboards/zvecr/zv48/rules.mk
@@ -22,7 +22,6 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
SPLIT_KEYBOARD = yes
SERIAL_DRIVER = usart
WS2812_DRIVER = pwm
-OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE
DEFAULT_FOLDER = zvecr/zv48/f401