summaryrefslogtreecommitdiff
path: root/quantum/backlight
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/backlight')
-rw-r--r--quantum/backlight/backlight.c20
-rw-r--r--quantum/backlight/backlight.h2
2 files changed, 18 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
diff --git a/quantum/backlight/backlight.h b/quantum/backlight/backlight.h
index 9f0a5e81d7..08acf942ff 100644
--- a/quantum/backlight/backlight.h
+++ b/quantum/backlight/backlight.h
@@ -48,8 +48,10 @@ bool is_backlight_enabled(void);
void backlight_step(void);
void backlight_increase(void);
void backlight_decrease(void);
+void backlight_level_noeeprom(uint8_t level);
void backlight_level(uint8_t level);
uint8_t get_backlight_level(void);
+void eeconfig_update_backlight_current(void);
// implementation specific
void backlight_init_ports(void);