mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
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:
parent
ff7931ebd4
commit
0f90f0b423
1 changed files with 6 additions and 9 deletions
|
|
@ -42,8 +42,7 @@ bool __dbg_ports(void)
|
|||
|
||||
bool __dbg_hw_info(void)
|
||||
{
|
||||
int line = 0, i, button, oldline;
|
||||
bool done=false;
|
||||
int line = 0, i, oldline;
|
||||
char buf[100];
|
||||
|
||||
lcd_setfont(FONT_SYSFIXED);
|
||||
|
|
@ -54,15 +53,13 @@ bool __dbg_hw_info(void)
|
|||
|
||||
line++;
|
||||
oldline=line;
|
||||
while(!done)
|
||||
|
||||
while (1)
|
||||
{
|
||||
line = oldline;
|
||||
button = button_get(false);
|
||||
|
||||
button &= ~BUTTON_REPEAT;
|
||||
|
||||
if (button == BUTTON_POWER)
|
||||
done=true;
|
||||
|
||||
if (button_get_w_tmo(HZ/20) == (BUTTON_POWER|BUTTON_REL))
|
||||
break;
|
||||
|
||||
snprintf(buf, sizeof(buf), "current tick: %08x Seconds running: %08d",
|
||||
(unsigned int)current_tick, (unsigned int)current_tick/100); lcd_puts(0, line++, buf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue