summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-03-22 22:37:26 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-03-22 22:37:26 +0000
commit7e56df03bfa9748a97b44acaec872feb3d554f98 (patch)
treef7a0ec38e74a64554724147e7d95848de478ebdf
parent554d7ed9025bf629f9202c4e5c106f62853207a3 (diff)
downloadrockbox-7e56df03bfa9748a97b44acaec872feb3d554f98.tar.gz
rockbox-7e56df03bfa9748a97b44acaec872feb3d554f98.zip
Set usb_state to USB_POWERED on plugin for software usb device. Otherwise, the state would remain USB_EXTRACTED when connected to a charger
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16752 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/usb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index aa3ab0ae69..2971ab7041 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -199,6 +199,9 @@ static void usb_thread(void)
#endif
{
#ifdef HAVE_USBSTACK
+ /* Set the state to USB_POWERED for now. if a real
+ connection is detected it will switch to USB_INSERTED */
+ usb_state = USB_POWERED;
usb_core_enable_driver(USB_DRIVER_MASS_STORAGE,true);
usb_core_enable_driver(USB_DRIVER_CHARGING_ONLY,false);
usb_enable(true);