summaryrefslogtreecommitdiffstats
path: root/drivers/avr
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2019-05-01 14:48:33 +0200
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-05-01 14:48:33 +0200
commit50bc2dbe77e533959c4b8f821a31b489d25c7cb7 (patch)
treebed3ff6220f09b717ec5c61a154ed50ad5298f9f /drivers/avr
parent61ce41ae13242adb113f61ec03dd9ed26acee26b (diff)
downloadqmk_firmware-50bc2dbe77e533959c4b8f821a31b489d25c7cb7.tar.gz
qmk_firmware-50bc2dbe77e533959c4b8f821a31b489d25c7cb7.tar.xz
Fixing incorrect usage of RGBLED_NUM in ws2812 driver when used with RGB Matrix (#5744)
Diffstat (limited to 'drivers/avr')
-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 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;