diff options
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r-- | apps/plugins/lib/helper.c | 26 | ||||
-rw-r--r-- | apps/plugins/lib/helper.h | 3 |
2 files changed, 28 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 | } |
diff --git a/apps/plugins/lib/helper.h b/apps/plugins/lib/helper.h index 26baf0f6cd..20f5ee285b 100644 --- a/apps/plugins/lib/helper.h +++ b/apps/plugins/lib/helper.h | |||
@@ -27,14 +27,17 @@ | |||
27 | * Backlight on/off operations | 27 | * Backlight on/off operations |
28 | */ | 28 | */ |
29 | void backlight_force_on(void); | 29 | void backlight_force_on(void); |
30 | void backlight_ignore_timeout(void); | ||
30 | void backlight_use_settings(void); | 31 | void backlight_use_settings(void); |
31 | #ifdef HAVE_REMOTE_LCD | 32 | #ifdef HAVE_REMOTE_LCD |
32 | void remote_backlight_force_on(void); | 33 | void remote_backlight_force_on(void); |
34 | void remote_backlight_ignore_timeout(void); | ||
33 | void remote_backlight_use_settings(void); | 35 | void remote_backlight_use_settings(void); |
34 | #endif | 36 | #endif |
35 | 37 | ||
36 | #ifdef HAVE_BUTTON_LIGHT | 38 | #ifdef HAVE_BUTTON_LIGHT |
37 | void buttonlight_force_on(void); | 39 | void buttonlight_force_on(void); |
40 | void buttonlight_ignore_timeout(void); | ||
38 | void buttonlight_use_settings(void); | 41 | void buttonlight_use_settings(void); |
39 | #endif | 42 | #endif |
40 | 43 | ||