mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
usbdev-composite: fix enumeration error for 192 bytes desc
when the size of the usb configuration descriptor is a multiple of 64 integers, only for this size less than wlength, host do need send ZLP Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
This commit is contained in:
@@ -680,7 +680,12 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver,
|
||||
/* Setup the request */
|
||||
|
||||
ctrlreq->len = MIN(len, ret);
|
||||
ctrlreq->flags = USBDEV_REQFLAGS_NULLPKT;
|
||||
|
||||
/* Only when ret is less than len do zero length packet
|
||||
* need to be sent
|
||||
*/
|
||||
|
||||
ctrlreq->flags = ret < len ? USBDEV_REQFLAGS_NULLPKT : 0;
|
||||
|
||||
/* And submit the request to the USB controller driver */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user