diff options
Diffstat (limited to 'quantum/rgb_matrix/rgb_matrix_drivers.c')
-rw-r--r-- | quantum/rgb_matrix/rgb_matrix_drivers.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index 27fa7369bf..e75b2c6c9d 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -106,7 +106,7 @@ static void init(void) { # endif # endif - for (int index = 0; index < DRIVER_LED_TOTAL; index++) { + for (int index = 0; index < RGB_MATRIX_LED_COUNT; index++) { bool enabled = true; // This only caches it for later @@ -336,13 +336,13 @@ const rgb_matrix_driver_t rgb_matrix_driver = { # endif // LED color buffer -LED_TYPE rgb_matrix_ws2812_array[DRIVER_LED_TOTAL]; +LED_TYPE rgb_matrix_ws2812_array[RGB_MATRIX_LED_COUNT]; static void init(void) {} static void flush(void) { // Assumes use of RGB_DI_PIN - ws2812_setleds(rgb_matrix_ws2812_array, DRIVER_LED_TOTAL); + ws2812_setleds(rgb_matrix_ws2812_array, RGB_MATRIX_LED_COUNT); } // Set an led in the buffer to a color @@ -369,7 +369,7 @@ static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { } static void setled_all(uint8_t r, uint8_t g, uint8_t b) { - for (int i = 0; i < sizeof(rgb_matrix_ws2812_array) / sizeof(rgb_matrix_ws2812_array[0]); i++) { + for (int i = 0; i < ARRAY_SIZE(rgb_matrix_ws2812_array); i++) { setled(i, r, g, b); } } |