diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2003-05-20 21:30:53 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2003-05-20 21:30:53 +0000 |
commit | 09d1a73d35ffab5eea3773fb90e9d08f0e3a6a66 (patch) | |
tree | 11295e3575287deda28dabbb804a9b6854af5382 /apps | |
parent | 1fb579c1feebea0a288060236638310beb2a0281 (diff) | |
download | rockbox-09d1a73d35ffab5eea3773fb90e9d08f0e3a6a66.tar.gz rockbox-09d1a73d35ffab5eea3773fb90e9d08f0e3a6a66.zip |
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')
-rw-r--r-- | apps/debug_menu.c | 17 |
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) | |||
298 | int usb_polarity; | 298 | int usb_polarity; |
299 | int bitmask = *(unsigned short*)0x20000fc; | 299 | int bitmask = *(unsigned short*)0x20000fc; |
300 | int rom_version = *(unsigned short*)0x20000fe; | 300 | int rom_version = *(unsigned short*)0x20000fe; |
301 | unsigned manu, id; /* flash IDs */ | ||
302 | bool got_id; /* flag if we managed to get the flash IDs */ | ||
301 | 303 | ||
302 | if(PADR & 0x400) | 304 | if(PADR & 0x400) |
303 | usb_polarity = 0; /* Negative */ | 305 | usb_polarity = 0; /* Negative */ |
304 | else | 306 | else |
305 | usb_polarity = 1; /* Positive */ | 307 | usb_polarity = 1; /* Positive */ |
306 | 308 | ||
309 | /* get flash ROM type */ | ||
310 | got_id = dbg_flash_id(&manu, &id, 0x5555, 0x2AAA); /* try SST, Atmel, NexFlash */ | ||
311 | if (!got_id) | ||
312 | got_id = dbg_flash_id(&manu, &id, 0x555, 0x2AA); /* try AMD, Macronix */ | ||
313 | |||
307 | lcd_clear_display(); | 314 | lcd_clear_display(); |
308 | 315 | ||
309 | lcd_puts(0, 0, "[HW Info]"); | 316 | lcd_puts(0, 0, "[HW Info]"); |
@@ -325,6 +332,12 @@ bool dbg_hw_info(void) | |||
325 | case 3: | 332 | case 3: |
326 | snprintf(buf, 32, "Mask: %04x", bitmask); | 333 | snprintf(buf, 32, "Mask: %04x", bitmask); |
327 | break; | 334 | break; |
335 | case 4: | ||
336 | if (got_id) | ||
337 | snprintf(buf, 32, "Flash:%02x,%02x", manu, id); | ||
338 | else | ||
339 | snprintf(buf, 32, "Flash:??,??"); /* unknown, sorry */ | ||
340 | break; | ||
328 | } | 341 | } |
329 | 342 | ||
330 | lcd_puts(0, 1, buf); | 343 | lcd_puts(0, 1, buf); |
@@ -340,12 +353,12 @@ bool dbg_hw_info(void) | |||
340 | case BUTTON_LEFT: | 353 | case BUTTON_LEFT: |
341 | currval--; | 354 | currval--; |
342 | if(currval < 0) | 355 | if(currval < 0) |
343 | currval = 3; | 356 | currval = 4; |
344 | break; | 357 | break; |
345 | 358 | ||
346 | case BUTTON_RIGHT: | 359 | case BUTTON_RIGHT: |
347 | currval++; | 360 | currval++; |
348 | if(currval > 3) | 361 | if(currval > 4) |
349 | currval = 0; | 362 | currval = 0; |
350 | break; | 363 | break; |
351 | } | 364 | } |