Retry to get full device descriptor, this let my slow CD Tower device work.
This commit is contained in:
parent
b47679ccff
commit
ce5c58974a
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user