summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-02-16 12:04:55 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-02-16 12:04:55 +0000
commitf3ad619c274bd510a8bb7ccbad9a588a4e4459d8 (patch)
tree03bf0075bb7da210f1dd7a344ee962c4ff5eb472 /apps
parentdee17f71026c773957277d6e24d5c6719c821bb3 (diff)
downloadrockbox-f3ad619c274bd510a8bb7ccbad9a588a4e4459d8.tar.gz
rockbox-f3ad619c274bd510a8bb7ccbad9a588a4e4459d8.tar.bz2
rockbox-f3ad619c274bd510a8bb7ccbad9a588a4e4459d8.zip
New disk debugging options for timing information
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4305 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c49
1 files changed, 48 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 5c84b3db2b..cfabb7c91a 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -42,6 +42,8 @@
#include "settings.h"
#include "ata.h"
#include "fat.h"
+#include "dir.h"
+#include "panic.h"
#ifdef HAVE_LCD_BITMAP
#include "widgets.h"
#include "peakmeter.h"
@@ -1245,9 +1247,13 @@ static bool dbg_disk_info(void)
bool done = false;
int i;
int page = 0;
- const int max_page = 7;
+ const int max_page = 10;
unsigned short* identify_info = ata_get_identify();
+ bool timing_info_present = false;
+ char pio3[2], pio4[2];
+ lcd_setmargins(0, 0);
+
while(!done)
{
int y=0;
@@ -1318,6 +1324,47 @@ static bool dbg_disk_info(void)
lcd_puts(0, y++, "Read-ahead:");
lcd_puts(0, y++, i ? "enabled" : "unsupported");
break;
+
+ case 8:
+ timing_info_present = identify_info[53] & (1<<1);
+ if(timing_info_present) {
+ pio3[1] = 0;
+ pio4[1] = 0;
+ lcd_puts(0, y++, "PIO modes:");
+ pio3[0] = (identify_info[64] & (1<<0)) ? '3' : 0;
+ pio4[0] = (identify_info[64] & (1<<1)) ? '4' : 0;
+ snprintf(buf, 128, "0 1 2 %s %s", pio3, pio4);
+ lcd_puts(0, y++, buf);
+ } else {
+ lcd_puts(0, y++, "No PIO mode info");
+ }
+ break;
+
+ case 9:
+ timing_info_present = identify_info[53] & (1<<1);
+ if(timing_info_present) {
+ snprintf(buf, 128, "Min time: %dns", identify_info[67]);
+ lcd_puts(0, y++, buf);
+ snprintf(buf, 128, "Min IORDY: %dns", identify_info[68]);
+ lcd_puts(0, y++, buf);
+ } else {
+ lcd_puts(0, y++, "No timing info");
+ }
+ break;
+
+ case 10:
+ timing_info_present = identify_info[53] & (1<<1);
+ if(timing_info_present) {
+ i = identify_info[49] & (1<<11);
+ snprintf(buf, 128, "IORDY support: %s", i ? "yes" : "no");
+ lcd_puts(0, y++, buf);
+ i = identify_info[49] & (1<<10);
+ snprintf(buf, 128, "IORDY disable: %s", i ? "yes" : "no");
+ lcd_puts(0, y++, buf);
+ } else {
+ lcd_puts(0, y++, "No timing info");
+ }
+ break;
}
lcd_update();