diff options
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/rgblight.c | 11 | ||||
| -rw-r--r-- | quantum/rgblight.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 44e9eade5..7d7d015ba 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c | |||
| @@ -237,6 +237,17 @@ void rgblight_init(void) { | |||
| 237 | is_rgblight_initialized = true; | 237 | is_rgblight_initialized = true; |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | void rgblight_reload_from_eeprom(void) { | ||
| 241 | /* Reset back to what we have in eeprom */ | ||
| 242 | rgblight_config.raw = eeconfig_read_rgblight(); | ||
| 243 | RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; | ||
| 244 | rgblight_check_config(); | ||
| 245 | eeconfig_debug_rgblight(); // display current eeprom values | ||
| 246 | if (rgblight_config.enable) { | ||
| 247 | rgblight_mode_noeeprom(rgblight_config.mode); | ||
| 248 | } | ||
| 249 | } | ||
| 250 | |||
| 240 | uint32_t rgblight_read_dword(void) { return rgblight_config.raw; } | 251 | uint32_t rgblight_read_dword(void) { return rgblight_config.raw; } |
| 241 | 252 | ||
| 242 | void rgblight_update_dword(uint32_t dword) { | 253 | void rgblight_update_dword(uint32_t dword) { |
diff --git a/quantum/rgblight.h b/quantum/rgblight.h index b9306e4d2..028b3ea41 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h | |||
| @@ -347,6 +347,9 @@ uint8_t rgblight_get_speed(void); | |||
| 347 | void rgblight_set_speed(uint8_t speed); | 347 | void rgblight_set_speed(uint8_t speed); |
| 348 | void rgblight_set_speed_noeeprom(uint8_t speed); | 348 | void rgblight_set_speed_noeeprom(uint8_t speed); |
| 349 | 349 | ||
| 350 | /* reset */ | ||
| 351 | void rgblight_reload_from_eeprom(void); | ||
| 352 | |||
| 350 | /* query */ | 353 | /* query */ |
| 351 | uint8_t rgblight_get_mode(void); | 354 | uint8_t rgblight_get_mode(void); |
| 352 | uint8_t rgblight_get_hue(void); | 355 | uint8_t rgblight_get_hue(void); |
