mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-12-25 10:44:59 +06:00
Prevent wasteful writing to eeprom.
This commit is contained in:
parent
5672dc8030
commit
12a2572295
@ -128,7 +128,9 @@ uint32_t eeconfig_read_rgblight(void) {
|
|||||||
}
|
}
|
||||||
void eeconfig_update_rgblight(uint32_t val) {
|
void eeconfig_update_rgblight(uint32_t val) {
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
|
if (eeconfig_read_rgblight() != val) {
|
||||||
eeprom_update_dword(EECONFIG_RGBLIGHT, val);
|
eeprom_update_dword(EECONFIG_RGBLIGHT, val);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
void eeconfig_update_rgblight_default(void) {
|
void eeconfig_update_rgblight_default(void) {
|
||||||
|
Loading…
Reference in New Issue
Block a user