commit: a6e931400ead19d3d34ca4a57785d1512dc2d12b
parent 2dd2d4eb8124cc92c9fb27d657fd9742a75a51e4
Author: Ryan <fauxpark@gmail.com>
Date: Sat, 25 Jan 2025 17:38:12 +1100
Relocate base WS2812 code (#24850)
Diffstat:
4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
@@ -944,6 +944,8 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
OPT_DEFS += -DWS2812_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
+ COMMON_VPATH += $(DRIVER_PATH)/led
+
SRC += ws2812.c ws2812_$(strip $(WS2812_DRIVER)).c
ifeq ($(strip $(PLATFORM)), CHIBIOS)
diff --git a/drivers/ws2812.c b/drivers/led/ws2812.c
diff --git a/drivers/ws2812.h b/drivers/led/ws2812.h
diff --git a/keyboards/ibm/model_m/mschwingen/mschwingen.c b/keyboards/ibm/model_m/mschwingen/mschwingen.c
@@ -19,9 +19,12 @@
#include "uart.h"
#include "print.h"
#include "sendchar.h"
-#include "ws2812.h"
#include "sleep_led.h"
+#ifdef KEYBOARD_ibm_model_m_mschwingen_led_ws2812
+#include "ws2812.h"
+#endif
+
#ifdef UART_DEBUG
# undef sendchar
static int8_t capture_sendchar(uint8_t c) {