summaryrefslogtreecommitdiff
path: root/quantum/backlight/backlight.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/backlight/backlight.c')
-rw-r--r--quantum/backlight/backlight.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c
index e57b31d103..4aa74667d9 100644
--- a/quantum/backlight/backlight.c
+++ b/quantum/backlight/backlight.c
@@ -130,18 +130,30 @@ void backlight_step(void) {
backlight_set(backlight_config.level);
}
-/** \brief Backlight set level
+/** \brief Backlight set level without EEPROM update
*
- * FIXME: needs doc
*/
-void backlight_level(uint8_t level) {
+void backlight_level_noeeprom(uint8_t level) {
if (level > BACKLIGHT_LEVELS) level = BACKLIGHT_LEVELS;
backlight_config.level = level;
backlight_config.enable = !!backlight_config.level;
- eeconfig_update_backlight(backlight_config.raw);
backlight_set(backlight_config.level);
}
+/** \brief Backlight set level
+ *
+ * FIXME: needs doc
+ */
+void backlight_level(uint8_t level) {
+ backlight_level_noeeprom(level);
+ eeconfig_update_backlight(backlight_config.raw);
+}
+
+/** \brief Update current backlight state to EEPROM
+ *
+ */
+void eeconfig_update_backlight_current(void) { eeconfig_update_backlight(backlight_config.raw); }
+
/** \brief Get backlight level
*
* FIXME: needs doc