Make the TCC78x HW debug screen yield by including a button wait timeout.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23409 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rob Purchase 2009-10-29 21:25:51 +00:00
parent ff7931ebd4
commit 0f90f0b423

View file

@ -42,8 +42,7 @@ bool __dbg_ports(void)
bool __dbg_hw_info(void) bool __dbg_hw_info(void)
{ {
int line = 0, i, button, oldline; int line = 0, i, oldline;
bool done=false;
char buf[100]; char buf[100];
lcd_setfont(FONT_SYSFIXED); lcd_setfont(FONT_SYSFIXED);
@ -54,15 +53,13 @@ bool __dbg_hw_info(void)
line++; line++;
oldline=line; oldline=line;
while(!done)
while (1)
{ {
line = oldline; line = oldline;
button = button_get(false);
if (button_get_w_tmo(HZ/20) == (BUTTON_POWER|BUTTON_REL))
button &= ~BUTTON_REPEAT; break;
if (button == BUTTON_POWER)
done=true;
snprintf(buf, sizeof(buf), "current tick: %08x Seconds running: %08d", snprintf(buf, sizeof(buf), "current tick: %08x Seconds running: %08d",
(unsigned int)current_tick, (unsigned int)current_tick/100); lcd_puts(0, line++, buf); (unsigned int)current_tick, (unsigned int)current_tick/100); lcd_puts(0, line++, buf);