forked from len0rd/rockbox
It turns out that the backlight port pin on the player can be set to an input (and pulled up externally) to shut off the backlight. That may save us a few picoamps :-)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4918 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e4fc3d471c
commit
6c7011415b
1 changed files with 3 additions and 7 deletions
|
|
@ -74,7 +74,7 @@ void backlight_thread(void)
|
|||
/* Disable square wave */
|
||||
rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
|
||||
#else
|
||||
or_b(0x40, &PADRH);
|
||||
and_b(~0x40, &PAIORH);
|
||||
#endif
|
||||
}
|
||||
/* else if(backlight_timer) */
|
||||
|
|
@ -85,6 +85,7 @@ void backlight_thread(void)
|
|||
rtc_write(0x0a, rtc_read(0x0a) | 0x40);
|
||||
#else
|
||||
and_b(~0x40, &PADRH);
|
||||
or_b(0x40, &PAIORH);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
|
@ -94,7 +95,7 @@ void backlight_thread(void)
|
|||
/* Disable square wave */
|
||||
rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
|
||||
#else
|
||||
or_b(0x40, &PADRH);
|
||||
and_b(~0x40, &PAIORH);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
|
@ -172,10 +173,5 @@ void backlight_init(void)
|
|||
create_thread(backlight_thread, backlight_stack,
|
||||
sizeof(backlight_stack), backlight_thread_name);
|
||||
|
||||
#ifndef HAVE_RTC
|
||||
|
||||
or_b(0x40, &PAIORH); /* Set data direction of PA14 */
|
||||
#endif
|
||||
|
||||
backlight_on();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue