diff options
| -rw-r--r-- | quantum/rgb_matrix_drivers.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 204b6c551..222593608 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c | |||
| @@ -115,27 +115,27 @@ const rgb_matrix_driver_t rgb_matrix_driver = { | |||
| 115 | #elif defined(WS2812) | 115 | #elif defined(WS2812) |
| 116 | 116 | ||
| 117 | // LED color buffer | 117 | // LED color buffer |
| 118 | LED_TYPE led[DRIVER_LED_TOTAL]; | 118 | LED_TYPE rgb_matrix_ws2812_array[DRIVER_LED_TOTAL]; |
| 119 | 119 | ||
| 120 | static void init(void) {} | 120 | static void init(void) {} |
| 121 | 121 | ||
| 122 | static void flush(void) { | 122 | static void flush(void) { |
| 123 | // Assumes use of RGB_DI_PIN | 123 | // Assumes use of RGB_DI_PIN |
| 124 | ws2812_setleds(led, DRIVER_LED_TOTAL); | 124 | ws2812_setleds(rgb_matrix_ws2812_array, DRIVER_LED_TOTAL); |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | // Set an led in the buffer to a color | 127 | // Set an led in the buffer to a color |
| 128 | static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { | 128 | static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { |
| 129 | led[i].r = r; | 129 | rgb_matrix_ws2812_array[i].r = r; |
| 130 | led[i].g = g; | 130 | rgb_matrix_ws2812_array[i].g = g; |
| 131 | led[i].b = b; | 131 | rgb_matrix_ws2812_array[i].b = b; |
| 132 | # ifdef RGBW | 132 | # ifdef RGBW |
| 133 | convert_rgb_to_rgbw(led[i]); | 133 | convert_rgb_to_rgbw(rgb_matrix_ws2812_array[i]); |
| 134 | # endif | 134 | # endif |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | static void setled_all(uint8_t r, uint8_t g, uint8_t b) { | 137 | static void setled_all(uint8_t r, uint8_t g, uint8_t b) { |
| 138 | for (int i = 0; i < sizeof(led) / sizeof(led[0]); i++) { | 138 | for (int i = 0; i < sizeof(rgb_matrix_ws2812_array) / sizeof(rgb_matrix_ws2812_array[0]); i++) { |
| 139 | setled(i, r, g, b); | 139 | setled(i, r, g, b); |
| 140 | } | 140 | } |
| 141 | } | 141 | } |
