diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-30 13:23:58 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-30 13:23:58 +0000 |
| commit | e0b23fe50d1d3a80d4778195c2e7b1fc8098a603 (patch) | |
| tree | b3e174fbfba027779f470b372af92154ae5e3ff6 | |
| parent | 5193368445b3b24a55be58b845013630005cb5d4 (diff) | |
| download | rockbox-e0b23fe50d1d3a80d4778195c2e7b1fc8098a603.zip rockbox-e0b23fe50d1d3a80d4778195c2e7b1fc8098a603.tar.gz rockbox-e0b23fe50d1d3a80d4778195c2e7b1fc8098a603.tar.bz2 rockbox-e0b23fe50d1d3a80d4778195c2e7b1fc8098a603.tar.xz | |
Better USB handling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1264 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/tree.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c index 0ba622f..2ca9a51 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -27,6 +27,7 @@ #include "lcd.h" #include "button.h" #include "kernel.h" +#include "usb.h" #include "tree.h" #include "main_menu.h" #include "sprintf.h" @@ -35,6 +36,7 @@ #include "menu.h" #include "wps.h" #include "settings.h" +#include "debug.h" #ifdef HAVE_LCD_BITMAP #include "icons.h" @@ -393,7 +395,15 @@ bool dirbrowse(char *root) restore = true; } break; - + + case SYS_USB_CONNECTED: + /* Tell the USB thread that we are safe */ + DEBUGF("dirbrowse got SYS_USB_CONNECTED\n"); + usb_acknowledge(SYS_USB_CONNECTED_ACK); + + /* Wait until the USB cable is extracted again */ + usb_wait_for_disconnect(&button_queue); + break; } if ( restore ) { |