From: mtei <2170248+mtei@users.noreply.github.com> Date: Mon, 28 Jan 2019 18:23:46 +0000 (+0900) Subject: Prevent wasteful writing to eeprom. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=12a2572295ae4daa69299941c0fa491bd6e04669;p=qmk_firmware.git Prevent wasteful writing to eeprom. --- diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 23420ddd8..cf2666eb4 100644 --- a/quantum/rgblight.c +++ b/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) {