]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Always send 3 * RGBLED_NUM bytes through I2C on ps2avrGB
authorLuiz Ribeiro <luizribeiro@gmail.com>
Sun, 11 Jun 2017 16:28:04 +0000 (12:28 -0400)
committerLuiz Ribeiro <luizribeiro@gmail.com>
Sun, 11 Jun 2017 16:30:48 +0000 (12:30 -0400)
This wasn't going to work on boards with a different number of LEDs,
since I was always sending 48 bytes.

keyboards/ps2avrGB/ps2avrGB.c

index 7ff8998544c2b5aa49634ad7c92244c4b03e0f9a..701c5847f539f897d3e183243a03b5315ee71444 100644 (file)
@@ -36,7 +36,7 @@ void rgblight_set(void) {
     }
 
     i2c_init();
-    i2c_send(0xb0, (uint8_t*)led, 48);
+    i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
 }
 
 __attribute__ ((weak))