Reset USB devices before turning them off or else presumably the PHY is still enabled after disconnect. After one actual connect, Windows would claim the device malfunctioned when inserting the cable for Screendump. If no connection was made before Screendump, then this wouldn't happen.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29087 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2011-01-19 03:30:47 +00:00
parent 30918b8d52
commit 77075be279

View file

@ -188,6 +188,8 @@ void usb_enable(bool on)
usb_core_exit();
#ifndef BOOTLOADER
/* Disable USB devices */
DEV_RS |= (DEV_USB0 | DEV_USB1);
DEV_RS &= ~(DEV_USB0 | DEV_USB1);
DEV_EN &=~ DEV_USB0;
DEV_EN &=~ DEV_USB1;
DEV_INIT2 &=~ INIT_USB;