diff options
| author | Teruaki Kawashima <teru@rockbox.org> | 2011-01-24 12:29:16 +0000 |
|---|---|---|
| committer | Teruaki Kawashima <teru@rockbox.org> | 2011-01-24 12:29:16 +0000 |
| commit | 01313d5039609c34b2b56ec8ba7a3a6c48ddaf3c (patch) | |
| tree | 3f6e9cf673fac24cc7087b517cdaa0b82ecd463c /apps/plugins/lib | |
| parent | f06f6852733b084a5bd09528322d9ffc6886d2f3 (diff) | |
| download | rockbox-01313d5039609c34b2b56ec8ba7a3a6c48ddaf3c.zip rockbox-01313d5039609c34b2b56ec8ba7a3a6c48ddaf3c.tar.gz rockbox-01313d5039609c34b2b56ec8ba7a3a6c48ddaf3c.tar.bz2 rockbox-01313d5039609c34b2b56ec8ba7a3a6c48ddaf3c.tar.xz | |
* Rename backlight_force_on to backlight_ignore_timeout to make it clear what the function does.
* Add backlight_force_on() which forces to turn on backlight even when the setting is set to Off. use this in lamp.
No functional change except lamp.
See aslo FS#9883.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29128 a1c6a512-1295-4272-9138-f99709370657
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 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 |