浏览代码

Add ws2812 driver type define (#7888)

Joel Challis 5 年之前
父节点
当前提交
61cd180163
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      common_features.mk

+ 2 - 0
common_features.mk

@@ -278,6 +278,8 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
         $(error WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver)
     endif
 
+    OPT_DEFS += -DWS2812_DRIVER_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
+
     ifeq ($(strip $(WS2812_DRIVER)), bitbang)
         SRC += ws2812.c
     else