summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2009-10-29 21:25:51 +0000
committerRob Purchase <shotofadds@rockbox.org>2009-10-29 21:25:51 +0000
commit0f90f0b423674494a648a0bb8fd2cfe31f29b68b (patch)
tree9654e2670d04f4cb3fe25651d2764fbdf5ef42e2
parentff7931ebd43c829330c5985ab1d89e6d5cb5b595 (diff)
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
-rw-r--r--firmware/target/arm/tcc780x/debug-tcc780x.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/firmware/target/arm/tcc780x/debug-tcc780x.c b/firmware/target/arm/tcc780x/debug-tcc780x.c
index 17bb1ff646..ef6415efc4 100644
--- a/firmware/target/arm/tcc780x/debug-tcc780x.c
+++ b/firmware/target/arm/tcc780x/debug-tcc780x.c
@@ -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);