diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-01-27 19:45:00 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-01-27 19:45:00 +0000 |
commit | 78e0e85ffb1fcedff9d2eb24146be1917bbc143d (patch) | |
tree | 482928f54fdd1099aaacf300a51251b1cf7c5a0f /firmware/target/arm/as3525/debug-as3525.c | |
parent | 067ef10c56fda804c803f5a06aa16d5611261d2a (diff) |
Redo some parts of my previous commit, thanks Jens and Dave
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19869 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/debug-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/debug-as3525.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c index 8d7c1468d8..a388f12601 100644 --- a/firmware/target/arm/as3525/debug-as3525.c +++ b/firmware/target/arm/as3525/debug-as3525.c @@ -26,7 +26,7 @@ #include "font.h" #include "system.h" #include "sprintf.h" -#include "string.h" +#include "cpu.h" #define _DEBUG_PRINTF(a,varargs...) \ snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf) @@ -41,35 +41,24 @@ bool __dbg_hw_info(void) bool __dbg_ports(void) { char buf[50]; - int line, i; + int line; lcd_clear_display(); lcd_setfont(FONT_SYSFIXED); - char gpio_data[4] = {0,0,0,0}; while(1) { line = 0; - for (i = 0; i < 8; i++) - { - gpio_data[0] |= GPIOA_PIN(i) & (1<<i); - gpio_data[1] |= GPIOB_PIN(i) & (1<<i); - gpio_data[2] |= GPIOC_PIN(i) & (1<<i); - gpio_data[3] |= GPIOD_PIN(i) & (1<<i); - } - - line++; _DEBUG_PRINTF("[GPIO Values and Directions]"); - _DEBUG_PRINTF("GPIOA: %2x DIR: %2x", gpio_data[0], GPIOA_DIR); - _DEBUG_PRINTF("GPIOB: %2x DIR: %2x", gpio_data[1], GPIOB_DIR); - _DEBUG_PRINTF("GPIOC: %2x DIR: %2x", gpio_data[2], GPIOC_DIR); - _DEBUG_PRINTF("GPIOD: %2x DIR: %2x", gpio_data[3], GPIOD_DIR); - line++; + _DEBUG_PRINTF("GPIOA: %2x DIR: %2x", GPIOA_DATA, GPIOA_DIR); + _DEBUG_PRINTF("GPIOB: %2x DIR: %2x", GPIOB_DATA, GPIOB_DIR); + _DEBUG_PRINTF("GPIOC: %2x DIR: %2x", GPIOC_DATA, GPIOC_DIR); + _DEBUG_PRINTF("GPIOD: %2x DIR: %2x", GPIOD_DATA, GPIOD_DIR); #ifdef TRACK_DBOP_DIN + line++; _DEBUG_PRINTF("[DBOP_DIN]"); _DEBUG_PRINTF("DBOP_DIN: %4x", _dbop_din); #endif - memset(gpio_data, 0, sizeof(gpio_data)); lcd_update(); if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) break; |