diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-28 23:12:11 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-28 23:12:11 +0000 |
commit | bc4b5366cd2863904abae103f0e198dd6952e438 (patch) | |
tree | 45bf8ec407edb1dfea9a7bb00568283f02291e1f /firmware/target/arm/tcc77x/debug-tcc77x.c | |
parent | 71b2d2811b8cd8747f81a2e69e07aaa72a56b1c2 (diff) | |
download | rockbox-bc4b5366cd2863904abae103f0e198dd6952e438.tar.gz rockbox-bc4b5366cd2863904abae103f0e198dd6952e438.zip |
firmware/ : use lcd_putsf() (only in debug code)
ata-meg-fx: use unsigned line number, so % (modulo) is optimized
tcc7*: use proper printf format and remove casting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27935 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tcc77x/debug-tcc77x.c')
-rw-r--r-- | firmware/target/arm/tcc77x/debug-tcc77x.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/firmware/target/arm/tcc77x/debug-tcc77x.c b/firmware/target/arm/tcc77x/debug-tcc77x.c index cf98451329..20d6954b03 100644 --- a/firmware/target/arm/tcc77x/debug-tcc77x.c +++ b/firmware/target/arm/tcc77x/debug-tcc77x.c | |||
@@ -40,7 +40,6 @@ bool __dbg_hw_info(void) | |||
40 | { | 40 | { |
41 | int line = 0, i, button, oldline; | 41 | int line = 0, i, button, oldline; |
42 | bool done=false; | 42 | bool done=false; |
43 | char buf[100]; | ||
44 | 43 | ||
45 | lcd_setfont(FONT_SYSFIXED); | 44 | lcd_setfont(FONT_SYSFIXED); |
46 | lcd_clear_display(); | 45 | lcd_clear_display(); |
@@ -63,21 +62,15 @@ bool __dbg_hw_info(void) | |||
63 | #endif | 62 | #endif |
64 | done=true; | 63 | done=true; |
65 | 64 | ||
66 | snprintf(buf, sizeof(buf), "current tick: %08x Seconds running: %08d", | 65 | lcd_putsf(0, line++, "current tick: %08lx Seconds running: %08ld", |
67 | (unsigned int)current_tick, (unsigned int)current_tick/100); lcd_puts(0, line++, buf); | 66 | current_tick, current_tick/HZ); |
68 | 67 | ||
69 | snprintf(buf, sizeof(buf), "GPIOA: 0x%08x GPIOB: 0x%08x", | 68 | lcd_putsf(0, line++, "GPIOA: 0x%08lx GPIOB: 0x%08lx", GPIOA, GPIOB); |
70 | (unsigned int)GPIOA, (unsigned int)GPIOB); lcd_puts(0, line++, buf); | 69 | lcd_putsf(0, line++, "GPIOC: 0x%08lx GPIOD: 0x%08lx", GPIOC, GPIOD); |
71 | snprintf(buf, sizeof(buf), "GPIOC: 0x%08x GPIOD: 0x%08x", | 70 | lcd_putsf(0, line++, "GPIOE: 0x%08lx", GPIOE); |
72 | (unsigned int)GPIOC, (unsigned int)GPIOD); lcd_puts(0, line++, buf); | ||
73 | snprintf(buf, sizeof(buf), "GPIOE: 0x%08x", | ||
74 | (unsigned int)GPIOE); lcd_puts(0, line++, buf); | ||
75 | 71 | ||
76 | for (i = 0; i<4; i++) | 72 | for (i = 0; i<4; i++) |
77 | { | 73 | lcd_putsf(0, line++, "ADC%d: 0x%04x", i, adc_read(i)); |
78 | snprintf(buf, sizeof(buf), "ADC%d: 0x%04x", i, adc_read(i)); | ||
79 | lcd_puts(0, line++, buf); | ||
80 | } | ||
81 | 74 | ||
82 | lcd_update(); | 75 | lcd_update(); |
83 | } | 76 | } |