forked from mirrors/qmk_userspace
[Core] Optimisation - Add RGB LED colour set check in drivers (#21134)
This commit is contained in:
parent
9a6056d09c
commit
d1d0925cf9
12 changed files with 41 additions and 1 deletions
|
@ -151,6 +151,9 @@ void CKLED2001_set_value(int index, uint8_t value) {
|
|||
if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led));
|
||||
|
||||
if (g_pwm_buffer[led.driver][led.v] == value) {
|
||||
return;
|
||||
}
|
||||
g_pwm_buffer[led.driver][led.v] = value;
|
||||
g_pwm_buffer_update_required[led.driver] = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue