aboutsummaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2019-07-17 14:58:29 +1000
committerDrashna Jaelre <drashna@live.com>2019-07-16 21:58:29 -0700
commit3895b4b86867c6323f4e595b9726d02158bca612 (patch)
tree4a6a5e0dfc78f682957457d8850aa1c1adc0541d /tmk_core
parenta8647f0d276c177a6cb596de090857ff08f293ff (diff)
downloadqmk_firmware-3895b4b86867c6323f4e595b9726d02158bca612.tar.gz
qmk_firmware-3895b4b86867c6323f4e595b9726d02158bca612.zip
Extend maximum number of backlight levels to 31 (#6351)
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/backlight.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/tmk_core/common/backlight.h b/tmk_core/common/backlight.h
index cc56fb9af..0a3877120 100644
--- a/tmk_core/common/backlight.h
+++ b/tmk_core/common/backlight.h
@@ -22,8 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
22 22
23#ifndef BACKLIGHT_LEVELS 23#ifndef BACKLIGHT_LEVELS
24 #define BACKLIGHT_LEVELS 3 24 #define BACKLIGHT_LEVELS 3
25#elif BACKLIGHT_LEVELS > 15 25#elif BACKLIGHT_LEVELS > 31
26 #error "Maximum value of BACKLIGHT_LEVELS is 15" 26 #error "Maximum value of BACKLIGHT_LEVELS is 31"
27#endif 27#endif
28 28
29typedef union { 29typedef union {
@@ -31,7 +31,8 @@ typedef union {
31 struct { 31 struct {
32 bool enable :1; 32 bool enable :1;
33 bool breathing :1; 33 bool breathing :1;
34 uint8_t level :4; 34 uint8_t reserved :1; // Reserved for possible future backlight modes
35 uint8_t level :5;
35 }; 36 };
36} backlight_config_t; 37} backlight_config_t;
37 38