diff options
author | lokher <lokher@gmail.com> | 2022-09-13 11:13:00 +0800 |
---|---|---|
committer | lokher <lokher@gmail.com> | 2022-09-13 11:13:00 +0800 |
commit | fe13cedf8c09fa34d5cec4e4c624738095176625 (patch) | |
tree | 818436626d49c7f22f325632b2053edba10d4358 /quantum/led_matrix/led_matrix.c | |
parent | fa207545a9759c50b9f230eb608d86a9085801d4 (diff) | |
parent | f46379f308783994b8178f95adc686f4b4c3ebd8 (diff) |
merge upstream master
Diffstat (limited to 'quantum/led_matrix/led_matrix.c')
-rw-r--r-- | quantum/led_matrix/led_matrix.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index e79138132b..67898d5f18 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -676,12 +676,22 @@ void led_matrix_decrease_speed(void) { led_matrix_decrease_speed_helper(true); } +void led_matrix_set_flags_eeprom_helper(led_flags_t flags, bool write_to_eeprom) { + led_matrix_eeconfig.flags = flags; + eeconfig_flag_led_matrix(write_to_eeprom); + dprintf("led matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.flags); +} + led_flags_t led_matrix_get_flags(void) { return led_matrix_eeconfig.flags; } void led_matrix_set_flags(led_flags_t flags) { - led_matrix_eeconfig.flags = flags; + led_matrix_set_flags_eeprom_helper(flags, true); +} + +void led_matrix_set_flags_noeeprom(led_flags_t flags) { + led_matrix_set_flags_eeprom_helper(flags, false); } #if LED_DISABLE_TIMEOUT > 0 |