summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2019-05-01 07:48:33 -0500
committerDrashna Jaelre <drashna@live.com>2019-05-01 08:52:54 -0700
commitfd776b06b36497d196ab5e778104c476bba66d39 (patch)
tree15bf84b235c7d4b4997719493cd27368b6c7e4b4 /drivers
parent59d28fe2884c0639ef020ece3e1bc6967ab0881f (diff)
Fixing incorrect usage of RGBLED_NUM in ws2812 driver when used with RGB Matrix (#5744)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/avr/ws2812.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/avr/ws2812.c b/drivers/avr/ws2812.c
index b3ed4fd0b0..7c3cb5174d 100644
--- a/drivers/avr/ws2812.c
+++ b/drivers/avr/ws2812.c
@@ -158,7 +158,7 @@ void inline ws2812_setled(int i, uint8_t r, uint8_t g, uint8_t b)
void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b)
{
- for (int i = 0; i < RGBLED_NUM; i++) {
+ for (int i = 0; i < sizeof(led)/sizeof(led[0]); i++) {
led[i].r = r;
led[i].g = g;
led[i].b = b;