diff options
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r-- | apps/debug_menu.c | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 6df21ca48f..f3dc368d18 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -531,6 +531,27 @@ bool dbg_hw_info(void) | |||
531 | if(button == SETTINGS_CANCEL) | 531 | if(button == SETTINGS_CANCEL) |
532 | return false; | 532 | return false; |
533 | } | 533 | } |
534 | #elif CONFIG_CPU == PP5020 | ||
535 | char buf[32]; | ||
536 | int button; | ||
537 | |||
538 | lcd_setmargins(0, 0); | ||
539 | lcd_setfont(FONT_SYSFIXED); | ||
540 | lcd_clear_display(); | ||
541 | |||
542 | lcd_puts(0, 0, "[Hardware info]"); | ||
543 | |||
544 | snprintf(buf, sizeof(buf), "HW rev: 0x%08x", ipod_hw_rev); | ||
545 | lcd_puts(0, 1, buf); | ||
546 | |||
547 | lcd_update(); | ||
548 | |||
549 | while(1) | ||
550 | { | ||
551 | button = button_get(true); | ||
552 | if(button == SETTINGS_CANCEL) | ||
553 | return false; | ||
554 | } | ||
534 | #endif /* CONFIG_CPU */ | 555 | #endif /* CONFIG_CPU */ |
535 | return false; | 556 | return false; |
536 | } | 557 | } |
@@ -1025,50 +1046,35 @@ bool dbg_ports(void) | |||
1025 | gpio_a = GPIOA_INPUT_VAL; | 1046 | gpio_a = GPIOA_INPUT_VAL; |
1026 | gpio_b = GPIOB_INPUT_VAL; | 1047 | gpio_b = GPIOB_INPUT_VAL; |
1027 | gpio_c = GPIOC_INPUT_VAL; | 1048 | gpio_c = GPIOC_INPUT_VAL; |
1028 | gpio_d = GPIOD_INPUT_VAL; | 1049 | |
1050 | gpio_g = GPIOG_INPUT_VAL; | ||
1051 | gpio_h = GPIOH_INPUT_VAL; | ||
1052 | gpio_i = GPIOI_INPUT_VAL; | ||
1029 | 1053 | ||
1030 | line = 0; | 1054 | line = 0; |
1031 | snprintf(buf, sizeof(buf), "IPOD version: 0x%08x", ipod_hw_rev); | 1055 | snprintf(buf, sizeof(buf), "GPIO_A: %02x GPIO_G: %02x", gpio_a, gpio_g); |
1032 | lcd_puts(0, line++, buf); | 1056 | lcd_puts(0, line++, buf); |
1033 | snprintf(buf, sizeof(buf), "GPIO_A: %02x", gpio_a); | 1057 | snprintf(buf, sizeof(buf), "GPIO_B: %02x GPIO_H: %02x", gpio_b, gpio_h); |
1034 | lcd_puts(0, line++, buf); | 1058 | lcd_puts(0, line++, buf); |
1035 | snprintf(buf, sizeof(buf), "GPIO_B: %02x", gpio_b); | 1059 | snprintf(buf, sizeof(buf), "GPIO_C: %02x GPIO_I: %02x", gpio_c, gpio_i); |
1036 | lcd_puts(0, line++, buf); | ||
1037 | snprintf(buf, sizeof(buf), "GPIO_C: %02x", gpio_c); | ||
1038 | lcd_puts(0, line++, buf); | ||
1039 | snprintf(buf, sizeof(buf), "GPIO_D: %02x", gpio_d); | ||
1040 | lcd_puts(0, line++, buf); | 1060 | lcd_puts(0, line++, buf); |
1041 | line++; | 1061 | line++; |
1042 | 1062 | ||
1063 | gpio_d = GPIOD_INPUT_VAL; | ||
1043 | gpio_e = GPIOE_INPUT_VAL; | 1064 | gpio_e = GPIOE_INPUT_VAL; |
1044 | gpio_f = GPIOF_INPUT_VAL; | 1065 | gpio_f = GPIOF_INPUT_VAL; |
1045 | gpio_g = GPIOG_INPUT_VAL; | ||
1046 | gpio_h = GPIOH_INPUT_VAL; | ||
1047 | 1066 | ||
1048 | snprintf(buf, sizeof(buf), "GPIO_E: %02x", gpio_e); | ||
1049 | lcd_puts(0, line++, buf); | ||
1050 | snprintf(buf, sizeof(buf), "GPIO_F: %02x", gpio_f); | ||
1051 | lcd_puts(0, line++, buf); | ||
1052 | snprintf(buf, sizeof(buf), "GPIO_G: %02x", gpio_g); | ||
1053 | lcd_puts(0, line++, buf); | ||
1054 | snprintf(buf, sizeof(buf), "GPIO_H: %02x", gpio_h); | ||
1055 | lcd_puts(0, line++, buf); | ||
1056 | line++; | ||
1057 | |||
1058 | gpio_i = GPIOI_INPUT_VAL; | ||
1059 | gpio_j = GPIOJ_INPUT_VAL; | 1067 | gpio_j = GPIOJ_INPUT_VAL; |
1060 | gpio_k = GPIOK_INPUT_VAL; | 1068 | gpio_k = GPIOK_INPUT_VAL; |
1061 | gpio_l = GPIOL_INPUT_VAL; | 1069 | gpio_l = GPIOL_INPUT_VAL; |
1062 | 1070 | ||
1063 | snprintf(buf, sizeof(buf), "GPIO_I: %02x", gpio_i); | 1071 | snprintf(buf, sizeof(buf), "GPIO_D: %02x GPIO_J: %02x", gpio_d, gpio_j); |
1064 | lcd_puts(0, line++, buf); | 1072 | lcd_puts(0, line++, buf); |
1065 | snprintf(buf, sizeof(buf), "GPIO_J: %02x", gpio_j); | 1073 | snprintf(buf, sizeof(buf), "GPIO_E: %02x GPIO_K: %02x", gpio_e, gpio_k); |
1066 | lcd_puts(0, line++, buf); | 1074 | lcd_puts(0, line++, buf); |
1067 | snprintf(buf, sizeof(buf), "GPIO_K: %02x", gpio_k); | 1075 | snprintf(buf, sizeof(buf), "GPIO_F: %02x GPIO_L: %02x", gpio_f, gpio_l); |
1068 | lcd_puts(0, line++, buf); | 1076 | lcd_puts(0, line++, buf); |
1069 | snprintf(buf, sizeof(buf), "GPIO_L: %02x", gpio_l); | 1077 | |
1070 | lcd_puts(0, line++, buf); | ||
1071 | |||
1072 | lcd_update(); | 1078 | lcd_update(); |
1073 | button = button_get_w_tmo(HZ/10); | 1079 | button = button_get_w_tmo(HZ/10); |
1074 | 1080 | ||