Sfoglia il codice sorgente

Add `APA102_LED_COUNT` define (#22530)

Ryan 2 anni fa
parent
commit
099eaefb40
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      drivers/led/apa102.h

+ 6 - 0
drivers/led/apa102.h

@@ -19,6 +19,12 @@
 
 #include "color.h"
 
+#if defined(RGBLED_NUM)
+#    define APA102_LED_COUNT RGBLED_NUM
+#elif defined(RGB_MATRIX_LED_COUNT)
+#    define APA102_LED_COUNT RGB_MATRIX_LED_COUNT
+#endif
+
 #ifndef APA102_DEFAULT_BRIGHTNESS
 #    define APA102_DEFAULT_BRIGHTNESS 31
 #endif