diff options
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r-- | apps/debug_menu.c | 49 |
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 @@ | |||
42 | #include "settings.h" | 42 | #include "settings.h" |
43 | #include "ata.h" | 43 | #include "ata.h" |
44 | #include "fat.h" | 44 | #include "fat.h" |
45 | #include "dir.h" | ||
46 | #include "panic.h" | ||
45 | #ifdef HAVE_LCD_BITMAP | 47 | #ifdef HAVE_LCD_BITMAP |
46 | #include "widgets.h" | 48 | #include "widgets.h" |
47 | #include "peakmeter.h" | 49 | #include "peakmeter.h" |
@@ -1245,9 +1247,13 @@ static bool dbg_disk_info(void) | |||
1245 | bool done = false; | 1247 | bool done = false; |
1246 | int i; | 1248 | int i; |
1247 | int page = 0; | 1249 | int page = 0; |
1248 | const int max_page = 7; | 1250 | const int max_page = 10; |
1249 | unsigned short* identify_info = ata_get_identify(); | 1251 | unsigned short* identify_info = ata_get_identify(); |
1252 | bool timing_info_present = false; | ||
1253 | char pio3[2], pio4[2]; | ||
1250 | 1254 | ||
1255 | lcd_setmargins(0, 0); | ||
1256 | |||
1251 | while(!done) | 1257 | while(!done) |
1252 | { | 1258 | { |
1253 | int y=0; | 1259 | int y=0; |
@@ -1318,6 +1324,47 @@ static bool dbg_disk_info(void) | |||
1318 | lcd_puts(0, y++, "Read-ahead:"); | 1324 | lcd_puts(0, y++, "Read-ahead:"); |
1319 | lcd_puts(0, y++, i ? "enabled" : "unsupported"); | 1325 | lcd_puts(0, y++, i ? "enabled" : "unsupported"); |
1320 | break; | 1326 | break; |
1327 | |||
1328 | case 8: | ||
1329 | timing_info_present = identify_info[53] & (1<<1); | ||
1330 | if(timing_info_present) { | ||
1331 | pio3[1] = 0; | ||
1332 | pio4[1] = 0; | ||
1333 | lcd_puts(0, y++, "PIO modes:"); | ||
1334 | pio3[0] = (identify_info[64] & (1<<0)) ? '3' : 0; | ||
1335 | pio4[0] = (identify_info[64] & (1<<1)) ? '4' : 0; | ||
1336 | snprintf(buf, 128, "0 1 2 %s %s", pio3, pio4); | ||
1337 | lcd_puts(0, y++, buf); | ||
1338 | } else { | ||
1339 | lcd_puts(0, y++, "No PIO mode info"); | ||
1340 | } | ||
1341 | break; | ||
1342 | |||
1343 | case 9: | ||
1344 | timing_info_present = identify_info[53] & (1<<1); | ||
1345 | if(timing_info_present) { | ||
1346 | snprintf(buf, 128, "Min time: %dns", identify_info[67]); | ||
1347 | lcd_puts(0, y++, buf); | ||
1348 | snprintf(buf, 128, "Min IORDY: %dns", identify_info[68]); | ||
1349 | lcd_puts(0, y++, buf); | ||
1350 | } else { | ||
1351 | lcd_puts(0, y++, "No timing info"); | ||
1352 | } | ||
1353 | break; | ||
1354 | |||
1355 | case 10: | ||
1356 | timing_info_present = identify_info[53] & (1<<1); | ||
1357 | if(timing_info_present) { | ||
1358 | i = identify_info[49] & (1<<11); | ||
1359 | snprintf(buf, 128, "IORDY support: %s", i ? "yes" : "no"); | ||
1360 | lcd_puts(0, y++, buf); | ||
1361 | i = identify_info[49] & (1<<10); | ||
1362 | snprintf(buf, 128, "IORDY disable: %s", i ? "yes" : "no"); | ||
1363 | lcd_puts(0, y++, buf); | ||
1364 | } else { | ||
1365 | lcd_puts(0, y++, "No timing info"); | ||
1366 | } | ||
1367 | break; | ||
1321 | } | 1368 | } |
1322 | lcd_update(); | 1369 | lcd_update(); |
1323 | 1370 | ||