diff options
-rw-r--r-- | firmware/backlight.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c index 0b3ac5856d..2a726b65a4 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c | |||
@@ -28,6 +28,13 @@ | |||
28 | #include "power.h" | 28 | #include "power.h" |
29 | #include "system.h" | 29 | #include "system.h" |
30 | 30 | ||
31 | const char backlight_timeout_value[19] = | ||
32 | { | ||
33 | -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 45, 60, 90 | ||
34 | }; | ||
35 | |||
36 | #ifdef HAVE_BACKLIGHT | ||
37 | |||
31 | #define BACKLIGHT_ON 1 | 38 | #define BACKLIGHT_ON 1 |
32 | #define BACKLIGHT_OFF 2 | 39 | #define BACKLIGHT_OFF 2 |
33 | 40 | ||
@@ -42,11 +49,6 @@ static bool backlight_on_when_charging = 0; | |||
42 | static int backlight_timer; | 49 | static int backlight_timer; |
43 | static unsigned int backlight_timeout = 5; | 50 | static unsigned int backlight_timeout = 5; |
44 | 51 | ||
45 | const char backlight_timeout_value[19] = | ||
46 | { | ||
47 | -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 45, 60, 90 | ||
48 | }; | ||
49 | |||
50 | void backlight_thread(void) | 52 | void backlight_thread(void) |
51 | { | 53 | { |
52 | struct event ev; | 54 | struct event ev; |
@@ -175,3 +177,17 @@ void backlight_init(void) | |||
175 | 177 | ||
176 | backlight_on(); | 178 | backlight_on(); |
177 | } | 179 | } |
180 | |||
181 | #else /* no backlight, empty dummy functions */ | ||
182 | |||
183 | void backlight_init(void) {} | ||
184 | void backlight_on(void) {} | ||
185 | void backlight_off(void) {} | ||
186 | void backlight_tick(void) {} | ||
187 | int backlight_get_timeout(void) {return 0;} | ||
188 | void backlight_set_timeout(int index) {(void)index;} | ||
189 | bool backlight_get_on_when_charging(void) {return 0;} | ||
190 | void backlight_set_on_when_charging(bool yesno) {(void)yesno;} | ||
191 | |||
192 | #endif /* #ifdef HAVE_BACKLIGHT */ | ||
193 | |||