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

This commit is contained in:
davidxu 2003-01-08 05:03:35 +00:00
parent 4c9db55d76
commit 6989b48751

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);