1
0
Fork 0
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:
Linus Nielsen Feltzing 2004-07-22 09:09:26 +00:00
parent e4fc3d471c
commit 6c7011415b

View file

@ -74,7 +74,7 @@ void backlight_thread(void)
/* Disable square wave */ /* Disable square wave */
rtc_write(0x0a, rtc_read(0x0a) & ~0x40); rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
#else #else
or_b(0x40, &PADRH); and_b(~0x40, &PAIORH);
#endif #endif
} }
/* else if(backlight_timer) */ /* else if(backlight_timer) */
@ -85,6 +85,7 @@ void backlight_thread(void)
rtc_write(0x0a, rtc_read(0x0a) | 0x40); rtc_write(0x0a, rtc_read(0x0a) | 0x40);
#else #else
and_b(~0x40, &PADRH); and_b(~0x40, &PADRH);
or_b(0x40, &PAIORH);
#endif #endif
} }
break; break;
@ -94,7 +95,7 @@ void backlight_thread(void)
/* Disable square wave */ /* Disable square wave */
rtc_write(0x0a, rtc_read(0x0a) & ~0x40); rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
#else #else
or_b(0x40, &PADRH); and_b(~0x40, &PAIORH);
#endif #endif
break; break;
@ -172,10 +173,5 @@ void backlight_init(void)
create_thread(backlight_thread, backlight_stack, create_thread(backlight_thread, backlight_stack,
sizeof(backlight_stack), backlight_thread_name); sizeof(backlight_stack), backlight_thread_name);
#ifndef HAVE_RTC
or_b(0x40, &PAIORH); /* Set data direction of PA14 */
#endif
backlight_on(); backlight_on();
} }