summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/helper.c
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2008-05-08 21:23:31 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2008-05-08 21:23:31 +0000
commit21a373388833b8f4f7284cff16d48cab7857de2f (patch)
tree65b423f62c89a66ec7d408121d2be2087a7093fe /apps/plugins/lib/helper.c
parent7835a203473cff4255c1703349fd42ce08b61a46 (diff)
Lamp plugin: accept the reduced patch of FS #8934 by Alexander Papst
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17425 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/helper.c')
-rw-r--r--apps/plugins/lib/helper.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c
index 3af60b5473..8ac822b407 100644
--- a/apps/plugins/lib/helper.c
+++ b/apps/plugins/lib/helper.c
@@ -72,3 +72,22 @@ void remote_backlight_use_settings(struct plugin_api* rb)
#endif /* CONFIG_CHARGING */
}
#endif /* HAVE_REMOTE_LCD */
+
+#ifdef HAVE_BUTTON_LIGHT
+/* Force the buttonlight on */
+void buttonlight_force_on(struct plugin_api* rb)
+{
+ if (!rb)
+ return;
+ if (rb->global_settings->buttonlight_timeout > 0)
+ rb->buttonlight_set_timeout(0);
+}
+
+/* Reset buttonlight operation to its settings */
+void buttonlight_use_settings(struct plugin_api* rb)
+{
+ if (!rb)
+ return;
+ rb->buttonlight_set_timeout(rb->global_settings->buttonlight_timeout);
+}
+#endif /* HAVE_BUTTON_LIGHT */