summaryrefslogtreecommitdiff
path: root/quantum/rgblight.c
diff options
context:
space:
mode:
authorJoshua Diamond <josh@windowoffire.com>2021-01-27 12:42:03 -0500
committerGitHub <noreply@github.com>2021-01-28 04:42:03 +1100
commitbad9592a18494e3f678c2a117a526ca5f2f2280d (patch)
tree8ce28a5b691c1092795e80f3ef09871b07d0a22c /quantum/rgblight.c
parent162842f16ee2e064f826712c3cd0c4d24445732e (diff)
downloadqmk_firmware-bad9592a18494e3f678c2a117a526ca5f2f2280d.tar.gz
qmk_firmware-bad9592a18494e3f678c2a117a526ca5f2f2280d.zip
Add rgblight_reload_from_eeprom() (#11411)
* Add rgblight_reset_from_eeprom() * reset->reload
Diffstat (limited to 'quantum/rgblight.c')
-rw-r--r--quantum/rgblight.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index d856f6d6c8..ac4ff9bfda 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -234,6 +234,17 @@ void rgblight_init(void) {
is_rgblight_initialized = true;
}
+void rgblight_reload_from_eeprom(void) {
+ /* Reset back to what we have in eeprom */
+ rgblight_config.raw = eeconfig_read_rgblight();
+ RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
+ rgblight_check_config();
+ eeconfig_debug_rgblight(); // display current eeprom values
+ if (rgblight_config.enable) {
+ rgblight_mode_noeeprom(rgblight_config.mode);
+ }
+}
+
uint32_t rgblight_read_dword(void) { return rgblight_config.raw; }
void rgblight_update_dword(uint32_t dword) {