Explorar o código

Prevent wasteful writing to eeprom.

mtei %!s(int64=6) %!d(string=hai) anos
pai
achega
12a2572295
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      quantum/rgblight.c

+ 2 - 0
quantum/rgblight.c

@@ -128,7 +128,9 @@ uint32_t eeconfig_read_rgblight(void) {
 }
 void eeconfig_update_rgblight(uint32_t val) {
   #ifdef __AVR__
+  if (eeconfig_read_rgblight() != val) {
     eeprom_update_dword(EECONFIG_RGBLIGHT, val);
+  }
   #endif
 }
 void eeconfig_update_rgblight_default(void) {