mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
Pass the correct speed on Spresense
This commit is contained in:
parent
d3195414dc
commit
b591a66b3d
@ -155,7 +155,24 @@ static void _dcd_disconnect(FAR struct usbdevclass_driver_s *driver, FAR struct
|
||||
{
|
||||
(void) driver;
|
||||
|
||||
tusb_speed_t speed = (dev->speed == 3) ? TUSB_SPEED_HIGH : TUSB_SPEED_FULL;
|
||||
tusb_speed_t speed;
|
||||
|
||||
switch (dev->speed)
|
||||
{
|
||||
case USB_SPEED_LOW:
|
||||
speed = TUSB_SPEED_LOW;
|
||||
break;
|
||||
case USB_SPEED_FULL:
|
||||
speed = TUSB_SPEED_FULL;
|
||||
break;
|
||||
case USB_SPEED_HIGH:
|
||||
speed = TUSB_SPEED_HIGH;
|
||||
break;
|
||||
default:
|
||||
speed = TUSB_SPEED_HIGH;
|
||||
break;
|
||||
}
|
||||
|
||||
dcd_event_bus_reset(0, speed, true);
|
||||
DEV_CONNECT(dev);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user