forked from len0rd/rockbox
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
This commit is contained in:
parent
3e88b58f6c
commit
61b9d34c7c
8 changed files with 245 additions and 228 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue