diff options
Diffstat (limited to 'drivers/led/ckled2001.c')
-rw-r--r-- | drivers/led/ckled2001.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/led/ckled2001.c b/drivers/led/ckled2001.c index a99b479d1c..d0099163ee 100644 --- a/drivers/led/ckled2001.c +++ b/drivers/led/ckled2001.c @@ -150,6 +150,9 @@ void CKLED2001_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_ckled2001_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; |