summaryrefslogtreecommitdiffstats
path: root/drivers/led/issi/is31fl3731.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/led/issi/is31fl3731.c')
-rw-r--r--drivers/led/issi/is31fl3731.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/led/issi/is31fl3731.c b/drivers/led/issi/is31fl3731.c
index 80344ca721..b8b520161e 100644
--- a/drivers/led/issi/is31fl3731.c
+++ b/drivers/led/issi/is31fl3731.c
@@ -184,6 +184,9 @@ void IS31FL3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
// Subtract 0x24 to get the second index of g_pwm_buffer
+ if (g_pwm_buffer[led.driver][led.r - 0x24] == red && g_pwm_buffer[led.driver][led.g - 0x24] == green && g_pwm_buffer[led.driver][led.b - 0x24] == blue) {
+ return;
+ }
g_pwm_buffer[led.driver][led.r - 0x24] = red;
g_pwm_buffer[led.driver][led.g - 0x24] = green;
g_pwm_buffer[led.driver][led.b - 0x24] = blue;