diff options
Diffstat (limited to 'firmware/target/arm/tcc780x')
-rw-r--r-- | firmware/target/arm/tcc780x/debug-tcc780x.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/firmware/target/arm/tcc780x/debug-tcc780x.c b/firmware/target/arm/tcc780x/debug-tcc780x.c index 3afc5fafab..9267307e05 100644 --- a/firmware/target/arm/tcc780x/debug-tcc780x.c +++ b/firmware/target/arm/tcc780x/debug-tcc780x.c | |||
@@ -43,7 +43,6 @@ bool __dbg_ports(void) | |||
43 | bool __dbg_hw_info(void) | 43 | bool __dbg_hw_info(void) |
44 | { | 44 | { |
45 | int line = 0, i, oldline; | 45 | int line = 0, i, oldline; |
46 | char buf[100]; | ||
47 | 46 | ||
48 | lcd_setfont(FONT_SYSFIXED); | 47 | lcd_setfont(FONT_SYSFIXED); |
49 | lcd_clear_display(); | 48 | lcd_clear_display(); |
@@ -61,24 +60,17 @@ bool __dbg_hw_info(void) | |||
61 | if (button_get_w_tmo(HZ/20) == (BUTTON_POWER|BUTTON_REL)) | 60 | if (button_get_w_tmo(HZ/20) == (BUTTON_POWER|BUTTON_REL)) |
62 | break; | 61 | break; |
63 | 62 | ||
64 | snprintf(buf, sizeof(buf), "current tick: %08x Seconds running: %08d", | 63 | lcd_putsf(0, line++, "current tick: %08lx Seconds running: %08ld", |
65 | (unsigned int)current_tick, (unsigned int)current_tick/100); lcd_puts(0, line++, buf); | 64 | current_tick, current_tick/HZ); |
66 | 65 | ||
67 | snprintf(buf, sizeof(buf), "GPIOA: 0x%08x GPIOB: 0x%08x", | 66 | lcd_putsf(0, line++, "GPIOA: 0x%08lx GPIOB: 0x%08lx", GPIOA, GPIOB); |
68 | (unsigned int)GPIOA, (unsigned int)GPIOB); lcd_puts(0, line++, buf); | 67 | lcd_putsf(0, line++, "GPIOC: 0x%08lx GPIOD: 0x%08lx", GPIOC, GPIOD); |
69 | snprintf(buf, sizeof(buf), "GPIOC: 0x%08x GPIOD: 0x%08x", | 68 | lcd_putsf(0, line++, "GPIOE: 0x%08lx", GPIOE); |
70 | (unsigned int)GPIOC, (unsigned int)GPIOD); lcd_puts(0, line++, buf); | ||
71 | snprintf(buf, sizeof(buf), "GPIOE: 0x%08x", | ||
72 | (unsigned int)GPIOE); lcd_puts(0, line++, buf); | ||
73 | 69 | ||
74 | for (i = 0; i<4; i++) | 70 | for (i = 0; i<4; i++) |
75 | { | 71 | lcd_putsf(0, line++, "ADC%d: 0x%04x", i, adc_read(i)); |
76 | snprintf(buf, sizeof(buf), "ADC%d: 0x%04x", i, adc_read(i)); | ||
77 | lcd_puts(0, line++, buf); | ||
78 | } | ||
79 | 72 | ||
80 | snprintf(buf, sizeof(buf), "STS: 0x%08x SRC: 0x%08x", | 73 | lcd_putsf(0, line++, "STS: 0x%08lx SRC: 0x%08lx", STS, SRC); |
81 | (unsigned int)STS, (unsigned int)SRC); lcd_puts(0, line++, buf); | ||
82 | 74 | ||
83 | lcd_update(); | 75 | lcd_update(); |
84 | } | 76 | } |