summaryrefslogtreecommitdiffstats
path: root/drivers/led/aw20216.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/led/aw20216.c')
-rw-r--r--drivers/led/aw20216.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/led/aw20216.c b/drivers/led/aw20216.c
index 7895f1497b..5fd25eed88 100644
--- a/drivers/led/aw20216.c
+++ b/drivers/led/aw20216.c
@@ -145,6 +145,9 @@ void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
aw_led led;
memcpy_P(&led, (&g_aw_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[led.driver][led.r] = red;
g_pwm_buffer[led.driver][led.g] = green;
g_pwm_buffer[led.driver][led.b] = blue;