Add rgblight_reload_from_eeprom() (#11411)
* Add rgblight_reset_from_eeprom() * reset->reload
This commit is contained in:
		
							parent
							
								
									162842f16e
								
							
						
					
					
						commit
						bad9592a18
					
				
					 3 changed files with 15 additions and 0 deletions
				
			
		| 
						 | 
					@ -361,6 +361,7 @@ rgblight_sethsv(HSV_GREEN, 2); // led 2
 | 
				
			||||||
|`rgblight_step_noeeprom()`                  |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
 | 
					|`rgblight_step_noeeprom()`                  |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
 | 
				
			||||||
|`rgblight_step_reverse()`                   |Change the mode to the previous RGB animation in the list of enabled RGB animations |
 | 
					|`rgblight_step_reverse()`                   |Change the mode to the previous RGB animation in the list of enabled RGB animations |
 | 
				
			||||||
|`rgblight_step_reverse_noeeprom()`          |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
 | 
					|`rgblight_step_reverse_noeeprom()`          |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
 | 
				
			||||||
 | 
					|`rgblight_reload_from_eeprom()`             |Reload the effect configuration (enabled, mode and color) from EEPROM |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### effects mode disable/enable
 | 
					#### effects mode disable/enable
 | 
				
			||||||
|Function                                    |Description  |
 | 
					|Function                                    |Description  |
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -234,6 +234,17 @@ void rgblight_init(void) {
 | 
				
			||||||
    is_rgblight_initialized = true;
 | 
					    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; }
 | 
					uint32_t rgblight_read_dword(void) { return rgblight_config.raw; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void rgblight_update_dword(uint32_t dword) {
 | 
					void rgblight_update_dword(uint32_t dword) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -347,6 +347,9 @@ uint8_t rgblight_get_speed(void);
 | 
				
			||||||
void    rgblight_set_speed(uint8_t speed);
 | 
					void    rgblight_set_speed(uint8_t speed);
 | 
				
			||||||
void    rgblight_set_speed_noeeprom(uint8_t speed);
 | 
					void    rgblight_set_speed_noeeprom(uint8_t speed);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*   reset */
 | 
				
			||||||
 | 
					void rgblight_reload_from_eeprom(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*       query */
 | 
					/*       query */
 | 
				
			||||||
uint8_t rgblight_get_mode(void);
 | 
					uint8_t rgblight_get_mode(void);
 | 
				
			||||||
uint8_t rgblight_get_hue(void);
 | 
					uint8_t rgblight_get_hue(void);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue