]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Prevent wasteful writing to eeprom.
authormtei <2170248+mtei@users.noreply.github.com>
Mon, 28 Jan 2019 18:23:46 +0000 (03:23 +0900)
committerDrashna Jaelre <drashna@live.com>
Mon, 28 Jan 2019 22:57:41 +0000 (14:57 -0800)
quantum/rgblight.c

index 23420ddd87dd50007bedbfc150ee1912d37eb356..cf2666eb4b65c3b0843726ec954ad3508d922e3b 100644 (file)
@@ -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) {