Răsfoiți Sursa

Simplify more feature driver defines (#22090)

Ryan 2 ani în urmă
părinte
comite
21ed9b4575
51 a modificat fișierele cu 63 adăugiri și 62 ștergeri
  1. 6 5
      builddefs/common_features.mk
  2. 1 1
      docs/ws2812_driver.md
  3. 1 1
      keyboards/4pplet/eagle_viper_rep/rev_a/config.h
  4. 1 1
      keyboards/aeboards/ext65/rev2/config.h
  5. 1 1
      keyboards/bt66tech/bt66tech60/config.h
  6. 1 1
      keyboards/cannonkeys/an_c/config.h
  7. 1 1
      keyboards/cannonkeys/atlas/config.h
  8. 1 1
      keyboards/cannonkeys/cloudline/config.h
  9. 1 1
      keyboards/cannonkeys/db60/config.h
  10. 1 1
      keyboards/cannonkeys/devastatingtkl/config.h
  11. 1 1
      keyboards/cannonkeys/instant60/config.h
  12. 1 1
      keyboards/cannonkeys/instant65/config.h
  13. 1 1
      keyboards/cannonkeys/malicious_ergo/config.h
  14. 1 1
      keyboards/cannonkeys/obliterated75/config.h
  15. 1 1
      keyboards/cannonkeys/ortho48/config.h
  16. 1 1
      keyboards/cannonkeys/ortho60/config.h
  17. 1 1
      keyboards/cannonkeys/ortho75/config.h
  18. 1 1
      keyboards/cannonkeys/practice60/config.h
  19. 1 1
      keyboards/cannonkeys/practice65/config.h
  20. 1 1
      keyboards/cannonkeys/ripple/config.h
  21. 1 1
      keyboards/cannonkeys/sagittarius/config.h
  22. 1 1
      keyboards/cannonkeys/savage65/config.h
  23. 1 1
      keyboards/cannonkeys/serenity/config.h
  24. 1 1
      keyboards/cannonkeys/tmov2/config.h
  25. 1 1
      keyboards/cannonkeys/tsukuyomi/config.h
  26. 1 1
      keyboards/eason/aeroboard/config.h
  27. 1 1
      keyboards/handwired/co60/rev7/config.h
  28. 1 1
      keyboards/handwired/steamvan/rev1/config.h
  29. 1 1
      keyboards/keebsforall/coarse60/config.h
  30. 1 1
      keyboards/mechlovin/adelais/rgb_led/rev3/config.h
  31. 1 1
      keyboards/mechlovin/zed60/config.h
  32. 1 1
      keyboards/mechlovin/zed65/910/config.h
  33. 1 1
      keyboards/mechlovin/zed65/no_backlight/wearhaus66/config.h
  34. 1 1
      keyboards/mechlovin/zed65/rev1/config.h
  35. 1 1
      keyboards/nack/config.h
  36. 1 1
      keyboards/plywrks/ply8x/config.h
  37. 1 1
      keyboards/primekb/meridian/config.h
  38. 1 1
      keyboards/primekb/meridian/ws2812/config.h
  39. 1 1
      keyboards/projectkb/alice/rev1/config.h
  40. 1 1
      keyboards/projectkb/alice/rev2/config.h
  41. 1 1
      keyboards/rart/rartlice/config.h
  42. 1 1
      keyboards/riot_pad/config.h
  43. 1 1
      keyboards/spaceholdings/nebula12/config.h
  44. 1 1
      keyboards/vertex/angle65/config.h
  45. 1 1
      keyboards/vertex/arc60/config.h
  46. 1 1
      keyboards/vertex/arc60h/config.h
  47. 1 1
      keyboards/zoo/wampus/config.h
  48. 1 1
      platforms/chibios/boards/BONSAI_C4/configs/config.h
  49. 1 1
      platforms/chibios/boards/BONSAI_C4/configs/halconf.h
  50. 1 1
      platforms/chibios/drivers/serial.c
  51. 8 8
      platforms/chibios/drivers/ws2812_spi.c

+ 6 - 5
builddefs/common_features.mk

@@ -602,7 +602,7 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
         $(call CATASTROPHIC_ERROR,Invalid WS2812_DRIVER,WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver)
     endif
 
-    OPT_DEFS += -DWS2812_DRIVER_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
+    OPT_DEFS += -DWS2812_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
 
     SRC += ws2812_$(strip $(WS2812_DRIVER)).c
 
@@ -739,17 +739,16 @@ ifeq ($(strip $(HAPTIC_ENABLE)),yes)
     ifeq ($(filter $(HAPTIC_DRIVER),$(VALID_HAPTIC_DRIVER_TYPES)),)
         $(call CATASTROPHIC_ERROR,Invalid HAPTIC_DRIVER,HAPTIC_DRIVER="$(HAPTIC_DRIVER)" is not a valid Haptic driver)
     else
+        OPT_DEFS += -DHAPTIC_$(strip $(shell echo $(HAPTIC_DRIVER) | tr '[:lower:]' '[:upper:]'))
         COMMON_VPATH += $(DRIVER_PATH)/haptic
 
         ifeq ($(strip $(HAPTIC_DRIVER)), drv2605l)
             SRC += drv2605l.c
             QUANTUM_LIB_SRC += i2c_master.c
-            OPT_DEFS += -DHAPTIC_DRV2605L
         endif
 
         ifeq ($(strip $(HAPTIC_DRIVER)), solenoid)
             SRC += solenoid.c
-            OPT_DEFS += -DHAPTIC_SOLENOID
         endif
     endif
 endif
@@ -772,6 +771,7 @@ ifeq ($(strip $(OLED_ENABLE)), yes)
             $(call CATASTROPHIC_ERROR,Invalid OLED_TRANSPORT,OLED_TRANSPORT="$(OLED_TRANSPORT)" is not a valid OLED transport)
         else
             OPT_DEFS += -DOLED_ENABLE
+            OPT_DEFS += -DOLED_$(strip $(shell echo $(OLED_DRIVER) | tr '[:lower:]' '[:upper:]'))
             COMMON_VPATH += $(DRIVER_PATH)/oled
             ifneq ($(strip $(OLED_DRIVER)), custom)
                 SRC += oled_driver.c
@@ -924,12 +924,13 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
         $(call CATASTROPHIC_ERROR,Invalid BLUETOOTH_DRIVER,BLUETOOTH_DRIVER="$(BLUETOOTH_DRIVER)" is not a valid Bluetooth driver type)
     endif
     OPT_DEFS += -DBLUETOOTH_ENABLE
+    OPT_DEFS += -DBLUETOOTH_$(strip $(shell echo $(BLUETOOTH_DRIVER) | tr '[:lower:]' '[:upper:]'))
     NO_USB_STARTUP_CHECK := yes
     COMMON_VPATH += $(DRIVER_PATH)/bluetooth
     SRC += outputselect.c
 
     ifeq ($(strip $(BLUETOOTH_DRIVER)), bluefruit_le)
-        OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE -DHAL_USE_SPI=TRUE
+        OPT_DEFS += -DHAL_USE_SPI=TRUE
         SRC += $(DRIVER_PATH)/bluetooth/bluetooth.c
         SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le.cpp
         QUANTUM_LIB_SRC += analog.c
@@ -937,7 +938,7 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
     endif
 
     ifeq ($(strip $(BLUETOOTH_DRIVER)), rn42)
-        OPT_DEFS += -DBLUETOOTH_RN42 -DHAL_USE_SERIAL=TRUE
+        OPT_DEFS += -DHAL_USE_SERIAL=TRUE
         SRC += $(DRIVER_PATH)/bluetooth/bluetooth.c
         SRC += $(DRIVER_PATH)/bluetooth/rn42.c
         QUANTUM_LIB_SRC += uart.c

+ 1 - 1
docs/ws2812_driver.md

@@ -85,7 +85,7 @@ WS2812_DRIVER = spi
 
 Configure the hardware via your config.h:
 ```c
-#define WS2812_SPI SPID1 // default: SPID1
+#define WS2812_SPI_DRIVER SPID1 // default: SPID1
 #define WS2812_SPI_MOSI_PAL_MODE 5 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
 #define WS2812_SPI_SCK_PIN B3 // Required for F072, may be for others -- SCK pin, see the respective datasheet for the appropriate values for your MCU. default: unspecified
 #define WS2812_SPI_SCK_PAL_MODE 5 // SCK pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5

+ 1 - 1
keyboards/4pplet/eagle_viper_rep/rev_a/config.h

@@ -20,7 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define BACKLIGHT_PWM_CHANNEL   4
 
 /* Underglow */
-#define WS2812_SPI  SPID1
+#define WS2812_SPI_DRIVER SPID1
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN A5
 #define WS2812_SPI_SCK_PAL_MODE 0

+ 1 - 1
keyboards/aeboards/ext65/rev2/config.h

@@ -17,7 +17,7 @@
 #pragma once
 
 //SPI
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/bt66tech/bt66tech60/config.h

@@ -25,7 +25,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 5
 /*
  * Feature disable options

+ 1 - 1
keyboards/cannonkeys/an_c/config.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/atlas/config.h

@@ -22,7 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/cloudline/config.h

@@ -12,7 +12,7 @@
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/db60/config.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/devastatingtkl/config.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/instant60/config.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/instant65/config.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/malicious_ergo/config.h

@@ -28,7 +28,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/obliterated75/config.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/ortho48/config.h

@@ -25,7 +25,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 
 /*
  * Feature disable options

+ 1 - 1
keyboards/cannonkeys/ortho60/config.h

@@ -25,7 +25,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 
 /*
  * Feature disable options

+ 1 - 1
keyboards/cannonkeys/ortho75/config.h

@@ -25,7 +25,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 
 /*
  * Feature disable options

+ 1 - 1
keyboards/cannonkeys/practice60/config.h

@@ -25,7 +25,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 
 /*
  * Feature disable options

+ 1 - 1
keyboards/cannonkeys/practice65/config.h

@@ -25,7 +25,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 
 /*
  * Feature disable options

+ 1 - 1
keyboards/cannonkeys/ripple/config.h

@@ -12,7 +12,7 @@
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/sagittarius/config.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/savage65/config.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/serenity/config.h

@@ -21,7 +21,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define BACKLIGHT_PWM_CHANNEL   1
 #define BACKLIGHT_PAL_MODE      1
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/tmov2/config.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/cannonkeys/tsukuyomi/config.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/eason/aeroboard/config.h

@@ -3,7 +3,7 @@
 
 #pragma once
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 5
 
 /* disable debug print */

+ 1 - 1
keyboards/handwired/co60/rev7/config.h

@@ -23,5 +23,5 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define LOCKING_RESYNC_ENABLE
 
 /* RGB underglow configuration */
-#define WS2812_SPI SPID1
+#define WS2812_SPI_DRIVER SPID1
 #define WS2812_SPI_MOSI_PAL_MODE 5

+ 1 - 1
keyboards/handwired/steamvan/rev1/config.h

@@ -22,7 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID1
+#define WS2812_SPI_DRIVER SPID1
 #define WS2812_SPI_MOSI_PAL_MODE 5
 
 #define RGB_MATRIX_KEYPRESSES

+ 1 - 1
keyboards/keebsforall/coarse60/config.h

@@ -25,7 +25,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/mechlovin/adelais/rgb_led/rev3/config.h

@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #pragma once
 
-#define WS2812_SPI SPID1 // default: SPID1
+#define WS2812_SPI_DRIVER SPID1 // default: SPID1
 #define WS2812_SPI_MOSI_PAL_MODE 5 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
 
 #ifdef RGB_MATRIX_ENABLE

+ 1 - 1
keyboards/mechlovin/zed60/config.h

@@ -17,5 +17,5 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #pragma once
 
-#define WS2812_SPI SPID1 // default: SPID1
+#define WS2812_SPI_DRIVER SPID1 // default: SPID1
 #define WS2812_SPI_MOSI_PAL_MODE 6 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5

+ 1 - 1
keyboards/mechlovin/zed65/910/config.h

@@ -17,5 +17,5 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #pragma once
 
-#define WS2812_SPI SPID1 // default: SPID1
+#define WS2812_SPI_DRIVER SPID1 // default: SPID1
 #define WS2812_SPI_MOSI_PAL_MODE 6 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5

+ 1 - 1
keyboards/mechlovin/zed65/no_backlight/wearhaus66/config.h

@@ -17,5 +17,5 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #pragma once
 
-#define WS2812_SPI SPID2 // default: SPID1
+#define WS2812_SPI_DRIVER SPID2 // default: SPID1
 #define WS2812_SPI_MOSI_PAL_MODE 0 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5

+ 1 - 1
keyboards/mechlovin/zed65/rev1/config.h

@@ -18,7 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #pragma once
 
 #ifdef RGBLIGHT_ENABLE
-#define WS2812_SPI SPID1 // default: SPID1
+#define WS2812_SPI_DRIVER SPID1 // default: SPID1
 #define WS2812_SPI_MOSI_PAL_MODE 6 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
 #define WS2812_SPI_USE_CIRCULAR_BUFFER
 #endif

+ 1 - 1
keyboards/nack/config.h

@@ -18,7 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #pragma once
 
 #ifdef RGB_MATRIX_ENABLE
-    #define WS2812_SPI SPID1
+    #define WS2812_SPI_DRIVER SPID1
     #define WS2812_SPI_MOSI_PAL_MODE 5
     #define RGB_MATRIX_LED_COUNT 52
     #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 // Max brightness of LEDs

+ 1 - 1
keyboards/plywrks/ply8x/config.h

@@ -4,7 +4,7 @@
 #pragma once
 
 /* RGB */
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13
 #define WS2812_SPI_SCK_PAL_MODE 0

+ 1 - 1
keyboards/primekb/meridian/config.h

@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #pragma once
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/primekb/meridian/ws2812/config.h

@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #pragma once
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/projectkb/alice/rev1/config.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/projectkb/alice/rev2/config.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/rart/rartlice/config.h

@@ -22,7 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 
 /*
  * Feature disable options

+ 1 - 1
keyboards/riot_pad/config.h

@@ -2,7 +2,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 #pragma once
 
-#define WS2812_SPI SPID1
+#define WS2812_SPI_DRIVER SPID1
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN A5

+ 1 - 1
keyboards/spaceholdings/nebula12/config.h

@@ -35,7 +35,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define I2C1_TIMINGR_SCLH 3U
 #define I2C1_TIMINGR_SCLL 9U
 
-#define WS2812_SPI SPID2 // default: SPID1
+#define WS2812_SPI_DRIVER SPID2 // default: SPID1
 #define WS2812_SPI_MOSI_PAL_MODE 0 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
keyboards/vertex/angle65/config.h

@@ -18,5 +18,5 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #define SOLENOID_PIN A2
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 5

+ 1 - 1
keyboards/vertex/arc60/config.h

@@ -16,7 +16,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #pragma once
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 5
 
 /*

+ 1 - 1
keyboards/vertex/arc60h/config.h

@@ -16,7 +16,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #pragma once
 
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 5
 
 /*

+ 1 - 1
keyboards/zoo/wampus/config.h

@@ -22,7 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define BACKLIGHT_PAL_MODE      1
 
 // SPI RGB Driver
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
 #define WS2812_SPI_MOSI_PAL_MODE 0
 #define WS2812_SPI_SCK_PAL_MODE 0
 #define WS2812_SPI_SCK_PIN B13

+ 1 - 1
platforms/chibios/boards/BONSAI_C4/configs/config.h

@@ -66,7 +66,7 @@
 #endif
 
 // WS2812-style LED control on pin A10
-#ifdef WS2812_DRIVER_PWM
+#ifdef WS2812_PWM
 #    ifndef WS2812_DI_PIN
 #        define WS2812_DI_PIN PAL_LINE(GPIOA, 10)
 #    endif

+ 1 - 1
platforms/chibios/boards/BONSAI_C4/configs/halconf.h

@@ -32,7 +32,7 @@
 #    endif
 #endif
 
-#ifdef WS2812_DRIVER_PWM
+#ifdef WS2812_PWM
 #    ifndef HAL_USE_PWM
 #        define HAL_USE_PWM TRUE
 #    endif

+ 1 - 1
platforms/chibios/drivers/serial.c

@@ -10,7 +10,7 @@
 #include <hal.h>
 
 // TODO: resolve/remove build warnings
-#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) && defined(PROTOCOL_CHIBIOS) && defined(WS2812_DRIVER_BITBANG)
+#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) && defined(PROTOCOL_CHIBIOS) && defined(WS2812_BITBANG)
 #    warning "RGBLED_SPLIT not supported with bitbang WS2812 driver"
 #endif
 

+ 8 - 8
platforms/chibios/drivers/ws2812_spi.c

@@ -6,8 +6,8 @@
 /* Adapted from https://github.com/gamazeps/ws2812b-chibios-SPIDMA/ */
 
 // Define the spi your LEDs are plugged to here
-#ifndef WS2812_SPI
-#    define WS2812_SPI SPID1
+#ifndef WS2812_SPI_DRIVER
+#    define WS2812_SPI_DRIVER SPID1
 #endif
 
 #ifndef WS2812_SPI_MOSI_PAL_MODE
@@ -179,11 +179,11 @@ void ws2812_init(void) {
 #endif
     };
 
-    spiAcquireBus(&WS2812_SPI);     /* Acquire ownership of the bus.    */
-    spiStart(&WS2812_SPI, &spicfg); /* Setup transfer parameters.       */
-    spiSelect(&WS2812_SPI);         /* Slave Select assertion.          */
+    spiAcquireBus(&WS2812_SPI_DRIVER);     /* Acquire ownership of the bus.    */
+    spiStart(&WS2812_SPI_DRIVER, &spicfg); /* Setup transfer parameters.       */
+    spiSelect(&WS2812_SPI_DRIVER);         /* Slave Select assertion.          */
 #ifdef WS2812_SPI_USE_CIRCULAR_BUFFER
-    spiStartSend(&WS2812_SPI, ARRAY_SIZE(txbuf), txbuf);
+    spiStartSend(&WS2812_SPI_DRIVER, ARRAY_SIZE(txbuf), txbuf);
 #endif
 }
 
@@ -202,9 +202,9 @@ void ws2812_setleds(rgb_led_t* ledarray, uint16_t leds) {
     // Instead spiSend can be used to send synchronously (or the thread logic can be added back).
 #ifndef WS2812_SPI_USE_CIRCULAR_BUFFER
 #    ifdef WS2812_SPI_SYNC
-    spiSend(&WS2812_SPI, ARRAY_SIZE(txbuf), txbuf);
+    spiSend(&WS2812_SPI_DRIVER, ARRAY_SIZE(txbuf), txbuf);
 #    else
-    spiStartSend(&WS2812_SPI, ARRAY_SIZE(txbuf), txbuf);
+    spiStartSend(&WS2812_SPI_DRIVER, ARRAY_SIZE(txbuf), txbuf);
 #    endif
 #endif
 }