diff options
-rw-r--r-- | firmware/ifp_usb_serial.c | 5 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/tcc77x/debug-tcc77x.c | 19 | ||||
-rw-r--r-- | firmware/target/arm/tcc780x/debug-tcc780x.c | 22 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c | 10 |
5 files changed, 19 insertions, 43 deletions
diff --git a/firmware/ifp_usb_serial.c b/firmware/ifp_usb_serial.c index 530f2c122b..5392de0d52 100644 --- a/firmware/ifp_usb_serial.c +++ b/firmware/ifp_usb_serial.c | |||
@@ -988,10 +988,7 @@ static void serial_restart_output(int ep) | |||
988 | if (blen) | 988 | if (blen) |
989 | { | 989 | { |
990 | #ifdef LCD_DEBUG | 990 | #ifdef LCD_DEBUG |
991 | char s[20]; | 991 | lcd_putsf(0, 2, "o%03lx/%03x", block - serial_out_fifo.buf, blen); |
992 | snprintf(s, sizeof(s), "o%03lx/%03x", block - serial_out_fifo.buf, | ||
993 | blen); | ||
994 | lcd_puts(0, 2, s); | ||
995 | lcd_update(); | 992 | lcd_update(); |
996 | #endif | 993 | #endif |
997 | usb_send_block(block, blen, serial_free_out_fifo, ep); | 994 | usb_send_block(block, blen, serial_free_out_fifo, ep); |
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c index 4b1e1d9ccc..8cd0260fe4 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/ata-meg-fx.c | |||
@@ -95,10 +95,8 @@ void copy_read_sectors(unsigned char* buf, int wordcount) | |||
95 | 95 | ||
96 | //#define GIGABEAT_DEBUG_ATA | 96 | //#define GIGABEAT_DEBUG_ATA |
97 | #ifdef GIGABEAT_DEBUG_ATA | 97 | #ifdef GIGABEAT_DEBUG_ATA |
98 | static int line = 0; | 98 | static unsigned line = 0; |
99 | static char str[256]; | 99 | lcd_putsf(10, line, "ODD DMA to %08x, %d", buf, wordcount); |
100 | snprintf(str, sizeof(str), "ODD DMA to %08x, %d", buf, wordcount); | ||
101 | lcd_puts(10, line, str); | ||
102 | line = (line+1) % 32; | 100 | line = (line+1) % 32; |
103 | lcd_update(); | 101 | lcd_update(); |
104 | #endif | 102 | #endif |
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 | } |
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 | } |
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c index d910eeb3b6..ab5462fa90 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c +++ b/firmware/target/arm/tms320dm320/creative-zvm/pic-creativezvm.c | |||
@@ -255,18 +255,14 @@ void GIO0(void) | |||
255 | break; | 255 | break; |
256 | } | 256 | } |
257 | #ifdef BUTTON_DEBUG | 257 | #ifdef BUTTON_DEBUG |
258 | unsigned char weergvn[10]; | ||
259 | #ifdef BOOTLOADER | 258 | #ifdef BOOTLOADER |
260 | lcd_set_foreground((sw ? LCD_RGBPACK(255,0,0) : LCD_RGBPACK(0,255,0) )); | 259 | lcd_set_foreground((sw ? LCD_RGBPACK(255,0,0) : LCD_RGBPACK(0,255,0) )); |
261 | #endif | 260 | #endif |
262 | snprintf(weergvn, sizeof(char)*10, "%x", | 261 | lcd_putsxyf(LCD_WIDTH-SYSFONT_WIDTH*10, LCD_HEIGHT-SYSFONT_HEIGHT*10, "%x", |
263 | (unsigned int)((msg[3] << 24) | | 262 | (unsigned int)((msg[3] << 24) | |
264 | (msg[2] << 16) | (msg[1] << 8) | msg[0])); | 263 | (msg[2] << 16) | (msg[1] << 8) | msg[0])); |
265 | lcd_putsxy(LCD_WIDTH-SYSFONT_WIDTH*10, LCD_HEIGHT-SYSFONT_HEIGHT*10, | 264 | lcd_putsxy(LCD_WIDTH-SYSFONT_WIDTH*10, LCD_HEIGHT-SYSFONT_HEIGHT*7, "%x", |
266 | weergvn); | 265 | btn); |
267 | snprintf(weergvn, sizeof(char)*10, "%x", btn); | ||
268 | lcd_putsxy(LCD_WIDTH-SYSFONT_WIDTH*10, LCD_HEIGHT-SYSFONT_HEIGHT*7, | ||
269 | weergvn); | ||
270 | #ifdef BOOTLOADER | 266 | #ifdef BOOTLOADER |
271 | lcd_set_foreground(LCD_BLACK); | 267 | lcd_set_foreground(LCD_BLACK); |
272 | #endif | 268 | #endif |