summaryrefslogtreecommitdiff
path: root/apps/plugins/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/helper.c26
-rw-r--r--apps/plugins/lib/helper.h3
2 files changed, 28 insertions, 1 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c
index ce84915..780d636 100644
--- a/apps/plugins/lib/helper.c
+++ b/apps/plugins/lib/helper.c
@@ -36,9 +36,18 @@ const unsigned bit_n_table[32] = {
};
#endif
-/* Force the backlight on */
+/* Force the backlight on */
void backlight_force_on(void)
{
+ rb->backlight_set_timeout(0);
+#if CONFIG_CHARGING
+ rb->backlight_set_timeout_plugged(0);
+#endif /* CONFIG_CHARGING */
+}
+
+/* Turn off backlight timeout */
+void backlight_ignore_timeout(void)
+{
if (rb->global_settings->backlight_timeout > 0)
rb->backlight_set_timeout(0);
#if CONFIG_CHARGING
@@ -61,6 +70,15 @@ void backlight_use_settings(void)
/* Force the backlight on */
void remote_backlight_force_on(void)
{
+ rb->remote_backlight_set_timeout(0);
+#if CONFIG_CHARGING
+ rb->remote_backlight_set_timeout_plugged(0);
+#endif /* CONFIG_CHARGING */
+}
+
+/* Turn off backlight timeout */
+void remote_backlight_ignore_timeout(void)
+{
if (rb->global_settings->remote_backlight_timeout > 0)
rb->remote_backlight_set_timeout(0);
#if CONFIG_CHARGING
@@ -85,6 +103,12 @@ void remote_backlight_use_settings(void)
/* Force the buttonlight on */
void buttonlight_force_on(void)
{
+ rb->buttonlight_set_timeout(0);
+}
+
+/* Turn off backlight timeout */
+void buttonlight_ignore_timeout(void)
+{
if (rb->global_settings->buttonlight_timeout > 0)
rb->buttonlight_set_timeout(0);
}
diff --git a/apps/plugins/lib/helper.h b/apps/plugins/lib/helper.h
index 26baf0f..20f5ee2 100644
--- a/apps/plugins/lib/helper.h
+++ b/apps/plugins/lib/helper.h
@@ -27,14 +27,17 @@
* Backlight on/off operations
*/
void backlight_force_on(void);
+void backlight_ignore_timeout(void);
void backlight_use_settings(void);
#ifdef HAVE_REMOTE_LCD
void remote_backlight_force_on(void);
+void remote_backlight_ignore_timeout(void);
void remote_backlight_use_settings(void);
#endif
#ifdef HAVE_BUTTON_LIGHT
void buttonlight_force_on(void);
+void buttonlight_ignore_timeout(void);
void buttonlight_use_settings(void);
#endif