summaryrefslogtreecommitdiff
path: root/tmk_core/common
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-06-18 10:15:02 -0400
committerGitHub <noreply@github.com>2017-06-18 10:15:02 -0400
commit51a86b85f35769533124d209c990aee18965ea6b (patch)
tree9951b7b99125472ffc4c4af15a764a0083dc1297 /tmk_core/common
parent7feadbd66d5c80b1c39c565864bb1af0d1e87874 (diff)
parent086aad0d7e5770e0be36498e5f569af5a23b111c (diff)
Merge pull request #1361 from fredizzimo/ergodox_infinity_backlight
Add Ergodox Infinity backlight support
Diffstat (limited to 'tmk_core/common')
-rw-r--r--tmk_core/common/backlight.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tmk_core/common/backlight.c b/tmk_core/common/backlight.c
index 0e0ad2d154..d03bfe931b 100644
--- a/tmk_core/common/backlight.c
+++ b/tmk_core/common/backlight.c
@@ -28,6 +28,9 @@ void backlight_init(void)
eeconfig_init();
}
backlight_config.raw = eeconfig_read_backlight();
+ if (backlight_config.level > BACKLIGHT_LEVELS) {
+ backlight_config.level = BACKLIGHT_LEVELS;
+ }
backlight_set(backlight_config.enable ? backlight_config.level : 0);
}