aboutsummaryrefslogtreecommitdiff
path: root/quantum/rgblight.c
diff options
context:
space:
mode:
authormtei <2170248+mtei@users.noreply.github.com>2019-01-29 03:23:46 +0900
committerDrashna Jaelre <drashna@live.com>2019-01-28 14:57:41 -0800
commit12a2572295ae4daa69299941c0fa491bd6e04669 (patch)
tree8c7d81517df0ae0518b5976ac604e657f763bdfc /quantum/rgblight.c
parent5672dc8030e99541e1d71c749916249fb4b2504b (diff)
downloadqmk_firmware-12a2572295ae4daa69299941c0fa491bd6e04669.tar.gz
qmk_firmware-12a2572295ae4daa69299941c0fa491bd6e04669.zip
Prevent wasteful writing to eeprom.
Diffstat (limited to 'quantum/rgblight.c')
-rw-r--r--quantum/rgblight.c2
1 files changed, 2 insertions, 0 deletions
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) {
128} 128}
129void eeconfig_update_rgblight(uint32_t val) { 129void eeconfig_update_rgblight(uint32_t val) {
130 #ifdef __AVR__ 130 #ifdef __AVR__
131 if (eeconfig_read_rgblight() != val) {
131 eeprom_update_dword(EECONFIG_RGBLIGHT, val); 132 eeprom_update_dword(EECONFIG_RGBLIGHT, val);
133 }
132 #endif 134 #endif
133} 135}
134void eeconfig_update_rgblight_default(void) { 136void eeconfig_update_rgblight_default(void) {