From 7e56df03bfa9748a97b44acaec872feb3d554f98 Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Sat, 22 Mar 2008 22:37:26 +0000 Subject: 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 --- firmware/usb.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit v1.2.3