mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-23 22:43:49 +00:00
nuc121: fix handling of OUT transfers larger than max packet size
This commit is contained in:
parent
1210beb906
commit
f2a5335417
@ -395,9 +395,11 @@ void USBD_IRQHandler(void)
|
||||
xfer->remaining_bytes -= available_bytes;
|
||||
xfer->data_ptr += available_bytes;
|
||||
|
||||
/* when the transfer is finished, alert TinyUSB */
|
||||
/* when the transfer is finished, alert TinyUSB; otherwise, accept more data */
|
||||
if ( (0 == xfer->remaining_bytes) || (available_bytes < xfer->max_packet_size) )
|
||||
dcd_event_xfer_complete(0, ep_addr, available_bytes, XFER_RESULT_SUCCESS, true);
|
||||
else if (xfer->remaining_bytes)
|
||||
ep->MXPLD = xfer->max_packet_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user