espressif_tinyusb/src/device
Jerzy Kasenberg c62c1433e7 usbd: Workaround for non standard device descriptor request
Windows and Linux host during enumeration requests device
descriptor with request size set to 64 bytes when device
was in default state (no address).
Those systems do not want 64 bytes though since usb descriptors is
only 18 bytes long so they silently expect that only one packet
will be received possibly 18 bytes for EPS > 16 or 8 or 16 bytes
for smaller EP0.

For devices with CFG_TUD_ENDPOINT0_SIZE size 8 or 16 there was
workaround that reduced request size to CFG_TUD_ENDPOINT0_SIZE
and that was enough to satisfy Windows and Linux hosts.

However USBCV testing application also requests device descriptor
but with size set to 18 bytes. Workaround for Window/Linux
prevented USBVC to tests devices with 8 bytes EP0 size since it
send only 8 bytes while application did wanted 18 bytes.

Solution that satisfies both cases it to check if in default state device
descriptor request wants more bytes than descriptor size (18).
If so host is expecting to receive less bytes then requested
and workaround would be applied since Linux/Windows only try
to read one packet.
If 18 bytes was requested as is the case for USBCV, core returns
descriptor in 2 or 3 packets as application expects.
2021-09-24 14:19:04 +02:00
..
dcd.h rp2040 correct ep set/clear stall 2021-09-01 16:52:27 +07:00
dcd_attr.h initial commit of support for K32L2B 2021-08-23 16:17:57 -07:00
usbd.c usbd: Workaround for non standard device descriptor request 2021-09-24 14:19:04 +02:00
usbd.h add other speed descriptor callback tud_descriptor_other_speed_configuration_cb() 2021-09-09 15:17:19 +07:00
usbd_control.c update endian 2021-07-22 17:49:39 +07:00
usbd_pvt.h remove set/clear busy flag in set/clear stall since they are different status 2021-08-31 17:39:54 +07:00