diff options
Diffstat (limited to 'apps/plugins/lib/helper.c')
-rw-r--r-- | apps/plugins/lib/helper.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c index ce84915e02..780d636f41 100644 --- a/apps/plugins/lib/helper.c +++ b/apps/plugins/lib/helper.c | |||
@@ -36,9 +36,18 @@ const unsigned bit_n_table[32] = { | |||
36 | }; | 36 | }; |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | /* Force the backlight on */ | 39 | /* Force the backlight on */ |
40 | void backlight_force_on(void) | 40 | void backlight_force_on(void) |
41 | { | 41 | { |
42 | rb->backlight_set_timeout(0); | ||
43 | #if CONFIG_CHARGING | ||
44 | rb->backlight_set_timeout_plugged(0); | ||
45 | #endif /* CONFIG_CHARGING */ | ||
46 | } | ||
47 | |||
48 | /* Turn off backlight timeout */ | ||
49 | void backlight_ignore_timeout(void) | ||
50 | { | ||
42 | if (rb->global_settings->backlight_timeout > 0) | 51 | if (rb->global_settings->backlight_timeout > 0) |
43 | rb->backlight_set_timeout(0); | 52 | rb->backlight_set_timeout(0); |
44 | #if CONFIG_CHARGING | 53 | #if CONFIG_CHARGING |
@@ -61,6 +70,15 @@ void backlight_use_settings(void) | |||
61 | /* Force the backlight on */ | 70 | /* Force the backlight on */ |
62 | void remote_backlight_force_on(void) | 71 | void remote_backlight_force_on(void) |
63 | { | 72 | { |
73 | rb->remote_backlight_set_timeout(0); | ||
74 | #if CONFIG_CHARGING | ||
75 | rb->remote_backlight_set_timeout_plugged(0); | ||
76 | #endif /* CONFIG_CHARGING */ | ||
77 | } | ||
78 | |||
79 | /* Turn off backlight timeout */ | ||
80 | void remote_backlight_ignore_timeout(void) | ||
81 | { | ||
64 | if (rb->global_settings->remote_backlight_timeout > 0) | 82 | if (rb->global_settings->remote_backlight_timeout > 0) |
65 | rb->remote_backlight_set_timeout(0); | 83 | rb->remote_backlight_set_timeout(0); |
66 | #if CONFIG_CHARGING | 84 | #if CONFIG_CHARGING |
@@ -85,6 +103,12 @@ void remote_backlight_use_settings(void) | |||
85 | /* Force the buttonlight on */ | 103 | /* Force the buttonlight on */ |
86 | void buttonlight_force_on(void) | 104 | void buttonlight_force_on(void) |
87 | { | 105 | { |
106 | rb->buttonlight_set_timeout(0); | ||
107 | } | ||
108 | |||
109 | /* Turn off backlight timeout */ | ||
110 | void buttonlight_ignore_timeout(void) | ||
111 | { | ||
88 | if (rb->global_settings->buttonlight_timeout > 0) | 112 | if (rb->global_settings->buttonlight_timeout > 0) |
89 | rb->buttonlight_set_timeout(0); | 113 | rb->buttonlight_set_timeout(0); |
90 | } | 114 | } |