diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-05-07 22:56:44 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-05-07 22:56:44 +0000 |
commit | 1d085333775768f3f6a45c67187b9cae514e1e32 (patch) | |
tree | 1e4f14caed7775d5ab6fb9950f8c7bab72a294aa /apps/debug_menu.c | |
parent | 106f7738a0a8c888e5e9fa39ca7c8c79a1b337fe (diff) |
Ipod: Move the HW revision to 'View HW info' where it belongs, and make both the HW revision and port debug work on mini (didn't fit the LCD).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9887 a1c6a512-1295-4272-9138-f99709370657
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) if(button == SETTINGS_CANCEL) return false; } +#elif CONFIG_CPU == PP5020 + char buf[32]; + int button; + + lcd_setmargins(0, 0); + lcd_setfont(FONT_SYSFIXED); + lcd_clear_display(); + + lcd_puts(0, 0, "[Hardware info]"); + + snprintf(buf, sizeof(buf), "HW rev: 0x%08x", ipod_hw_rev); + lcd_puts(0, 1, buf); + + lcd_update(); + + while(1) + { + button = button_get(true); + if(button == SETTINGS_CANCEL) + return false; + } #endif /* CONFIG_CPU */ return false; } @@ -1025,50 +1046,35 @@ bool dbg_ports(void) gpio_a = GPIOA_INPUT_VAL; gpio_b = GPIOB_INPUT_VAL; gpio_c = GPIOC_INPUT_VAL; - gpio_d = GPIOD_INPUT_VAL; + + gpio_g = GPIOG_INPUT_VAL; + gpio_h = GPIOH_INPUT_VAL; + gpio_i = GPIOI_INPUT_VAL; line = 0; - snprintf(buf, sizeof(buf), "IPOD version: 0x%08x", ipod_hw_rev); + snprintf(buf, sizeof(buf), "GPIO_A: %02x GPIO_G: %02x", gpio_a, gpio_g); lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "GPIO_A: %02x", gpio_a); + snprintf(buf, sizeof(buf), "GPIO_B: %02x GPIO_H: %02x", gpio_b, gpio_h); lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "GPIO_B: %02x", gpio_b); - lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "GPIO_C: %02x", gpio_c); - lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "GPIO_D: %02x", gpio_d); + snprintf(buf, sizeof(buf), "GPIO_C: %02x GPIO_I: %02x", gpio_c, gpio_i); lcd_puts(0, line++, buf); line++; + gpio_d = GPIOD_INPUT_VAL; gpio_e = GPIOE_INPUT_VAL; gpio_f = GPIOF_INPUT_VAL; - gpio_g = GPIOG_INPUT_VAL; - gpio_h = GPIOH_INPUT_VAL; - snprintf(buf, sizeof(buf), "GPIO_E: %02x", gpio_e); - lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "GPIO_F: %02x", gpio_f); - lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "GPIO_G: %02x", gpio_g); - lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "GPIO_H: %02x", gpio_h); - lcd_puts(0, line++, buf); - line++; - - gpio_i = GPIOI_INPUT_VAL; gpio_j = GPIOJ_INPUT_VAL; gpio_k = GPIOK_INPUT_VAL; gpio_l = GPIOL_INPUT_VAL; - snprintf(buf, sizeof(buf), "GPIO_I: %02x", gpio_i); + snprintf(buf, sizeof(buf), "GPIO_D: %02x GPIO_J: %02x", gpio_d, gpio_j); lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "GPIO_J: %02x", gpio_j); + snprintf(buf, sizeof(buf), "GPIO_E: %02x GPIO_K: %02x", gpio_e, gpio_k); lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "GPIO_K: %02x", gpio_k); + snprintf(buf, sizeof(buf), "GPIO_F: %02x GPIO_L: %02x", gpio_f, gpio_l); lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "GPIO_L: %02x", gpio_l); - lcd_puts(0, line++, buf); - + lcd_update(); button = button_get_w_tmo(HZ/10); |