summaryrefslogtreecommitdiff
path: root/quantum/backlight
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/backlight')
-rw-r--r--quantum/backlight/backlight.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c
index 9d9f944f5d..e89b34696c 100644
--- a/quantum/backlight/backlight.c
+++ b/quantum/backlight/backlight.c
@@ -22,10 +22,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
backlight_config_t backlight_config;
+#ifndef BACKLIGHT_DEFAULT_ON
+# define BACKLIGHT_DEFAULT_ON true
+#endif
+
#ifndef BACKLIGHT_DEFAULT_LEVEL
# define BACKLIGHT_DEFAULT_LEVEL BACKLIGHT_LEVELS
#endif
+#ifndef BACKLIGHT_DEFAULT_BREATHING
+# define BACKLIGHT_DEFAULT_BREATHING false
+#else
+# undef BACKLIGHT_DEFAULT_BREATHING
+# define BACKLIGHT_DEFAULT_BREATHING true
+#endif
+
#ifdef BACKLIGHT_BREATHING
// TODO: migrate to backlight_config_t
static uint8_t breathing_period = BREATHING_PERIOD;
@@ -172,13 +183,9 @@ void eeconfig_update_backlight_current(void) {
}
void eeconfig_update_backlight_default(void) {
- backlight_config.enable = 1;
-#ifdef BACKLIGHT_DEFAULT_BREATHING
- backlight_config.breathing = 1;
-#else
- backlight_config.breathing = 0;
-#endif
- backlight_config.level = BACKLIGHT_DEFAULT_LEVEL;
+ backlight_config.enable = BACKLIGHT_DEFAULT_ON;
+ backlight_config.breathing = BACKLIGHT_DEFAULT_BREATHING;
+ backlight_config.level = BACKLIGHT_DEFAULT_LEVEL;
eeconfig_update_backlight(backlight_config.raw);
}