Retry to get full device descriptor, this let my slow CD Tower device work.

This commit is contained in:
David Xu 2003-01-08 05:03:35 +00:00
parent b47679ccff
commit ce5c58974a

View File

@ -1106,9 +1106,15 @@ usbd_status
usbd_reload_device_desc(usbd_device_handle dev)
{
usbd_status err;
int i;
/* Get the full device descriptor. */
err = usbd_get_device_desc(dev, &dev->ddesc);
for (i = 0; i < 3; ++i) {
err = usbd_get_device_desc(dev, &dev->ddesc);
if (!err)
break;
usbd_delay_ms(dev, 200);
}
if (err)
return (err);