forked from len0rd/rockbox
Backlight dimming: Don't unboost the CPU from within the isr.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7310 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
48b6130123
commit
f71d8d3e57
1 changed files with 9 additions and 2 deletions
|
|
@ -44,6 +44,7 @@ const char backlight_timeout_value[19] =
|
||||||
#define BACKLIGHT_OFF 2
|
#define BACKLIGHT_OFF 2
|
||||||
#define REMOTE_BACKLIGHT_ON 3
|
#define REMOTE_BACKLIGHT_ON 3
|
||||||
#define REMOTE_BACKLIGHT_OFF 4
|
#define REMOTE_BACKLIGHT_OFF 4
|
||||||
|
#define BACKLIGHT_UNBOOST_CPU 5
|
||||||
|
|
||||||
static void backlight_thread(void);
|
static void backlight_thread(void);
|
||||||
static long backlight_stack[DEFAULT_STACK_SIZE/sizeof(long)];
|
static long backlight_stack[DEFAULT_STACK_SIZE/sizeof(long)];
|
||||||
|
|
@ -130,7 +131,7 @@ static void backlight_isr(void)
|
||||||
|
|
||||||
if (idle)
|
if (idle)
|
||||||
{
|
{
|
||||||
cpu_boost(false);
|
queue_post(&backlight_queue, BACKLIGHT_UNBOOST_CPU, NULL);
|
||||||
timer_unregister();
|
timer_unregister();
|
||||||
bl_timer_active = false;
|
bl_timer_active = false;
|
||||||
}
|
}
|
||||||
|
|
@ -294,6 +295,12 @@ void backlight_thread(void)
|
||||||
__backlight_off();
|
__backlight_off();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if CONFIG_BACKLIGHT == BL_IRIVER
|
||||||
|
case BACKLIGHT_UNBOOST_CPU:
|
||||||
|
cpu_boost(false);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case SYS_USB_CONNECTED:
|
case SYS_USB_CONNECTED:
|
||||||
/* Tell the USB thread that we are safe */
|
/* Tell the USB thread that we are safe */
|
||||||
DEBUGF("backlight_thread got SYS_USB_CONNECTED\n");
|
DEBUGF("backlight_thread got SYS_USB_CONNECTED\n");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue