summaryrefslogtreecommitdiff
path: root/drivers/avr/ws2812.c
diff options
context:
space:
mode:
authorFlorian Didron <fdidron@users.noreply.github.com>2019-05-06 09:53:18 +0900
committerGitHub <noreply@github.com>2019-05-06 09:53:18 +0900
commit2a70dc8eea79029a92eedc0d9d53b5341bb8271c (patch)
tree0ba8dd213fb281ce52f665f582aab33883760365 /drivers/avr/ws2812.c
parentfeb7c58f305eb66648cf9a12903caf5ca0f83c7f (diff)
parentfd776b06b36497d196ab5e778104c476bba66d39 (diff)
Merge pull request #36 from zsa/fix/ws2812_matrix_refs
Fixing incorrect usage of RGBLED_NUM in ws2812 driver when used with RGB Matrix (#5744)
Diffstat (limited to 'drivers/avr/ws2812.c')
-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;