diff options
author | Thomas Kriechbaumer <Kriechi@users.noreply.github.com> | 2022-10-20 23:17:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 08:17:51 +1100 |
commit | c4f99f06ab4f260ad9ee8c4281073c5d82431e57 (patch) | |
tree | 64bfd736a26fc155f08c76bb58054aaa6d0a5769 /drivers | |
parent | a7d6643e3d230f4eceb9ee0e644c25b317b354b4 (diff) |
ws2812: replace RGBLED_NUM with driver-owned constant to decouple driver from RGBLEDs/RGBMATRIX defines (#18036)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ws2812.h | 6 |
1 files changed, 6 insertions, 0 deletions
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: |