summaryrefslogtreecommitdiffstats
path: root/drivers/led/issi/is31fl3741.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/led/issi/is31fl3741.c')
-rw-r--r--drivers/led/issi/is31fl3741.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c
index 2f43473fc1..65f0c3640b 100644
--- a/drivers/led/issi/is31fl3741.c
+++ b/drivers/led/issi/is31fl3741.c
@@ -180,10 +180,13 @@ void IS31FL3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
+ return;
+ }
+ g_pwm_buffer_update_required[led.driver] = true;
g_pwm_buffer[led.driver][led.r] = red;
g_pwm_buffer[led.driver][led.g] = green;
g_pwm_buffer[led.driver][led.b] = blue;
- g_pwm_buffer_update_required[led.driver] = true;
}
}