summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-03-10 20:57:56 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-03-10 20:57:56 +0000
commitf10f891bb4bd05c699344a782e798d3a1c1a63ea (patch)
treef1c4c3f4e8e3437cd5b5fe8ebd891790d17c831a /apps
parent745133014e6161c4d8c7a7eab137b7d9b1174c55 (diff)
downloadrockbox-f10f891bb4bd05c699344a782e798d3a1c1a63ea.tar.gz
rockbox-f10f891bb4bd05c699344a782e798d3a1c1a63ea.zip
provide a debug menu item to virtually reinsert drives for usb storage when the player is back to normal after "ejecting" all drives
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16618 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index f93755a293..b77a09a18c 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -102,9 +102,12 @@
#include "as3514.h"
#endif
-#if defined(HAVE_USBSTACK) && defined(ROCKBOX_HAS_LOGF)
+#if defined(HAVE_USBSTACK)
#include "usb_core.h"
#endif
+#ifdef USB_STORAGE
+#include "../firmware/usbstack/usb_storage.h"
+#endif
/*---------------------------------------------------*/
/* SPECIAL DEBUG STUFF */
@@ -2378,6 +2381,15 @@ static bool logf_usb_serial(void)
}
#endif
+#if defined(HAVE_USBSTACK) && defined(USB_STORAGE)
+static bool usb_reconnect(void)
+{
+ gui_syncsplash(HZ, "Reconnect mass storage");
+ usb_storage_reconnect();
+ return false;
+}
+#endif
+
/****** The menu *********/
struct the_menu_item {
@@ -2460,6 +2472,9 @@ static const struct the_menu_item menuitems[] = {
#if defined(HAVE_USBSTACK) && defined(ROCKBOX_HAS_LOGF) && defined(USB_SERIAL)
{"logf over usb",logf_usb_serial },
#endif
+#if defined(HAVE_USBSTACK) && defined(USB_STORAGE)
+ {"reconnect usb storage",usb_reconnect},
+#endif
#ifdef CPU_BOOST_LOGGING
{"cpu_boost log",cpu_boost_log},
#endif