From ee192fb49f819c8de4684b588ce7fe68126f19d1 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Tue, 5 Aug 2003 13:39:38 +0000 Subject: Add ata master/slave display to hw_info debug menu. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3922 a1c6a512-1295-4272-9138-f99709370657 --- apps/debug_menu.c | 80 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 91746d2e58..6241017bf4 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -309,7 +309,8 @@ bool dbg_hw_info(void) snprintf(buf, 32, "USB: %s", usb_polarity?"positive":"negative"); lcd_puts(0, 3, buf); - snprintf(buf, 32, "ATA: 0x%x", ata_io_address); + snprintf(buf, 32, "ATA: 0x%x,%s", ata_io_address, + ata_device ? "slave":"master"); lcd_puts(0, 4, buf); snprintf(buf, 32, "PR: %s", pr_polarity?"positive":"negative"); @@ -381,7 +382,8 @@ bool dbg_hw_info(void) usb_polarity?"pos":"neg"); break; case 2: - snprintf(buf, 32, "ATA: 0x%x", ata_io_address); + snprintf(buf, 32, "ATA: 0x%x%s", + ata_io_address, ata_device ? "s","m"); break; case 3: snprintf(buf, 32, "Mask: %04x", bitmask); @@ -1222,47 +1224,47 @@ static bool dbg_disk_info(void) #endif switch (page) { - case 0: - for (i=0; i < 20; i++) - ((unsigned short*)buf)[i]=identify_info[i+27]; - buf[40]=0; - /* kill trailing space */ - for (i=39; i && buf[i]==' '; i--) - buf[i] = 0; - lcd_puts(0, y++, "Model"); - lcd_puts_scroll(0, y++, buf); - break; + case 0: + for (i=0; i < 20; i++) + ((unsigned short*)buf)[i]=identify_info[i+27]; + buf[40]=0; + /* kill trailing space */ + for (i=39; i && buf[i]==' '; i--) + buf[i] = 0; + lcd_puts(0, y++, "Model"); + lcd_puts_scroll(0, y++, buf); + break; - case 1: - for (i=0; i < 4; i++) - ((unsigned short*)buf)[i]=identify_info[i+23]; - buf[8]=0; - lcd_puts(0, y++, "Firmware"); - lcd_puts(0, y++, buf); - break; + case 1: + for (i=0; i < 4; i++) + ((unsigned short*)buf)[i]=identify_info[i+23]; + buf[8]=0; + lcd_puts(0, y++, "Firmware"); + lcd_puts(0, y++, buf); + break; - case 2: - snprintf(buf, sizeof buf, "%d MB", - ((unsigned)identify_info[61] << 16 | - (unsigned)identify_info[60]) / 2048 ); - lcd_puts(0, y++, "Size"); - lcd_puts(0, y++, buf); - break; + case 2: + snprintf(buf, sizeof buf, "%d MB", + ((unsigned)identify_info[61] << 16 | + (unsigned)identify_info[60]) / 2048 ); + lcd_puts(0, y++, "Size"); + lcd_puts(0, y++, buf); + break; - case 3: { - unsigned int free; - fat_size( NULL, &free ); - snprintf(buf, sizeof buf, "%d MB", free / 1024 ); - lcd_puts(0, y++, "Free"); - lcd_puts(0, y++, buf); - break; - } + case 3: { + unsigned int free; + fat_size( NULL, &free ); + snprintf(buf, sizeof buf, "%d MB", free / 1024 ); + lcd_puts(0, y++, "Free"); + lcd_puts(0, y++, buf); + break; + } - case 4: - snprintf(buf, sizeof buf, "%d ms", ata_spinup_time * (1000/HZ)); - lcd_puts(0, y++, "Spinup time"); - lcd_puts(0, y++, buf); - break; + case 4: + snprintf(buf, sizeof buf, "%d ms", ata_spinup_time * (1000/HZ)); + lcd_puts(0, y++, "Spinup time"); + lcd_puts(0, y++, buf); + break; } lcd_update(); -- cgit v1.2.3