From f10f891bb4bd05c699344a782e798d3a1c1a63ea Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Mon, 10 Mar 2008 20:57:56 +0000 Subject: 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 --- apps/debug_menu.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3