diff options
Diffstat (limited to 'tmk_core/common/backlight.h')
-rw-r--r-- | tmk_core/common/backlight.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tmk_core/common/backlight.h b/tmk_core/common/backlight.h index 0a3877120..bb1f897ee 100644 --- a/tmk_core/common/backlight.h +++ b/tmk_core/common/backlight.h | |||
@@ -21,31 +21,31 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
21 | #include <stdbool.h> | 21 | #include <stdbool.h> |
22 | 22 | ||
23 | #ifndef BACKLIGHT_LEVELS | 23 | #ifndef BACKLIGHT_LEVELS |
24 | #define BACKLIGHT_LEVELS 3 | 24 | # define BACKLIGHT_LEVELS 3 |
25 | #elif BACKLIGHT_LEVELS > 31 | 25 | #elif BACKLIGHT_LEVELS > 31 |
26 | #error "Maximum value of BACKLIGHT_LEVELS is 31" | 26 | # error "Maximum value of BACKLIGHT_LEVELS is 31" |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | typedef union { | 29 | typedef union { |
30 | uint8_t raw; | 30 | uint8_t raw; |
31 | struct { | 31 | struct { |
32 | bool enable :1; | 32 | bool enable : 1; |
33 | bool breathing :1; | 33 | bool breathing : 1; |
34 | uint8_t reserved :1; // Reserved for possible future backlight modes | 34 | uint8_t reserved : 1; // Reserved for possible future backlight modes |
35 | uint8_t level :5; | 35 | uint8_t level : 5; |
36 | }; | 36 | }; |
37 | } backlight_config_t; | 37 | } backlight_config_t; |
38 | 38 | ||
39 | void backlight_init(void); | 39 | void backlight_init(void); |
40 | void backlight_increase(void); | 40 | void backlight_increase(void); |
41 | void backlight_decrease(void); | 41 | void backlight_decrease(void); |
42 | void backlight_toggle(void); | 42 | void backlight_toggle(void); |
43 | void backlight_enable(void); | 43 | void backlight_enable(void); |
44 | void backlight_disable(void); | 44 | void backlight_disable(void); |
45 | bool is_backlight_enabled(void); | 45 | bool is_backlight_enabled(void); |
46 | void backlight_step(void); | 46 | void backlight_step(void); |
47 | void backlight_set(uint8_t level); | 47 | void backlight_set(uint8_t level); |
48 | void backlight_level(uint8_t level); | 48 | void backlight_level(uint8_t level); |
49 | uint8_t get_backlight_level(void); | 49 | uint8_t get_backlight_level(void); |
50 | 50 | ||
51 | #ifdef BACKLIGHT_BREATHING | 51 | #ifdef BACKLIGHT_BREATHING |