diff options
| -rw-r--r-- | docs/feature_backlight.md | 2 | ||||
| -rw-r--r-- | tmk_core/common/backlight.h | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index b06db89e4..26a5078ca 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md | |||
| @@ -65,7 +65,7 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`: | |||
| 65 | |---------------------|-------------|-------------------------------------------------------------------------------------------------------------| | 65 | |---------------------|-------------|-------------------------------------------------------------------------------------------------------------| |
| 66 | |`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| | 66 | |`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| |
| 67 | |`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | | 67 | |`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | |
| 68 | |`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) | | 68 | |`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) | |
| 69 | |`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | | 69 | |`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | |
| 70 | |`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported | | 70 | |`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported | |
| 71 | |`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | | 71 | |`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | |
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 | ||
| 29 | typedef union { | 29 | typedef 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 | ||
