summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2008-02-17 17:58:56 +0000
committerChristian Gmeiner <christian.gmeiner@gmail.com>2008-02-17 17:58:56 +0000
commita999556e849884cbcfdf932d88eb738fcb614a91 (patch)
treea1e8ca5a0783fa73c229a8d11ee273fe4961c405 /apps
parentd085ead3ba6f437ab9be3167d820509f49e36e31 (diff)
downloadrockbox-a999556e849884cbcfdf932d88eb738fcb614a91.tar.gz
rockbox-a999556e849884cbcfdf932d88eb738fcb614a91.zip
revert my work, suggested by amiconn
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16328 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c68
1 files changed, 67 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 1cedaf2b9b..b3df043609 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -92,7 +92,7 @@
92#include "pcf50605.h" 92#include "pcf50605.h"
93#endif 93#endif
94 94
95#if CONFIG_CPU == DM320 || CONFIG_CPU == S3C2440 || CONFIG_CPU == TCC7801 || defined(CPU_PP) 95#if CONFIG_CPU == DM320 || CONFIG_CPU == S3C2440 || CONFIG_CPU == TCC7801
96#include "debug-target.h" 96#include "debug-target.h"
97#endif 97#endif
98 98
@@ -562,6 +562,72 @@ static bool dbg_hw_info(void)
562 lcd_update(); 562 lcd_update();
563 563
564 while (!(action_userabort(TIMEOUT_BLOCK))); 564 while (!(action_userabort(TIMEOUT_BLOCK)));
565
566#elif defined(CPU_PP502x)
567 int line = 0;
568 char buf[32];
569 char pp_version[] = { (PP_VER2 >> 24) & 0xff, (PP_VER2 >> 16) & 0xff,
570 (PP_VER2 >> 8) & 0xff, (PP_VER2) & 0xff,
571 (PP_VER1 >> 24) & 0xff, (PP_VER1 >> 16) & 0xff,
572 (PP_VER1 >> 8) & 0xff, (PP_VER1) & 0xff, '\0' };
573
574 lcd_setmargins(0, 0);
575 lcd_setfont(FONT_SYSFIXED);
576 lcd_clear_display();
577
578 lcd_puts(0, line++, "[Hardware info]");
579
580#ifdef IPOD_ARCH
581 snprintf(buf, sizeof(buf), "HW rev: 0x%08lx", IPOD_HW_REVISION);
582 lcd_puts(0, line++, buf);
583#endif
584
585#ifdef IPOD_COLOR
586 extern int lcd_type; /* Defined in lcd-colornano.c */
587
588 snprintf(buf, sizeof(buf), "LCD type: %d", lcd_type);
589 lcd_puts(0, line++, buf);
590#endif
591
592 snprintf(buf, sizeof(buf), "PP version: %s", pp_version);
593 lcd_puts(0, line++, buf);
594
595 snprintf(buf, sizeof(buf), "Est. clock (kHz): %d", perfcheck());
596 lcd_puts(0, line++, buf);
597
598 lcd_update();
599
600 while (!(action_userabort(TIMEOUT_BLOCK)));
601
602#elif CONFIG_CPU == PP5002
603 int line = 0;
604 char buf[32];
605 char pp_version[] = { (PP_VER4 >> 8) & 0xff, PP_VER4 & 0xff,
606 (PP_VER3 >> 8) & 0xff, PP_VER3 & 0xff,
607 (PP_VER2 >> 8) & 0xff, PP_VER2 & 0xff,
608 (PP_VER1 >> 8) & 0xff, PP_VER1 & 0xff, '\0' };
609
610
611 lcd_setmargins(0, 0);
612 lcd_setfont(FONT_SYSFIXED);
613 lcd_clear_display();
614
615 lcd_puts(0, line++, "[Hardware info]");
616
617#ifdef IPOD_ARCH
618 snprintf(buf, sizeof(buf), "HW rev: 0x%08lx", IPOD_HW_REVISION);
619 lcd_puts(0, line++, buf);
620#endif
621
622 snprintf(buf, sizeof(buf), "PP version: %s", pp_version);
623 lcd_puts(0, line++, buf);
624
625 snprintf(buf, sizeof(buf), "Est. clock (kHz): %d", perfcheck());
626 lcd_puts(0, line++, buf);
627
628 lcd_update();
629
630 while (!(action_userabort(TIMEOUT_BLOCK)));
565#else 631#else
566 /* Define this function in your target tree */ 632 /* Define this function in your target tree */
567 return __dbg_hw_info(); 633 return __dbg_hw_info();