summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2021-01-28 10:52:59 +1100
committerNick Brassel <nick@tzarc.org>2021-01-28 10:52:59 +1100
commitd65db68f9f2614b91e3cb565086166b01400e473 (patch)
tree7477dbd7666a170444ffbf2ad29aa6d25189bf50 /quantum
parent99f3df28939d89b7fc2d2e7c0ee21b0879c7813f (diff)
parentbad9592a18494e3f678c2a117a526ca5f2f2280d (diff)
Merge remote-tracking branch 'upstream/master' into develop
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgblight.c11
-rw-r--r--quantum/rgblight.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 44e9eade53..7d7d015ba0 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -237,6 +237,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) {
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
index b9306e4d2c..028b3ea416 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight.h
@@ -347,6 +347,9 @@ uint8_t rgblight_get_speed(void);
void rgblight_set_speed(uint8_t speed);
void rgblight_set_speed_noeeprom(uint8_t speed);
+/* reset */
+void rgblight_reload_from_eeprom(void);
+
/* query */
uint8_t rgblight_get_mode(void);
uint8_t rgblight_get_hue(void);