nuc121: better fix for handling large OUT transfers

This commit is contained in:
Peter Lawrence 2020-01-15 10:23:23 -06:00
parent f2a5335417
commit 7f2db321bf
1 changed files with 1 additions and 1 deletions

View File

@ -397,7 +397,7 @@ void USBD_IRQHandler(void)
/* 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);
dcd_event_xfer_complete(0, ep_addr, xfer->total_bytes, XFER_RESULT_SUCCESS, true);
else if (xfer->remaining_bytes)
ep->MXPLD = xfer->max_packet_size;
}