From 50bc2dbe77e533959c4b8f821a31b489d25c7cb7 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Wed, 1 May 2019 07:48:33 -0500 Subject: Fixing incorrect usage of RGBLED_NUM in ws2812 driver when used with RGB Matrix (#5744) --- drivers/avr/ws2812.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/avr/ws2812.c b/drivers/avr/ws2812.c index b3ed4fd0b..7c3cb5174 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; -- cgit v1.2.3-24-g4f1b