Prevent wasteful writing to eeprom.

This commit is contained in:
mtei 2019-01-29 03:23:46 +09:00 committed by Drashna Jaelre
parent 5672dc8030
commit 12a2572295

View 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) {