summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib/helper.c')
-rw-r--r--apps/plugins/lib/helper.c26
1 files changed, 25 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);
}