summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2003-05-20 21:30:53 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2003-05-20 21:30:53 +0000
commit09d1a73d35ffab5eea3773fb90e9d08f0e3a6a66 (patch)
tree11295e3575287deda28dabbb804a9b6854af5382 /apps/debug_menu.c
parent1fb579c1feebea0a288060236638310beb2a0281 (diff)
Flash info now also for Player
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3690 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 188e7ec7bb..7fa7103210 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -298,12 +298,19 @@ bool dbg_hw_info(void)
int usb_polarity;
int bitmask = *(unsigned short*)0x20000fc;
int rom_version = *(unsigned short*)0x20000fe;
+ unsigned manu, id; /* flash IDs */
+ bool got_id; /* flag if we managed to get the flash IDs */
if(PADR & 0x400)
usb_polarity = 0; /* Negative */
else
usb_polarity = 1; /* Positive */
+ /* get flash ROM type */
+ got_id = dbg_flash_id(&manu, &id, 0x5555, 0x2AAA); /* try SST, Atmel, NexFlash */
+ if (!got_id)
+ got_id = dbg_flash_id(&manu, &id, 0x555, 0x2AA); /* try AMD, Macronix */
+
lcd_clear_display();
lcd_puts(0, 0, "[HW Info]");
@@ -325,6 +332,12 @@ bool dbg_hw_info(void)
case 3:
snprintf(buf, 32, "Mask: %04x", bitmask);
break;
+ case 4:
+ if (got_id)
+ snprintf(buf, 32, "Flash:%02x,%02x", manu, id);
+ else
+ snprintf(buf, 32, "Flash:??,??"); /* unknown, sorry */
+ break;
}
lcd_puts(0, 1, buf);
@@ -340,12 +353,12 @@ bool dbg_hw_info(void)
case BUTTON_LEFT:
currval--;
if(currval < 0)
- currval = 3;
+ currval = 4;
break;
case BUTTON_RIGHT:
currval++;
- if(currval > 3)
+ if(currval > 4)
currval = 0;
break;
}