diff options
-rw-r--r-- | apps/debug_menu.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 806744b404..d71874d3c5 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -1157,6 +1157,33 @@ bool dbg_ports(void) | |||
1157 | return false; | 1157 | return false; |
1158 | } | 1158 | } |
1159 | 1159 | ||
1160 | #elif CONFIG_CPU == PP5002 | ||
1161 | unsigned int gpio_a, gpio_b, gpio_c, gpio_d; | ||
1162 | |||
1163 | char buf[128]; | ||
1164 | int line; | ||
1165 | |||
1166 | lcd_setmargins(0, 0); | ||
1167 | lcd_clear_display(); | ||
1168 | lcd_setfont(FONT_SYSFIXED); | ||
1169 | |||
1170 | while(1) | ||
1171 | { | ||
1172 | gpio_a = GPIOA_INPUT_VAL; | ||
1173 | gpio_b = GPIOB_INPUT_VAL; | ||
1174 | gpio_c = GPIOC_INPUT_VAL; | ||
1175 | gpio_d = GPIOD_INPUT_VAL; | ||
1176 | |||
1177 | line = 0; | ||
1178 | snprintf(buf, sizeof(buf), "GPIO_A: %02x GPIO_B: %02x", gpio_a, gpio_b); | ||
1179 | lcd_puts(0, line++, buf); | ||
1180 | snprintf(buf, sizeof(buf), "GPIO_C: %02x GPIO_D: %02x", gpio_c, gpio_d); | ||
1181 | lcd_puts(0, line++, buf); | ||
1182 | |||
1183 | lcd_update(); | ||
1184 | if (action_userabort(HZ/10)) | ||
1185 | return false; | ||
1186 | } | ||
1160 | #endif /* CPU */ | 1187 | #endif /* CPU */ |
1161 | return false; | 1188 | return false; |
1162 | } | 1189 | } |
@@ -2159,7 +2186,7 @@ bool debug_menu(void) | |||
2159 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) | 2186 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) |
2160 | { "Dump ROM contents", dbg_save_roms }, | 2187 | { "Dump ROM contents", dbg_save_roms }, |
2161 | #endif | 2188 | #endif |
2162 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || (CONFIG_CPU == PP5020) | 2189 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) |
2163 | { "View I/O ports", dbg_ports }, | 2190 | { "View I/O ports", dbg_ports }, |
2164 | #endif | 2191 | #endif |
2165 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 2192 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |