From 61b9d34c7cefd77e07d2553412e33c36bcae4965 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 20 Jun 2005 17:03:09 +0000 Subject: 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 --- apps/plugin.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/plugin.c') 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 -- cgit v1.1