mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 19:40:29 +08:00
Remove redundant RGB/LED matrix eeconfig init (#22673)
This commit is contained in:
parent
7298551e19
commit
dc5befd139
|
@ -111,6 +111,16 @@ void eeconfig_debug_led_matrix(void) {
|
|||
dprintf("led_matrix_eeconfig.flags = %d\n", led_matrix_eeconfig.flags);
|
||||
}
|
||||
|
||||
void led_matrix_reload_from_eeprom(void) {
|
||||
led_matrix_disable_noeeprom();
|
||||
/* Reset back to what we have in eeprom */
|
||||
eeconfig_init_led_matrix();
|
||||
eeconfig_debug_led_matrix(); // display current eeprom values
|
||||
if (led_matrix_eeconfig.enable) {
|
||||
led_matrix_mode_noeeprom(led_matrix_eeconfig.mode);
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((weak)) uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -415,12 +425,6 @@ void led_matrix_init(void) {
|
|||
}
|
||||
#endif // LED_MATRIX_KEYREACTIVE_ENABLED
|
||||
|
||||
if (!eeconfig_is_enabled()) {
|
||||
dprintf("led_matrix_init_drivers eeconfig is not enabled.\n");
|
||||
eeconfig_init();
|
||||
eeconfig_update_led_matrix_default();
|
||||
}
|
||||
|
||||
eeconfig_init_led_matrix();
|
||||
if (!led_matrix_eeconfig.mode) {
|
||||
dprintf("led_matrix_init_drivers led_matrix_eeconfig.mode = 0. Write default values to EEPROM.\n");
|
||||
|
|
|
@ -136,6 +136,8 @@ bool led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max);
|
|||
|
||||
void led_matrix_init(void);
|
||||
|
||||
void led_matrix_reload_from_eeprom(void);
|
||||
|
||||
void led_matrix_set_suspend_state(bool state);
|
||||
bool led_matrix_get_suspend_state(void);
|
||||
void led_matrix_toggle(void);
|
||||
|
|
|
@ -460,12 +460,6 @@ void rgb_matrix_init(void) {
|
|||
}
|
||||
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
|
||||
|
||||
if (!eeconfig_is_enabled()) {
|
||||
dprintf("rgb_matrix_init_drivers eeconfig is not enabled.\n");
|
||||
eeconfig_init();
|
||||
eeconfig_update_rgb_matrix_default();
|
||||
}
|
||||
|
||||
eeconfig_init_rgb_matrix();
|
||||
if (!rgb_matrix_config.mode) {
|
||||
dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n");
|
||||
|
|
Loading…
Reference in a new issue