summaryrefslogtreecommitdiff
path: root/quantum/backlight/backlight.c
diff options
context:
space:
mode:
authorWilba <Jason.S.Williams@gmail.com>2020-01-21 05:18:25 +1100
committerFlorian Didron <fdidron@users.noreply.github.com>2020-02-26 10:15:12 +0900
commitcd526157047d870d7039cf26f034193f8c5e0cbb (patch)
treec9e72ad0992432d7901a0740919919d750e45213 /quantum/backlight/backlight.c
parent79386844a45996fd0402bb0e94561ed4c9799847 (diff)
Add VIA support for QMK backlight, QMK RGBLight (#7911)
* Add VIA support for QMK backlight, QMK RGBLight * clang-format changes
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