From 12a2572295ae4daa69299941c0fa491bd6e04669 Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Tue, 29 Jan 2019 03:23:46 +0900 Subject: [PATCH] Prevent wasteful writing to eeprom. --- quantum/rgblight.c | 2 ++ 1 file changed, 2 insertions(+) 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) { -- 2.39.2