1
0
Fork 0
forked from len0rd/rockbox

We now start monitoring USB earlier, and can enter USB mode from the debug partition viewer. This fixes bug #799491.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4438 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2004-03-25 12:29:34 +00:00
parent e701808b2e
commit b81a3c54a4
2 changed files with 12 additions and 3 deletions

View file

@ -45,6 +45,7 @@
#include "fat.h" #include "fat.h"
#include "dir.h" #include "dir.h"
#include "panic.h" #include "panic.h"
#include "screens.h"
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
#include "widgets.h" #include "widgets.h"
#include "peakmeter.h" #include "peakmeter.h"
@ -504,6 +505,10 @@ bool dbg_partitions(void)
if (partition > 3) if (partition > 3)
partition = 0; partition = 0;
break; break;
case SYS_USB_CONNECTED:
usb_screen();
return true;
} }
} }
return false; return false;

View file

@ -153,6 +153,8 @@ void init(void)
(void)coldstart; (void)coldstart;
#endif #endif
usb_start_monitoring();
rc = ata_init(); rc = ata_init();
if(rc) if(rc)
{ {
@ -177,6 +179,7 @@ void init(void)
if (!fat_mount(pinfo[i].start)) if (!fat_mount(pinfo[i].start))
break; break;
} }
if ( i==4 ) { if ( i==4 ) {
DEBUGF("No partition found, trying to mount sector 0.\n"); DEBUGF("No partition found, trying to mount sector 0.\n");
rc = fat_mount(0); rc = fat_mount(0);
@ -186,15 +189,16 @@ void init(void)
lcd_puts(0,1,"partition!"); lcd_puts(0,1,"partition!");
lcd_update(); lcd_update();
sleep(HZ); sleep(HZ);
while(1) /* Don't leave until we have been in USB mode */
dbg_partitions(); while(!dbg_partitions());
/* The USB thread will panic if the drive still can't be mounted */
} }
} }
settings_load(); settings_load();
status_init(); status_init();
usb_start_monitoring();
playlist_init(); playlist_init();
tree_init(); tree_init();