diff options
| author | Karl Kurbjun <kkurbjun@gmail.com> | 2007-04-21 04:48:20 +0000 |
|---|---|---|
| committer | Karl Kurbjun <kkurbjun@gmail.com> | 2007-04-21 04:48:20 +0000 |
| commit | 8a1fd8c686d2a4b8be36754e545338a476150e6a (patch) | |
| tree | f69fd8be012099a8de228bd197346e4b11cf8e4a /apps/debug_menu.c | |
| parent | dd0f1c7db1e73859805f9d9aa343bb6e04dd739e (diff) | |
| download | rockbox-8a1fd8c686d2a4b8be36754e545338a476150e6a.zip rockbox-8a1fd8c686d2a4b8be36754e545338a476150e6a.tar.gz rockbox-8a1fd8c686d2a4b8be36754e545338a476150e6a.tar.bz2 rockbox-8a1fd8c686d2a4b8be36754e545338a476150e6a.tar.xz | |
Commit FS#6929 - Gigabeat bootloader improvements by Barry Wardell and myself. This build fixes the problems seen with the latest builds on the Gigabeat X. Added View IO Ports under the Debug menu for the Gigabeat. Make sure you grab the latest bootloader from the Wiki as the old bootloader will not work properly with new builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13225 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
| -rw-r--r-- | apps/debug_menu.c | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 12d5f43..9f827e7 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -88,6 +88,10 @@ #endif #include "hwcompat.h" +#if CONFIG_CPU == S3C2440 +#include "s3c2440.h" +#endif + #ifndef SIMULATOR static bool dbg_list(char *title, int count, int selection_size, int (*action_callback)(int btn, struct gui_synclist *lists), @@ -1133,6 +1137,43 @@ bool dbg_ports(void) if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) return false; } +#elif CONFIG_CPU == S3C2440 + char buf[128]; + int line, fd; + + lcd_setmargins(0, 0); + lcd_clear_display(); + lcd_setfont(FONT_SYSFIXED); + + while(1) + { + line = 0; + snprintf(buf, sizeof(buf), "GPACON: %08x GPBCON: %08x", GPACON, GPBCON); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPADAT: %08x GPBDAT: %08x", GPADAT, GPBDAT); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPAUP: %08x GPBUP: %08x", 0, GPBUP); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPCCON: %08x GPDCON: %08x", GPCCON, GPDCON); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPCDAT: %08x GPDDAT: %08x", GPCDAT, GPDDAT); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPCUP: %08x GPDUP: %08x", GPCUP, GPDUP); lcd_puts(0, line++, buf); + + snprintf(buf, sizeof(buf), "GPCCON: %08x GPDCON: %08x", GPCCON, GPDCON); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPCDAT: %08x GPDDAT: %08x", GPCDAT, GPDDAT); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPCUP: %08x GPDUP: %08x", GPCUP, GPDUP); lcd_puts(0, line++, buf); + + snprintf(buf, sizeof(buf), "GPECON: %08x GPFCON: %08x", GPECON, GPFCON); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPEDAT: %08x GPFDAT: %08x", GPEDAT, GPFDAT); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPEUP: %08x GPFUP: %08x", GPEUP, GPFUP); lcd_puts(0, line++, buf); + + snprintf(buf, sizeof(buf), "GPGCON: %08x GPHCON: %08x", GPGCON, GPHCON); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPGDAT: %08x GPHDAT: %08x", GPGDAT, GPHDAT); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPGUP: %08x GPHUP: %08x", GPGUP, GPHUP); lcd_puts(0, line++, buf); + + snprintf(buf, sizeof(buf), "GPJCON: %08x", GPJCON); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPJDAT: %08x", GPJDAT); lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "GPJUP: %08x", GPJUP); lcd_puts(0, line++, buf); + lcd_update(); + if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) + return false; + } #endif /* CPU */ return false; } @@ -2271,7 +2312,7 @@ bool debug_menu(void) (defined(CPU_PP) && !defined(SANSA_E200)) { "Dump ROM contents", dbg_save_roms }, #endif -#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) +#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) || CONFIG_CPU == S3C2440 { "View I/O ports", dbg_ports }, #endif #ifdef HAVE_ADJUSTABLE_CPU_FREQ |