diff options
-rw-r--r-- | apps/debug_menu.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 66b4fdbb8d..b036613e3e 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -1001,6 +1001,47 @@ bool dbg_ports(void) | |||
1001 | } | 1001 | } |
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | #elif CONFIG_CPU == PP5020 | ||
1005 | |||
1006 | unsigned int gpio_a, gpio_b, gpio_c, gpio_d; | ||
1007 | |||
1008 | char buf[128]; | ||
1009 | int button; | ||
1010 | int line; | ||
1011 | |||
1012 | lcd_setmargins(0, 0); | ||
1013 | lcd_clear_display(); | ||
1014 | lcd_setfont(FONT_SYSFIXED); | ||
1015 | |||
1016 | while(1) | ||
1017 | { | ||
1018 | gpio_a = GPIOA_INPUT_VAL; | ||
1019 | gpio_b = GPIOB_INPUT_VAL; | ||
1020 | gpio_c = GPIOC_INPUT_VAL; | ||
1021 | gpio_d = GPIOD_INPUT_VAL; | ||
1022 | |||
1023 | line = 0; | ||
1024 | snprintf(buf, sizeof(buf), "IPOD version: 0x%08x", ipod_hw_rev); | ||
1025 | lcd_puts(0, line++, buf); | ||
1026 | snprintf(buf, sizeof(buf), "GPIO_A: %02x", gpio_a); | ||
1027 | lcd_puts(0, line++, buf); | ||
1028 | snprintf(buf, sizeof(buf), "GPIO_B: %02x", gpio_b); | ||
1029 | lcd_puts(0, line++, buf); | ||
1030 | snprintf(buf, sizeof(buf), "GPIO_C: %02x", gpio_c); | ||
1031 | lcd_puts(0, line++, buf); | ||
1032 | snprintf(buf, sizeof(buf), "GPIO_D: %02x", gpio_d); | ||
1033 | lcd_puts(0, line++, buf); | ||
1034 | |||
1035 | lcd_update(); | ||
1036 | button = button_get_w_tmo(HZ/10); | ||
1037 | |||
1038 | switch(button) | ||
1039 | { | ||
1040 | case SETTINGS_CANCEL: | ||
1041 | return false; | ||
1042 | } | ||
1043 | } | ||
1044 | |||
1004 | #endif /* CPU */ | 1045 | #endif /* CPU */ |
1005 | return false; | 1046 | return false; |
1006 | } | 1047 | } |
@@ -1843,6 +1884,8 @@ bool debug_menu(void) | |||
1843 | static const struct menu_item items[] = { | 1884 | static const struct menu_item items[] = { |
1844 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) | 1885 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) |
1845 | { "Dump ROM contents", dbg_save_roms }, | 1886 | { "Dump ROM contents", dbg_save_roms }, |
1887 | #endif | ||
1888 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || (CONFIG_CPU == PP5020) | ||
1846 | { "View I/O ports", dbg_ports }, | 1889 | { "View I/O ports", dbg_ports }, |
1847 | #endif | 1890 | #endif |
1848 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 1891 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |