diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 989048d7174..c88ce36011c 100644 --- 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 similarity index 100% rename from drivers/ws2812.c rename to drivers/led/ws2812.c diff --git a/drivers/ws2812.h b/drivers/led/ws2812.h similarity index 100% rename from drivers/ws2812.h rename to drivers/led/ws2812.h diff --git a/keyboards/ibm/model_m/mschwingen/mschwingen.c b/keyboards/ibm/model_m/mschwingen/mschwingen.c index cb4854d8d1a..34a878c7699 100644 --- 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) {