diff options
-rw-r--r-- | apps/plugin.h | 2 | ||||
-rw-r--r-- | firmware/backlight.c | 4 | ||||
-rw-r--r-- | firmware/export/backlight.h | 2 | ||||
-rw-r--r-- | uisimulator/common/stubs.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index be08091eba..2bcdffb344 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -203,7 +203,7 @@ struct plugin_api { | |||
203 | void (*bitswap)(unsigned char *data, int length); | 203 | void (*bitswap)(unsigned char *data, int length); |
204 | #endif | 204 | #endif |
205 | struct user_settings* global_settings; | 205 | struct user_settings* global_settings; |
206 | void (*backlight_set_timeout)(unsigned int index); | 206 | void (*backlight_set_timeout)(int index); |
207 | }; | 207 | }; |
208 | 208 | ||
209 | /* defined by the plugin loader (plugin.c) */ | 209 | /* defined by the plugin loader (plugin.c) */ |
diff --git a/firmware/backlight.c b/firmware/backlight.c index d3b4580daa..1e8ef3d3ab 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c | |||
@@ -126,9 +126,9 @@ int backlight_get_timeout(void) | |||
126 | return backlight_timeout; | 126 | return backlight_timeout; |
127 | } | 127 | } |
128 | 128 | ||
129 | void backlight_set_timeout(unsigned int index) | 129 | void backlight_set_timeout(int index) |
130 | { | 130 | { |
131 | if(index >= sizeof(backlight_timeout_value)) | 131 | if(index >= sizeof(backlight_timeout_value) || index < 0) |
132 | /* if given a weird value, use 0 */ | 132 | /* if given a weird value, use 0 */ |
133 | index=0; | 133 | index=0; |
134 | backlight_timeout = index; /* index in the backlight_timeout_value table */ | 134 | backlight_timeout = index; /* index in the backlight_timeout_value table */ |
diff --git a/firmware/export/backlight.h b/firmware/export/backlight.h index d0bfc62e2e..d80f2bbe61 100644 --- a/firmware/export/backlight.h +++ b/firmware/export/backlight.h | |||
@@ -24,7 +24,7 @@ void backlight_on(void); | |||
24 | void backlight_off(void); | 24 | void backlight_off(void); |
25 | void backlight_tick(void); | 25 | void backlight_tick(void); |
26 | int backlight_get_timeout(void); | 26 | int backlight_get_timeout(void); |
27 | void backlight_set_timeout(int seconds); | 27 | void backlight_set_timeout(int index); |
28 | bool backlight_get_on_when_charging(void); | 28 | bool backlight_get_on_when_charging(void); |
29 | void backlight_set_on_when_charging(bool yesno); | 29 | void backlight_set_on_when_charging(bool yesno); |
30 | extern const char backlight_timeout_value[]; | 30 | extern const char backlight_timeout_value[]; |
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c index 533b909786..23a6728db4 100644 --- a/uisimulator/common/stubs.c +++ b/uisimulator/common/stubs.c | |||
@@ -114,9 +114,9 @@ bool simulate_usb(void) | |||
114 | return false; | 114 | return false; |
115 | } | 115 | } |
116 | 116 | ||
117 | void backlight_set_timeout(int seconds) | 117 | void backlight_set_timeout(int index) |
118 | { | 118 | { |
119 | (void)seconds; | 119 | (void)index; |
120 | } | 120 | } |
121 | 121 | ||
122 | void backlight_set_on_when_charging(bool beep) | 122 | void backlight_set_on_when_charging(bool beep) |