summaryrefslogtreecommitdiff
path: root/apps/plugin.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-06-20 17:03:09 +0000
committerJens Arnold <amiconn@rockbox.org>2005-06-20 17:03:09 +0000
commit61b9d34c7cefd77e07d2553412e33c36bcae4965 (patch)
tree9c34237200ea7a992b150caec535e2d97b1a13e0 /apps/plugin.c
parent3e88b58f6c68c740e9c1ec9ee0ef85f531269310 (diff)
downloadrockbox-61b9d34c7cefd77e07d2553412e33c36bcae4965.zip
rockbox-61b9d34c7cefd77e07d2553412e33c36bcae4965.tar.gz
rockbox-61b9d34c7cefd77e07d2553412e33c36bcae4965.tar.bz2
rockbox-61b9d34c7cefd77e07d2553412e33c36bcae4965.tar.xz
Iriver: Backlight fading is now configurable. Added a function to stop the backlight from using timer1, freeing it for usage in plugins. Grouped together some related settings functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6779 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.c')
-rw-r--r--apps/plugin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index a44482d..726a518 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -547,6 +547,8 @@ int plugin_register_timer(int cycles, int prio, void (*timer_callback)(void))
if (prescale > 8 || cycles == 0 || prio < 1 || prio > 15)
return 0; /* error, we can't do such period, bad argument */
+
+ backlight_allow_timer(false); /* stop backlight from messing with the timer */
#if CONFIG_CPU == SH7034
and_b(~0x10, &TSTR); /* Stop the timer 4 */
and_b(~0x10, &TSNC); /* No synchronization */
@@ -575,6 +577,7 @@ void plugin_unregister_timer(void)
IPRD = (IPRD & 0xFF0F); /* disable interrupt */
pfn_timer = NULL;
#endif
+ backlight_allow_timer(true);
}
#if CONFIG_CPU == SH7034