From c4f99f06ab4f260ad9ee8c4281073c5d82431e57 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Thu, 20 Oct 2022 23:17:51 +0200 Subject: ws2812: replace RGBLED_NUM with driver-owned constant to decouple driver from RGBLEDs/RGBMATRIX defines (#18036) --- drivers/ws2812.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers') diff --git a/drivers/ws2812.h b/drivers/ws2812.h index 5985b5340c..8750b0110e 100644 --- a/drivers/ws2812.h +++ b/drivers/ws2812.h @@ -56,6 +56,12 @@ # define WS2812_TRST_US 280 #endif +#if defined(RGBLED_NUM) +# define WS2812_LED_COUNT RGBLED_NUM +#elif defined(RGB_MATRIX_LED_COUNT) +# define WS2812_LED_COUNT RGB_MATRIX_LED_COUNT +#endif + /* User Interface * * Input: -- cgit v1.2.3