summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2009-10-17 18:02:48 +0000
committerNils Wallménius <nils@rockbox.org>2009-10-17 18:02:48 +0000
commitf34a841b0cc5d1a605375209e1b013b388f741bc (patch)
tree90c780494fa42ffe34e3504d6fe3dc026a91d457 /firmware/target/arm
parent5ca76ab9c4af0759f1bcf75ce24c47ccd38fc962 (diff)
downloadrockbox-f34a841b0cc5d1a605375209e1b013b388f741bc.tar.gz
rockbox-f34a841b0cc5d1a605375209e1b013b388f741bc.zip
Revise r23225 a bit, removing the debug_printf function and implementing more generic lcd_(remote)_putsf function(s) instead and use those in more places
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23233 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/as3525/debug-as3525.c82
-rw-r--r--firmware/target/arm/imx31/debug-imx31.c112
-rw-r--r--firmware/target/arm/s3c2440/debug-s3c2440.c51
-rw-r--r--firmware/target/arm/system-arm.c5
-rwxr-xr-xfirmware/target/arm/tms320dm320/debug-dm320.c69
5 files changed, 135 insertions, 184 deletions
diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c
index 22958c9f22..d8d3e013e2 100644
--- a/firmware/target/arm/as3525/debug-as3525.c
+++ b/firmware/target/arm/as3525/debug-as3525.c
@@ -31,10 +31,6 @@
31#include "ascodec-target.h" 31#include "ascodec-target.h"
32#include "adc.h" 32#include "adc.h"
33 33
34#define _DEBUG_PRINTF(a,varargs...) do { \
35 snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf); \
36 } while(0)
37
38#define ON "Enabled" 34#define ON "Enabled"
39#define OFF "Disabled" 35#define OFF "Disabled"
40 36
@@ -224,7 +220,6 @@ int calc_freq(int clk)
224 220
225bool __dbg_hw_info(void) 221bool __dbg_hw_info(void)
226{ 222{
227 char buf[50];
228 int line; 223 int line;
229 int last_nand = 0; 224 int last_nand = 0;
230#if defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2) 225#if defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2)
@@ -240,16 +235,16 @@ bool __dbg_hw_info(void)
240 { 235 {
241 lcd_clear_display(); 236 lcd_clear_display();
242 line = 0; 237 line = 0;
243 _DEBUG_PRINTF("[Clock Frequencies:]"); 238 lcd_puts(0, line++, "[Clock Frequencies:]");
244 _DEBUG_PRINTF(" SET ACTUAL"); 239 lcd_puts(0, line++, " SET ACTUAL");
245 _DEBUG_PRINTF("922T:%s %3dMHz", 240 lcd_putsf(0, line++, "922T:%s %3dMHz",
246 (!(read_cp15()>>30)) ? "FAST " : 241 (!(read_cp15()>>30)) ? "FAST " :
247 (read_cp15()>>31) ? "ASYNC" : "SYNC ", 242 (read_cp15()>>31) ? "ASYNC" : "SYNC ",
248 calc_freq(CLK_922T)/1000000); 243 calc_freq(CLK_922T)/1000000);
249 _DEBUG_PRINTF("PLLA:%3dMHz %3dMHz", AS3525_PLLA_FREQ/1000000, 244 lcd_putsf(0, line++, "PLLA:%3dMHz %3dMHz", AS3525_PLLA_FREQ/1000000,
250 calc_freq(CLK_PLLA)/1000000); 245 calc_freq(CLK_PLLA)/1000000);
251 _DEBUG_PRINTF("PLLB: %3dMHz", calc_freq(CLK_PLLB)/1000000); 246 lcd_putsf(0, line++, "PLLB: %3dMHz", calc_freq(CLK_PLLB)/1000000);
252 _DEBUG_PRINTF("FCLK: %3dMHz", calc_freq(CLK_FCLK)/1000000); 247 lcd_putsf(0, line++, "FCLK: %3dMHz", calc_freq(CLK_FCLK)/1000000);
253 248
254#if LCD_HEIGHT < 176 /* clip */ 249#if LCD_HEIGHT < 176 /* clip */
255 lcd_update(); 250 lcd_update();
@@ -265,17 +260,17 @@ bool __dbg_hw_info(void)
265 line = 0; 260 line = 0;
266#endif /* LCD_HEIGHT < 176 */ 261#endif /* LCD_HEIGHT < 176 */
267 262
268 _DEBUG_PRINTF("DRAM:%3dMHz %3dMHz", AS3525_PCLK_FREQ/1000000, 263 lcd_putsf(0, line++, "DRAM:%3dMHz %3dMHz", AS3525_PCLK_FREQ/1000000,
269 calc_freq(CLK_EXTMEM)/1000000); 264 calc_freq(CLK_EXTMEM)/1000000);
270 _DEBUG_PRINTF("PCLK:%3dMHz %3dMHz", AS3525_PCLK_FREQ/1000000, 265 lcd_putsf(0, line++, "PCLK:%3dMHz %3dMHz", AS3525_PCLK_FREQ/1000000,
271 calc_freq(CLK_PCLK)/1000000); 266 calc_freq(CLK_PCLK)/1000000);
272 _DEBUG_PRINTF("IDE :%3dMHz %3dMHz", AS3525_IDE_FREQ/1000000, 267 lcd_putsf(0, line++, "IDE :%3dMHz %3dMHz", AS3525_IDE_FREQ/1000000,
273 calc_freq(CLK_IDE)/1000000); 268 calc_freq(CLK_IDE)/1000000);
274 _DEBUG_PRINTF("DBOP:%3dMHz %3dMHz", AS3525_DBOP_FREQ/1000000, 269 lcd_putsf(0, line++, "DBOP:%3dMHz %3dMHz", AS3525_DBOP_FREQ/1000000,
275 calc_freq(CLK_DBOP)/1000000); 270 calc_freq(CLK_DBOP)/1000000);
276 _DEBUG_PRINTF("I2C :%3dkHz %3dkHz", AS3525_I2C_FREQ/1000, 271 lcd_putsf(0, line++, "I2C :%3dkHz %3dkHz", AS3525_I2C_FREQ/1000,
277 calc_freq(CLK_I2C)/1000); 272 calc_freq(CLK_I2C)/1000);
278 _DEBUG_PRINTF("I2SI: %s %3dMHz", (CGU_AUDIO & (1<<23)) ? 273 lcd_putsf(0, line++, "I2SI: %s %3dMHz", (CGU_AUDIO & (1<<23)) ?
279 "on " : "off" , calc_freq(CLK_I2SI)/1000000); 274 "on " : "off" , calc_freq(CLK_I2SI)/1000000);
280 275
281#if LCD_HEIGHT < 176 /* clip */ 276#if LCD_HEIGHT < 176 /* clip */
@@ -292,27 +287,27 @@ bool __dbg_hw_info(void)
292 line = 0; 287 line = 0;
293#endif /* LCD_HEIGHT < 176 */ 288#endif /* LCD_HEIGHT < 176 */
294 289
295 _DEBUG_PRINTF("I2SO: %s %3dMHz", (CGU_AUDIO & (1<<11)) ? 290 lcd_putsf(0, line++, "I2SO: %s %3dMHz", (CGU_AUDIO & (1<<11)) ?
296 "on " : "off", calc_freq(CLK_I2SO)/1000000); 291 "on " : "off", calc_freq(CLK_I2SO)/1000000);
297 if(MCI_NAND) 292 if(MCI_NAND)
298 last_nand = MCI_NAND; 293 last_nand = MCI_NAND;
299 /* MCLK == PCLK */ 294 /* MCLK == PCLK */
300 _DEBUG_PRINTF("SD :%3dMHz %3dMHz", 295 lcd_putsf(0, line++, "SD :%3dMHz %3dMHz",
301 ((last_nand ? (AS3525_PCLK_FREQ/ 1000000): 0) / 296 ((last_nand ? (AS3525_PCLK_FREQ/ 1000000): 0) /
302 ((last_nand & MCI_CLOCK_BYPASS)? 1:(((last_nand & 0xff)+1) * 2))), 297 ((last_nand & MCI_CLOCK_BYPASS)? 1:(((last_nand & 0xff)+1) * 2))),
303 calc_freq(CLK_SD_MCLK_NAND)/1000000); 298 calc_freq(CLK_SD_MCLK_NAND)/1000000);
304#if defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2) 299#if defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2)
305 if(MCI_SD) 300 if(MCI_SD)
306 last_sd = MCI_SD; 301 last_sd = MCI_SD;
307 _DEBUG_PRINTF("uSD :%3dMHz %3dMHz", 302 lcd_putsf(0, line++, "uSD :%3dMHz %3dMHz",
308 ((last_sd ? (AS3525_PCLK_FREQ/ 1000000): 0) / 303 ((last_sd ? (AS3525_PCLK_FREQ/ 1000000): 0) /
309 ((last_sd & MCI_CLOCK_BYPASS) ? 1: (((last_sd & 0xff) + 1) * 2))), 304 ((last_sd & MCI_CLOCK_BYPASS) ? 1: (((last_sd & 0xff) + 1) * 2))),
310 calc_freq(CLK_SD_MCLK_MSD)/1000000); 305 calc_freq(CLK_SD_MCLK_MSD)/1000000);
311#endif 306#endif
312 _DEBUG_PRINTF("USB : %3dMHz", calc_freq(CLK_USB)/1000000); 307 lcd_putsf(0, line++, "USB : %3dMHz", calc_freq(CLK_USB)/1000000);
313 _DEBUG_PRINTF("MMU : %s CVDDP:%4d", (read_cp15() & CP15_MMU) ? 308 lcd_putsf(0, line++, "MMU : %s CVDDP:%4d", (read_cp15() & CP15_MMU) ?
314 " on" : "off", adc_read(ADC_CVDD) * 25); 309 " on" : "off", adc_read(ADC_CVDD) * 25);
315 _DEBUG_PRINTF("Icache:%s Dcache:%s", 310 lcd_putsf(0, line++, "Icache:%s Dcache:%s",
316 (read_cp15() & CP15_IC) ? " on" : "off", 311 (read_cp15() & CP15_IC) ? " on" : "off",
317 (read_cp15() & CP15_DC) ? " on" : "off"); 312 (read_cp15() & CP15_DC) ? " on" : "off");
318 313
@@ -328,12 +323,12 @@ bool __dbg_hw_info(void)
328 lcd_clear_display(); 323 lcd_clear_display();
329 line = 0; 324 line = 0;
330 325
331 _DEBUG_PRINTF("CGU_PLLA :%8x", (unsigned int)(CGU_PLLA)); 326 lcd_putsf(0, line++, "CGU_PLLA :%8x", (unsigned int)(CGU_PLLA));
332 _DEBUG_PRINTF("CGU_PLLB :%8x", (unsigned int)(CGU_PLLB)); 327 lcd_putsf(0, line++, "CGU_PLLB :%8x", (unsigned int)(CGU_PLLB));
333 _DEBUG_PRINTF("CGU_PROC :%8x", (unsigned int)(CGU_PROC)); 328 lcd_putsf(0, line++, "CGU_PROC :%8x", (unsigned int)(CGU_PROC));
334 _DEBUG_PRINTF("CGU_PERI :%8x", (unsigned int)(CGU_PERI)); 329 lcd_putsf(0, line++, "CGU_PERI :%8x", (unsigned int)(CGU_PERI));
335 _DEBUG_PRINTF("CGU_IDE :%8x", (unsigned int)(CGU_IDE)); 330 lcd_putsf(0, line++, "CGU_IDE :%8x", (unsigned int)(CGU_IDE));
336 _DEBUG_PRINTF("CGU_DBOP :%8x", (unsigned int)(CGU_DBOP)); 331 lcd_putsf(0, line++, "CGU_DBOP :%8x", (unsigned int)(CGU_DBOP));
337 332
338#if LCD_HEIGHT < 176 /* clip */ 333#if LCD_HEIGHT < 176 /* clip */
339 lcd_update(); 334 lcd_update();
@@ -349,12 +344,12 @@ bool __dbg_hw_info(void)
349 line = 0; 344 line = 0;
350#endif /* LCD_HEIGHT < 176 */ 345#endif /* LCD_HEIGHT < 176 */
351 346
352 _DEBUG_PRINTF("CGU_AUDIO :%8x", (unsigned int)(CGU_AUDIO)); 347 lcd_putsf(0, line++, "CGU_AUDIO :%8x", (unsigned int)(CGU_AUDIO));
353 _DEBUG_PRINTF("CGU_USB :%8x", (unsigned int)(CGU_USB)); 348 lcd_putsf(0, line++, "CGU_USB :%8x", (unsigned int)(CGU_USB));
354 _DEBUG_PRINTF("I2C2_CPSR :%8x", (unsigned int)(I2C2_CPSR1<<8 | 349 lcd_putsf(0, line++, "I2C2_CPSR :%8x", (unsigned int)(I2C2_CPSR1<<8 |
355 I2C2_CPSR0)); 350 I2C2_CPSR0));
356 _DEBUG_PRINTF("MCI_NAND :%8x", (unsigned int)(MCI_NAND)); 351 lcd_putsf(0, line++, "MCI_NAND :%8x", (unsigned int)(MCI_NAND));
357 _DEBUG_PRINTF("MCI_SD :%8x", (unsigned int)(MCI_SD)); 352 lcd_putsf(0, line++, "MCI_SD :%8x", (unsigned int)(MCI_SD));
358 353
359 lcd_update(); 354 lcd_update();
360 int btn = button_get_w_tmo(HZ/10); 355 int btn = button_get_w_tmo(HZ/10);
@@ -372,7 +367,6 @@ end:
372 367
373bool __dbg_ports(void) 368bool __dbg_ports(void)
374{ 369{
375 char buf[50];
376 int line; 370 int line;
377 371
378 lcd_clear_display(); 372 lcd_clear_display();
@@ -381,19 +375,19 @@ bool __dbg_ports(void)
381 while(1) 375 while(1)
382 { 376 {
383 line = 0; 377 line = 0;
384 _DEBUG_PRINTF("[GPIO Values and Directions]"); 378 lcd_puts(0, line++, "[GPIO Values and Directions]");
385 _DEBUG_PRINTF("GPIOA: %2x DIR: %2x", GPIOA_DATA, GPIOA_DIR); 379 lcd_putsf(0, line++, "GPIOA: %2x DIR: %2x", GPIOA_DATA, GPIOA_DIR);
386 _DEBUG_PRINTF("GPIOB: %2x DIR: %2x", GPIOB_DATA, GPIOB_DIR); 380 lcd_putsf(0, line++, "GPIOB: %2x DIR: %2x", GPIOB_DATA, GPIOB_DIR);
387 _DEBUG_PRINTF("GPIOC: %2x DIR: %2x", GPIOC_DATA, GPIOC_DIR); 381 lcd_putsf(0, line++, "GPIOC: %2x DIR: %2x", GPIOC_DATA, GPIOC_DIR);
388 _DEBUG_PRINTF("GPIOD: %2x DIR: %2x", GPIOD_DATA, GPIOD_DIR); 382 lcd_putsf(0, line++, "GPIOD: %2x DIR: %2x", GPIOD_DATA, GPIOD_DIR);
389#ifdef DEBUG_DBOP 383#ifdef DEBUG_DBOP
390 line++; 384 line++;
391 _DEBUG_PRINTF("[DBOP_DIN]"); 385 lcd_puts(0, line++, "[DBOP_DIN]");
392 _DEBUG_PRINTF("DBOP_DIN: %4x", button_dbop_data()); 386 lcd_putsf(0, line++, "DBOP_DIN: %4x", button_dbop_data());
393#endif 387#endif
394 line++; 388 line++;
395 _DEBUG_PRINTF("[CP15]"); 389 lcd_puts(0, line++, "[CP15]");
396 _DEBUG_PRINTF("CP15: 0x%8x", read_cp15()); 390 lcd_putsf(0, line++, "CP15: 0x%8x", read_cp15());
397 lcd_update(); 391 lcd_update();
398 if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) 392 if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
399 break; 393 break;
diff --git a/firmware/target/arm/imx31/debug-imx31.c b/firmware/target/arm/imx31/debug-imx31.c
index cc1e200c11..dc3c293495 100644
--- a/firmware/target/arm/imx31/debug-imx31.c
+++ b/firmware/target/arm/imx31/debug-imx31.c
@@ -32,7 +32,6 @@
32 32
33bool __dbg_hw_info(void) 33bool __dbg_hw_info(void)
34{ 34{
35 char buf[50];
36 int line; 35 int line;
37 unsigned int pllref; 36 unsigned int pllref;
38 unsigned int mcu_pllfreq, ser_pllfreq, usb_pllfreq; 37 unsigned int mcu_pllfreq, ser_pllfreq, usb_pllfreq;
@@ -46,9 +45,8 @@ bool __dbg_hw_info(void)
46 while (1) 45 while (1)
47 { 46 {
48 line = 0; 47 line = 0;
49 snprintf(buf, sizeof (buf), "Sys Rev Code: 0x%02X", 48 lcd_putsf(0, line++, "Sys Rev Code: 0x%02X", iim_system_rev());
50 iim_system_rev()); 49 line++;
51 lcd_puts(0, line++, buf); line++;
52 50
53 mpctl = CCM_MPCTL; 51 mpctl = CCM_MPCTL;
54 spctl = CCM_SPCTL; 52 spctl = CCM_SPCTL;
@@ -60,69 +58,55 @@ bool __dbg_hw_info(void)
60 ser_pllfreq = ccm_get_pll(PLL_SERIAL); 58 ser_pllfreq = ccm_get_pll(PLL_SERIAL);
61 usb_pllfreq = ccm_get_pll(PLL_USB); 59 usb_pllfreq = ccm_get_pll(PLL_USB);
62 60
63 snprintf(buf, sizeof (buf), "pll_ref_clk: %u", pllref); 61 lcd_putsf(0, line++, "pll_ref_clk: %u", pllref);
64 lcd_puts(0, line++, buf); line++; 62 line++;
65 63
66 /* MCU clock domain */ 64 /* MCU clock domain */
67 snprintf(buf, sizeof (buf), "MPCTL: %08lX", mpctl); 65 lcd_putsf(0, line++, "MPCTL: %08lX", mpctl);
68 lcd_puts(0, line++, buf);
69 66
70 snprintf(buf, sizeof (buf), " mpl_dpdgck_clk: %u", mcu_pllfreq); 67 lcd_putsf(0, line++, " mpl_dpdgck_clk: %u", mcu_pllfreq);
71 lcd_puts(0, line++, buf); line++; 68 line++;
72 69
73 regval = CCM_PDR0; 70 regval = CCM_PDR0;
74 snprintf(buf, sizeof (buf), " PDR0: %08lX", regval); 71 lcd_putsf(0, line++, " PDR0: %08lX", regval);
75 lcd_puts(0, line++, buf);
76 72
77 freq = mcu_pllfreq / (((regval & 0x7) + 1)); 73 freq = mcu_pllfreq / (((regval & 0x7) + 1));
78 snprintf(buf, sizeof (buf), " mcu_clk: %u", freq); 74 lcd_putsf(0, line++, " mcu_clk: %u", freq);
79 lcd_puts(0, line++, buf);
80 75
81 freq = mcu_pllfreq / (((regval >> 11) & 0x7) + 1); 76 freq = mcu_pllfreq / (((regval >> 11) & 0x7) + 1);
82 snprintf(buf, sizeof (buf), " hsp_clk: %u", freq); 77 lcd_putsf(0, line++, " hsp_clk: %u", freq);
83 lcd_puts(0, line++, buf);
84 78
85 freq = mcu_pllfreq / (((regval >> 3) & 0x7) + 1); 79 freq = mcu_pllfreq / (((regval >> 3) & 0x7) + 1);
86 snprintf(buf, sizeof (buf), " hclk_clk: %u", freq); 80 lcd_putsf(0, line++, " hclk_clk: %u", freq);
87 lcd_puts(0, line++, buf);
88 81
89 snprintf(buf, sizeof (buf), " ipg_clk: %u", 82 lcd_putsf(0, line++, " ipg_clk: %u",
90 freq / (unsigned)(((regval >> 6) & 0x3) + 1)); 83 freq / (unsigned)(((regval >> 6) & 0x3) + 1));
91 lcd_puts(0, line++, buf);
92 84
93 snprintf(buf, sizeof (buf), " nfc_clk: %u", 85 lcd_putsf(0, line++, " nfc_clk: %u",
94 freq / (unsigned)(((regval >> 8) & 0x7) + 1)); 86 freq / (unsigned)(((regval >> 8) & 0x7) + 1));
95 lcd_puts(0, line++, buf);
96 87
97 line++; 88 line++;
98 89
99 /* Serial clock domain */ 90 /* Serial clock domain */
100 snprintf(buf, sizeof (buf), "SPCTL: %08lX", spctl); 91 lcd_putsf(0, line++, "SPCTL: %08lX", spctl);
101 lcd_puts(0, line++, buf); 92 lcd_putsf(0, line++, " spl_dpdgck_clk: %u", ser_pllfreq);
102 snprintf(buf, sizeof (buf), " spl_dpdgck_clk: %u", ser_pllfreq);
103 lcd_puts(0, line++, buf);
104 93
105 line++; 94 line++;
106 95
107 /* USB clock domain */ 96 /* USB clock domain */
108 snprintf(buf, sizeof (buf), "UPCTL: %08lX", upctl); 97 lcd_putsf(0, line++, "UPCTL: %08lX", upctl);
109 lcd_puts(0, line++, buf);
110 98
111 snprintf(buf, sizeof (buf), " upl_dpdgck_clk: %u", usb_pllfreq); 99 lcd_putsf(0, line++, " upl_dpdgck_clk: %u", usb_pllfreq);
112 lcd_puts(0, line++, buf); line++;
113 100
114 regval = CCM_PDR1; 101 regval = CCM_PDR1;
115 snprintf(buf, sizeof (buf), " PDR1: %08lX", regval); 102 lcd_putsf(0, line++, " PDR1: %08lX", regval);
116 lcd_puts(0, line++, buf);
117 103
118 freq = usb_pllfreq / 104 freq = usb_pllfreq /
119 ((((regval >> 30) & 0x3) + 1) * (((regval >> 27) & 0x7) + 1)); 105 ((((regval >> 30) & 0x3) + 1) * (((regval >> 27) & 0x7) + 1));
120 snprintf(buf, sizeof (buf), " usb_clk: %u", freq); 106 lcd_putsf(0, line++, " usb_clk: %u", freq);
121 lcd_puts(0, line++, buf);
122 107
123 freq = usb_pllfreq / (((CCM_PDR0 >> 16) & 0x1f) + 1); 108 freq = usb_pllfreq / (((CCM_PDR0 >> 16) & 0x1f) + 1);
124 snprintf(buf, sizeof (buf), " ipg_per_baud: %u", freq); 109 lcd_putsf(0, line++, " ipg_per_baud: %u", freq);
125 lcd_puts(0, line++, buf);
126 110
127 lcd_update(); 111 lcd_update();
128 112
@@ -133,7 +117,6 @@ bool __dbg_hw_info(void)
133 117
134bool __dbg_ports(void) 118bool __dbg_ports(void)
135{ 119{
136 char buf[50];
137 int line; 120 int line;
138 int i; 121 int i;
139 122
@@ -171,71 +154,62 @@ bool __dbg_ports(void)
171 while(1) 154 while(1)
172 { 155 {
173 line = 0; 156 line = 0;
174 snprintf(buf, sizeof(buf), "[Ports and Registers]"); 157 lcd_puts(0, line++, "[Ports and Registers]");
175 lcd_puts(0, line++, buf); line++; 158 line++;
176 159
177 /* GPIO1 */ 160 /* GPIO1 */
178 snprintf(buf, sizeof(buf), "GPIO1: DR: %08lx GDIR: %08lx", GPIO1_DR, GPIO1_GDIR); 161 lcd_putsf(0, line++, "GPIO1: DR: %08lx GDIR: %08lx", GPIO1_DR, GPIO1_GDIR);
179 lcd_puts(0, line++, buf);
180 162
181 snprintf(buf, sizeof(buf), " PSR: %08lx ICR1: %08lx", GPIO1_PSR, GPIO1_ICR1); 163 lcd_putsf(0, line++, " PSR: %08lx ICR1: %08lx", GPIO1_PSR, GPIO1_ICR1);
182 lcd_puts(0, line++, buf);
183 164
184 snprintf(buf, sizeof(buf), " ICR2: %08lx IMR: %08lx", GPIO1_ICR2, GPIO1_IMR); 165 lcd_putsf(0, line++, " ICR2: %08lx IMR: %08lx", GPIO1_ICR2, GPIO1_IMR);
185 lcd_puts(0, line++, buf);
186 166
187 snprintf(buf, sizeof(buf), " ISR: %08lx", GPIO1_ISR); 167 lcd_putsf(0, line++, " ISR: %08lx", GPIO1_ISR);
188 lcd_puts(0, line++, buf); line++; 168 line++;
189 169
190 /* GPIO2 */ 170 /* GPIO2 */
191 snprintf(buf, sizeof(buf), "GPIO2: DR: %08lx GDIR: %08lx", GPIO2_DR, GPIO2_GDIR); 171 lcd_putsf(0, line++, "GPIO2: DR: %08lx GDIR: %08lx", GPIO2_DR, GPIO2_GDIR);
192 lcd_puts(0, line++, buf);
193 172
194 snprintf(buf, sizeof(buf), " PSR: %08lx ICR1: %08lx", GPIO2_PSR, GPIO2_ICR1); 173 lcd_putsf(0, line++, " PSR: %08lx ICR1: %08lx", GPIO2_PSR, GPIO2_ICR1);
195 lcd_puts(0, line++, buf);
196 174
197 snprintf(buf, sizeof(buf), " ICR2: %08lx IMR: %08lx", GPIO2_ICR2, GPIO2_IMR); 175 lcd_putsf(0, line++, " ICR2: %08lx IMR: %08lx", GPIO2_ICR2, GPIO2_IMR);
198 lcd_puts(0, line++, buf);
199 176
200 snprintf(buf, sizeof(buf), " ISR: %08lx", GPIO2_ISR); 177 lcd_putsf(0, line++, " ISR: %08lx", GPIO2_ISR);
201 lcd_puts(0, line++, buf); line++; 178 line++;
202 179
203 /* GPIO3 */ 180 /* GPIO3 */
204 snprintf(buf, sizeof(buf), "GPIO3: DR: %08lx GDIR: %08lx", GPIO3_DR, GPIO3_GDIR); 181 lcd_putsf(0, line++, "GPIO3: DR: %08lx GDIR: %08lx", GPIO3_DR, GPIO3_GDIR);
205 lcd_puts(0, line++, buf);
206 182
207 snprintf(buf, sizeof(buf), " PSR: %08lx ICR1: %08lx", GPIO3_PSR, GPIO3_ICR1); 183 lcd_putsf(0, line++, " PSR: %08lx ICR1: %08lx", GPIO3_PSR, GPIO3_ICR1);
208 lcd_puts(0, line++, buf);
209 184
210 snprintf(buf, sizeof(buf), " ICR2: %08lx IMR: %08lx", GPIO3_ICR2, GPIO3_IMR); 185 lcd_putsf(0, line++, " ICR2: %08lx IMR: %08lx", GPIO3_ICR2, GPIO3_IMR);
211 lcd_puts(0, line++, buf);
212 186
213 snprintf(buf, sizeof(buf), " ISR: %08lx", GPIO3_ISR); 187 lcd_putsf(0, line++, " ISR: %08lx", GPIO3_ISR);
214 lcd_puts(0, line++, buf); line++; 188 line++;
215 189
216 lcd_puts(0, line++, "PMIC Registers"); line++; 190 lcd_puts(0, line++, "PMIC Registers");
191 line++;
217 192
218 mc13783_read_regset(pmic_regset, pmic_regs, ARRAYLEN(pmic_regs)); 193 mc13783_read_regset(pmic_regset, pmic_regs, ARRAYLEN(pmic_regs));
219 194
220 for (i = 0; i < (int)ARRAYLEN(pmic_regs); i++) 195 for (i = 0; i < (int)ARRAYLEN(pmic_regs); i++)
221 { 196 {
222 snprintf(buf, sizeof(buf), "%s: %08lx", pmic_regnames[i], pmic_regs[i]); 197 lcd_putsf(0, line++, "%s: %08lx", pmic_regnames[i], pmic_regs[i]);
223 lcd_puts(0, line++, buf);
224 } 198 }
225 199
226 line++; 200 line++;
227 201
228 lcd_puts(0, line++, "ADC"); line++; 202 lcd_puts(0, line++, "ADC");
203 line++;
229 204
230 for (i = 0; i < NUM_ADC_CHANNELS; i += 4) 205 for (i = 0; i < NUM_ADC_CHANNELS; i += 4)
231 { 206 {
232 snprintf(buf, sizeof(buf), 207 lcd_putsf(0, line++,
233 "CH%02d:%04u CH%02d:%04u CH%02d:%04u CH%02d:%04u", 208 "CH%02d:%04u CH%02d:%04u CH%02d:%04u CH%02d:%04u",
234 i+0, adc_read(i+0), 209 i+0, adc_read(i+0),
235 i+1, adc_read(i+1), 210 i+1, adc_read(i+1),
236 i+2, adc_read(i+2), 211 i+2, adc_read(i+2),
237 i+3, adc_read(i+3)); 212 i+3, adc_read(i+3));
238 lcd_puts(0, line++, buf);
239 } 213 }
240 214
241 lcd_update(); 215 lcd_update();
diff --git a/firmware/target/arm/s3c2440/debug-s3c2440.c b/firmware/target/arm/s3c2440/debug-s3c2440.c
index 6c01f8bc1a..df3fa3c026 100644
--- a/firmware/target/arm/s3c2440/debug-s3c2440.c
+++ b/firmware/target/arm/s3c2440/debug-s3c2440.c
@@ -46,40 +46,39 @@ bool __dbg_ports(void)
46 while(1) 46 while(1)
47 { 47 {
48 line = 0; 48 line = 0;
49 snprintf(buf, sizeof(buf), "[Ports and Registers]"); 49 lcd_puts(0, line++, "[Ports and Registers]");
50 lcd_puts(0, line++, buf);
51 50
52 snprintf(buf, sizeof(buf), "GPACON: %08lx GPBCON: %08lx", GPACON, GPBCON); lcd_puts(0, line++, buf); 51 lcd_putsf(0, line++, "GPACON: %08lx GPBCON: %08lx", GPACON, GPBCON);
53 snprintf(buf, sizeof(buf), "GPADAT: %08lx GPBDAT: %08lx", GPADAT, GPBDAT); lcd_puts(0, line++, buf); 52 lcd_putsf(0, line++, "GPADAT: %08lx GPBDAT: %08lx", GPADAT, GPBDAT);
54 snprintf(buf, sizeof(buf), "GPAUP: %08lx GPBUP: %08lx", 0ul, GPBUP); lcd_puts(0, line++, buf); 53 lcd_putsf(0, line++, "GPAUP: %08lx GPBUP: %08lx", 0ul, GPBUP);
55 snprintf(buf, sizeof(buf), "GPCCON: %08lx GPDCON: %08lx", GPCCON, GPDCON); lcd_puts(0, line++, buf); 54 lcd_putsf(0, line++, "GPCCON: %08lx GPDCON: %08lx", GPCCON, GPDCON);
56 snprintf(buf, sizeof(buf), "GPCDAT: %08lx GPDDAT: %08lx", GPCDAT, GPDDAT); lcd_puts(0, line++, buf); 55 lcd_putsf(0, line++, "GPCDAT: %08lx GPDDAT: %08lx", GPCDAT, GPDDAT);
57 snprintf(buf, sizeof(buf), "GPCUP: %08lx GPDUP: %08lx", GPCUP, GPDUP); lcd_puts(0, line++, buf); 56 lcd_putsf(0, line++, "GPCUP: %08lx GPDUP: %08lx", GPCUP, GPDUP)
58 57
59 snprintf(buf, sizeof(buf), "GPCCON: %08lx GPDCON: %08lx", GPCCON, GPDCON); lcd_puts(0, line++, buf); 58 lcd_putsf(0, line++, "GPCCON: %08lx GPDCON: %08lx", GPCCON, GPDCON);
60 snprintf(buf, sizeof(buf), "GPCDAT: %08lx GPDDAT: %08lx", GPCDAT, GPDDAT); lcd_puts(0, line++, buf); 59 lcd_putsf(0, line++, "GPCDAT: %08lx GPDDAT: %08lx", GPCDAT, GPDDAT);
61 snprintf(buf, sizeof(buf), "GPCUP: %08lx GPDUP: %08lx", GPCUP, GPDUP); lcd_puts(0, line++, buf); 60 lcd_putsf(0, line++, "GPCUP: %08lx GPDUP: %08lx", GPCUP, GPDUP);
62 61
63 snprintf(buf, sizeof(buf), "GPECON: %08lx GPFCON: %08lx", GPECON, GPFCON); lcd_puts(0, line++, buf); 62 lcd_putsf(0, line++, "GPECON: %08lx GPFCON: %08lx", GPECON, GPFCON);
64 snprintf(buf, sizeof(buf), "GPEDAT: %08lx GPFDAT: %08lx", GPEDAT, GPFDAT); lcd_puts(0, line++, buf); 63 lcd_putsf(0, line++, "GPEDAT: %08lx GPFDAT: %08lx", GPEDAT, GPFDAT);
65 snprintf(buf, sizeof(buf), "GPEUP: %08lx GPFUP: %08lx", GPEUP, GPFUP); lcd_puts(0, line++, buf); 64 lcd_putsf(0, line++, "GPEUP: %08lx GPFUP: %08lx", GPEUP, GPFUP);
66 65
67 snprintf(buf, sizeof(buf), "GPGCON: %08lx GPHCON: %08lx", GPGCON, GPHCON); lcd_puts(0, line++, buf); 66 lcd_putsf(0, line++, "GPGCON: %08lx GPHCON: %08lx", GPGCON, GPHCON);
68 snprintf(buf, sizeof(buf), "GPGDAT: %08lx GPHDAT: %08lx", GPGDAT, GPHDAT); lcd_puts(0, line++, buf); 67 lcd_putsf(0, line++, "GPGDAT: %08lx GPHDAT: %08lx", GPGDAT, GPHDAT);
69 snprintf(buf, sizeof(buf), "GPGUP: %08lx GPHUP: %08lx", GPGUP, GPHUP); lcd_puts(0, line++, buf); 68 lcd_putsf(0, line++, "GPGUP: %08lx GPHUP: %08lx", GPGUP, GPHUP);
70 69
71 snprintf(buf, sizeof(buf), "GPJCON: %08lx", GPJCON); lcd_puts(0, line++, buf); 70 lcd_putsf(0, line++, "GPJCON: %08lx", GPJCON);
72 snprintf(buf, sizeof(buf), "GPJDAT: %08lx", GPJDAT); lcd_puts(0, line++, buf); 71 lcd_putsf(0, line++, "GPJDAT: %08lx", GPJDAT);
73 snprintf(buf, sizeof(buf), "GPJUP: %08lx", GPJUP); lcd_puts(0, line++, buf); 72 lcd_putsf(0, line++, "GPJUP: %08lx", GPJUP);
74 73
75 line++; 74 line++;
76 75
77 snprintf(buf, sizeof(buf), "SRCPND: %08lx INTMOD: %08lx", SRCPND, INTMOD); lcd_puts(0, line++, buf); 76 lcd_putsf(0, line++, "SRCPND: %08lx INTMOD: %08lx", SRCPND, INTMOD);
78 snprintf(buf, sizeof(buf), "INTMSK: %08lx INTPND: %08lx", INTMSK, INTPND); lcd_puts(0, line++, buf); 77 lcd_putsf(0, line++, "INTMSK: %08lx INTPND: %08lx", INTMSK, INTPND);
79 snprintf(buf, sizeof(buf), "CLKCON: %08lx CLKSLOW: %08lx", CLKCON, CLKSLOW); lcd_puts(0, line++, buf); 78 lcd_putsf(0, line++, "CLKCON: %08lx CLKSLOW: %08lx", CLKCON, CLKSLOW);
80 snprintf(buf, sizeof(buf), "MPLLCON: %08lx UPLLCON: %08lx", MPLLCON, UPLLCON); lcd_puts(0, line++, buf); 79 lcd_putsf(0, line++, "MPLLCON: %08lx UPLLCON: %08lx", MPLLCON, UPLLCON);
81 snprintf(buf, sizeof(buf), "CLKDIVN: %08lx CAMDIVN: %08lx", CLKDIVN, CAMDIVN); lcd_puts(0, line++, buf); 80 lcd_putsf(0, line++, "CLKDIVN: %08lx CAMDIVN: %08lx", CLKDIVN, CAMDIVN);
82 snprintf(buf, sizeof(buf), "BWSCON: %08lx TCONSEL: %08lx", BWSCON, TCONSEL); lcd_puts(0, line++, buf); 81 lcd_putsf(0, line++, "BWSCON: %08lx TCONSEL: %08lx", BWSCON, TCONSEL);
83 82
84 lcd_update(); 83 lcd_update();
85 if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) 84 if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
diff --git a/firmware/target/arm/system-arm.c b/firmware/target/arm/system-arm.c
index 5c5a18c867..920dbacd10 100644
--- a/firmware/target/arm/system-arm.c
+++ b/firmware/target/arm/system-arm.c
@@ -36,16 +36,13 @@ static const char* const uiename[] = {
36 */ 36 */
37void __attribute__((noreturn)) UIE(unsigned int pc, unsigned int num) 37void __attribute__((noreturn)) UIE(unsigned int pc, unsigned int num)
38{ 38{
39 char str[32];
40
41 lcd_clear_display(); 39 lcd_clear_display();
42#ifdef HAVE_LCD_BITMAP 40#ifdef HAVE_LCD_BITMAP
43 lcd_setfont(FONT_SYSFIXED); 41 lcd_setfont(FONT_SYSFIXED);
44#endif 42#endif
45 lcd_puts(0, 0, uiename[num]); 43 lcd_puts(0, 0, uiename[num]);
46 snprintf(str, sizeof(str), "at %08x" IF_COP(" (%d)"), pc 44 lcd_putsf(0, 1, "at %08x" IF_COP(" (%d)"), pc
47 IF_COP(, CURRENT_CORE)); 45 IF_COP(, CURRENT_CORE));
48 lcd_puts(0, 1, str);
49 lcd_update(); 46 lcd_update();
50 47
51 disable_interrupt(IRQ_FIQ_STATUS); 48 disable_interrupt(IRQ_FIQ_STATUS);
diff --git a/firmware/target/arm/tms320dm320/debug-dm320.c b/firmware/target/arm/tms320dm320/debug-dm320.c
index 53acd3f655..d4d478a007 100755
--- a/firmware/target/arm/tms320dm320/debug-dm320.c
+++ b/firmware/target/arm/tms320dm320/debug-dm320.c
@@ -48,7 +48,6 @@ bool __dbg_hw_info(void)
48 int *address=0x0; 48 int *address=0x0;
49#endif 49#endif
50 bool done=false; 50 bool done=false;
51 char buf[100];
52 51
53 lcd_setfont(FONT_SYSFIXED); 52 lcd_setfont(FONT_SYSFIXED);
54 lcd_clear_display(); 53 lcd_clear_display();
@@ -58,38 +57,27 @@ bool __dbg_hw_info(void)
58 57
59 lcd_puts(0, line++, "Clock info:"); 58 lcd_puts(0, line++, "Clock info:");
60#if LCD_WIDTH > 320 59#if LCD_WIDTH > 320
61 snprintf(buf, sizeof(buf), "IO_CLK_PLLA: 0x%04x IO_CLK_PLLB: 0x%04x IO_CLK_SEL0: 0x%04x IO_CLK_SEL1: 0x%04x", 60 lcd_putsf(0, line++, "IO_CLK_PLLA: 0x%04x IO_CLK_PLLB: 0x%04x IO_CLK_SEL0: 0x%04x IO_CLK_SEL1: 0x%04x",
62 IO_CLK_PLLA, IO_CLK_PLLB, IO_CLK_SEL0, IO_CLK_SEL1); lcd_puts(0, line++, buf); 61 IO_CLK_PLLA, IO_CLK_PLLB, IO_CLK_SEL0, IO_CLK_SEL1);
63 snprintf(buf, sizeof(buf), "IO_CLK_SEL2: 0x%04x IO_CLK_DIV0: 0x%04x IO_CLK_DIV1: 0x%04x IO_CLK_DIV2: 0x%04x", 62 lcd_putsf(0, line++, "IO_CLK_SEL2: 0x%04x IO_CLK_DIV0: 0x%04x IO_CLK_DIV1: 0x%04x IO_CLK_DIV2: 0x%04x",
64 IO_CLK_SEL2, IO_CLK_DIV0, IO_CLK_DIV1, IO_CLK_DIV2); lcd_puts(0, line++, buf); 63 IO_CLK_SEL2, IO_CLK_DIV0, IO_CLK_DIV1, IO_CLK_DIV2);
65 snprintf(buf, sizeof(buf), "IO_CLK_DIV3: 0x%04x IO_CLK_DIV4: 0x%04x IO_CLK_BYP : 0x%04x IO_CLK_INV : 0x%04x", 64 lcd_putsf(0, line++, "IO_CLK_DIV3: 0x%04x IO_CLK_DIV4: 0x%04x IO_CLK_BYP : 0x%04x IO_CLK_INV : 0x%04x",
66 IO_CLK_DIV3, IO_CLK_DIV4, IO_CLK_BYP, IO_CLK_INV); lcd_puts(0, line++, buf); 65 IO_CLK_DIV3, IO_CLK_DIV4, IO_CLK_BYP, IO_CLK_INV);
67 snprintf(buf, sizeof(buf), "IO_CLK_MOD0: 0x%04x IO_CLK_MOD1: 0x%04x IO_CLK_MOD2: 0x%04x IO_CLK_LPCTL0: 0x%04x", 66 lcd_putsf(0, line++, "IO_CLK_MOD0: 0x%04x IO_CLK_MOD1: 0x%04x IO_CLK_MOD2: 0x%04x IO_CLK_LPCTL0: 0x%04x",
68 IO_CLK_MOD0, IO_CLK_MOD1, IO_CLK_MOD2, IO_CLK_LPCTL0); lcd_puts(0, line++, buf); 67 IO_CLK_MOD0, IO_CLK_MOD1, IO_CLK_MOD2, IO_CLK_LPCTL0);
69#else 68#else
70 snprintf(buf, sizeof(buf), " IO_CLK_PLLA: 0x%04x IO_CLK_PLLB: 0x%04x", IO_CLK_PLLA, IO_CLK_PLLB); 69 lcd_putsf(0, line++, " IO_CLK_PLLA: 0x%04x IO_CLK_PLLB: 0x%04x", IO_CLK_PLLA, IO_CLK_PLLB);
71 lcd_puts(0, line++, buf); 70 lcd_putsf(0, line++, " IO_CLK_SEL0: 0x%04x IO_CLK_SEL1: 0x%04x", IO_CLK_SEL0, IO_CLK_SEL1);
72 snprintf(buf, sizeof(buf), " IO_CLK_SEL0: 0x%04x IO_CLK_SEL1: 0x%04x", IO_CLK_SEL0, IO_CLK_SEL1); 71 lcd_putsf(0, line++, " IO_CLK_SEL2: 0x%04x IO_CLK_DIV0: 0x%04x", IO_CLK_SEL2, IO_CLK_DIV0);
73 lcd_puts(0, line++, buf); 72 lcd_putsf(0, line++, " IO_CLK_DIV1: 0x%04x IO_CLK_DIV2: 0x%04x", IO_CLK_DIV1, IO_CLK_DIV2);
74 snprintf(buf, sizeof(buf), " IO_CLK_SEL2: 0x%04x IO_CLK_DIV0: 0x%04x", IO_CLK_SEL2, IO_CLK_DIV0); 73 lcd_putsf(0, line++, " IO_CLK_DIV3: 0x%04x IO_CLK_DIV4: 0x%04x", IO_CLK_DIV3, IO_CLK_DIV4);
75 lcd_puts(0, line++, buf); 74 lcd_putsf(0, line++, " IO_CLK_BYP : 0x%04x IO_CLK_INV : 0x%04x", IO_CLK_BYP, IO_CLK_INV);
76 snprintf(buf, sizeof(buf), " IO_CLK_DIV1: 0x%04x IO_CLK_DIV2: 0x%04x", IO_CLK_DIV1, IO_CLK_DIV2); 75 lcd_putsf(0, line++, " IO_CLK_MOD0: 0x%04x IO_CLK_MOD1: 0x%04x ", IO_CLK_MOD0, IO_CLK_MOD1);
77 lcd_puts(0, line++, buf); 76 lcd_putsf(0, line++, " IO_CLK_MOD2: 0x%04x IO_CLK_LPCTL0: 0x%04x ", IO_CLK_MOD2, IO_CLK_LPCTL0);
78 snprintf(buf, sizeof(buf), " IO_CLK_DIV3: 0x%04x IO_CLK_DIV4: 0x%04x", IO_CLK_DIV3, IO_CLK_DIV4);
79 lcd_puts(0, line++, buf);
80 snprintf(buf, sizeof(buf), " IO_CLK_BYP : 0x%04x IO_CLK_INV : 0x%04x", IO_CLK_BYP, IO_CLK_INV);
81 lcd_puts(0, line++, buf);
82 snprintf(buf, sizeof(buf), " IO_CLK_MOD0: 0x%04x IO_CLK_MOD1: 0x%04x ", IO_CLK_MOD0, IO_CLK_MOD1);
83 lcd_puts(0, line++, buf);
84 snprintf(buf, sizeof(buf), " IO_CLK_MOD2: 0x%04x IO_CLK_LPCTL0: 0x%04x ", IO_CLK_MOD2, IO_CLK_LPCTL0);
85 lcd_puts(0, line++, buf);
86 lcd_puts(0, line++, "Interrupt info:"); 77 lcd_puts(0, line++, "Interrupt info:");
87 snprintf(buf, sizeof(buf), " IO_INTC_EINT0: 0x%04x IO_INTC_EINT1: 0x%04x ", IO_INTC_EINT0, IO_INTC_EINT1); 78 lcd_putsf(0, line++, " IO_INTC_EINT0: 0x%04x IO_INTC_EINT1: 0x%04x ", IO_INTC_EINT0, IO_INTC_EINT1);
88 lcd_puts(0, line++, buf); 79 lcd_putsf(0, line++, " IO_INTC_EINT2: 0x%04x IO_INTC_IRQ0: 0x%04x ", IO_INTC_EINT2, IO_INTC_IRQ0);
89 snprintf(buf, sizeof(buf), " IO_INTC_EINT2: 0x%04x IO_INTC_IRQ0: 0x%04x ", IO_INTC_EINT2, IO_INTC_IRQ0); 80 lcd_putsf(0, line++, " IO_INTC_IRQ1: 0x%04x IO_INTC_IRQ2: 0x%04x ", IO_INTC_IRQ1, IO_INTC_IRQ2);
90 lcd_puts(0, line++, buf);
91 snprintf(buf, sizeof(buf), " IO_INTC_IRQ1: 0x%04x IO_INTC_IRQ2: 0x%04x ", IO_INTC_IRQ1, IO_INTC_IRQ2);
92 lcd_puts(0, line++, buf);
93#endif 81#endif
94 82
95 lcd_puts(0, line++, "Board revision:"); 83 lcd_puts(0, line++, "Board revision:");
@@ -134,20 +122,19 @@ bool __dbg_hw_info(void)
134 lcd_set_direct_fb(true); 122 lcd_set_direct_fb(true);
135 123
136 lcd_puts(0, line++, "LCD info:"); 124 lcd_puts(0, line++, "LCD info:");
137 snprintf(buf, sizeof(buf), " LCD direct FB access? %s", (lcd_get_direct_fb() ? "yes" : "no")); 125 lcd_putsf(0, line++, " LCD direct FB access? %s", (lcd_get_direct_fb() ? "yes" : "no"));
138 lcd_puts(0, line++, buf);
139 line++; 126 line++;
140#endif 127#endif
141 lcd_puts(0, line++, "[Rockbox info]"); 128 lcd_puts(0, line++, "[Rockbox info]");
142 snprintf(buf, sizeof(buf), "current tick: %08x Seconds running: %08d", 129 lcd_putsf(0, line++, "current tick: %08x Seconds running: %08d",
143 (unsigned int)current_tick, (unsigned int)current_tick/100); lcd_puts(0, line++, buf); 130 (unsigned int)current_tick, (unsigned int)current_tick/100);
144#ifndef CREATIVE_ZVx 131#ifndef CREATIVE_ZVx
145 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", 132 lcd_putsf(0, line++, "Address: 0x%08x Data: 0x%08x",
146 (unsigned int)address, *address); lcd_puts(0, line++, buf); 133 (unsigned int)address, *address);
147 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", 134 lcd_putsf(0, line++, "Address: 0x%08x Data: 0x%08x",
148 (unsigned int)(address+1), *(address+1)); lcd_puts(0, line++, buf); 135 (unsigned int)(address+1), *(address+1));
149 snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", 136 lcd_putsf(0, line++, "Address: 0x%08x Data: 0x%08x",
150 (unsigned int)(address+2), *(address+2)); lcd_puts(0, line++, buf); 137 (unsigned int)(address+2), *(address+2));
151#endif 138#endif
152 139
153 lcd_update(); 140 lcd_update();