From 4b54559920be65ab411e974a90f3956b8d107af1 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 2 Jul 2002 17:59:10 +0000 Subject: [PATCH] Added FAT debug option git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1309 a1c6a512-1295-4272-9138-f99709370657 --- apps/main.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/apps/main.c b/apps/main.c index 693577a72f..fe33bab5c0 100644 --- a/apps/main.c +++ b/apps/main.c @@ -97,21 +97,34 @@ void init(void) usb_init(); - rc = ata_init(); - if(rc) - panicf("ata: %d",rc); - - pinfo = disk_init(); - if (!pinfo) - panicf("disk: NULL"); - - rc = fat_mount(pinfo[0].start); - if(rc) - panicf("mount: %d",rc); - backlight_init(); button_init(); + + rc = ata_init(); + if(!rc) + { +#ifdef ARCHOS_RECORDER + char str[32]; + lcd_clear_display(); + snprintf(str, 31, "ATA error: %d", rc); + lcd_puts(0, 1, str); + lcd_puts(0, 3, "Press ON to debug"); + lcd_update(); + while(button_get(true) != BUTTON_ON) {}; + dbg_ports(); +#endif + panicf("ata: %d", rc); + } + + pinfo = disk_init(); + if (!pinfo) + panicf("disk: NULL"); + + rc = fat_mount(pinfo[0].start); + if(rc) + panicf("mount: %d",rc); + mpeg_init( global_settings.volume, global_settings.bass, global_settings.treble );