summaryrefslogtreecommitdiff
path: root/apps/plugins/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/helper.c56
-rw-r--r--apps/plugins/lib/helper.h4
2 files changed, 41 insertions, 19 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c
index 0151a36..2feff14 100644
--- a/apps/plugins/lib/helper.c
+++ b/apps/plugins/lib/helper.c
@@ -19,37 +19,55 @@
#include "plugin.h"
-/*
- * force the backlight on
- * now enabled regardless of HAVE_BACKLIGHT because it is not needed to
- * build and makes modded targets easier to update
- */
+/* Force the backlight on */
void backlight_force_on(struct plugin_api* rb)
{
- if(!rb) return;
-/* #ifdef HAVE_BACKLIGHT */
+ if(!rb)
+ return;
if (rb->global_settings->backlight_timeout > 0)
rb->backlight_set_timeout(0);
#if CONFIG_CHARGING
if (rb->global_settings->backlight_timeout_plugged > 0)
rb->backlight_set_timeout_plugged(0);
#endif /* CONFIG_CHARGING */
-/* #endif */ /* HAVE_BACKLIGHT */
-}
+}
-/*
- * reset backlight operation to its settings
- * now enabled regardless of HAVE_BACKLIGHT because it is not needed to
- * build and makes modded targets easier to update
- */
+/* Reset backlight operation to its settings */
void backlight_use_settings(struct plugin_api* rb)
{
- if(!rb) return;
-/* #ifdef HAVE_BACKLIGHT */
+ if (!rb)
+ return;
rb->backlight_set_timeout(rb->global_settings->backlight_timeout);
#if CONFIG_CHARGING
- rb->backlight_set_timeout_plugged(rb->global_settings-> \
- backlight_timeout_plugged);
+ rb->backlight_set_timeout_plugged(rb->global_settings->
+ backlight_timeout_plugged);
+#endif /* CONFIG_CHARGING */
+}
+
+#ifdef HAVE_REMOTE_LCD
+/* Force the backlight on */
+void remote_backlight_force_on(struct plugin_api* rb)
+{
+ if (!rb)
+ return;
+ if (rb->global_settings->remote_backlight_timeout > 0)
+ rb->remote_backlight_set_timeout(0);
+#if CONFIG_CHARGING
+ if (rb->global_settings->remote_backlight_timeout_plugged > 0)
+ rb->remote_backlight_set_timeout_plugged(0);
+#endif /* CONFIG_CHARGING */
+}
+
+/* Reset backlight operation to its settings */
+void remote_backlight_use_settings(struct plugin_api* rb)
+{
+ if (!rb)
+ return;
+ rb->remote_backlight_set_timeout(rb->global_settings->
+ remote_backlight_timeout);
+#if CONFIG_CHARGING
+ rb->remote_backlight_set_timeout_plugged(rb->global_settings->
+ remote_backlight_timeout_plugged);
#endif /* CONFIG_CHARGING */
-/* #endif */ /* HAVE_BACKLIGHT */
}
+#endif /* HAVE_REMOTE_LCD */
diff --git a/apps/plugins/lib/helper.h b/apps/plugins/lib/helper.h
index f2f5f87..744ad4d 100644
--- a/apps/plugins/lib/helper.h
+++ b/apps/plugins/lib/helper.h
@@ -26,5 +26,9 @@
*/
void backlight_force_on(struct plugin_api* rb);
void backlight_use_settings(struct plugin_api* rb);
+#ifdef HAVE_REMOTE_LCD
+void remote_backlight_force_on(struct plugin_api* rb);
+void remote_backlight_use_settings(struct plugin_api* rb);
+#endif
#endif