Skip to content

Commit 40d9554

Browse files
committed
USB-CDC: Avoid need to send ZLP by sending up to (EPX_SIZE-1) bytes at a time
1 parent 07263f8 commit 40d9554

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/arduino/USB/USBCore.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,8 @@ uint32_t USBDeviceClass::send(uint32_t ep, const void *data, uint32_t len)
627627
// Flash area
628628
while (len != 0)
629629
{
630-
if (len >= 64) {
631-
length = 64;
630+
if (len >= EPX_SIZE) {
631+
length = EPX_SIZE - 1;
632632
} else {
633633
length = len;
634634
}

0 commit comments

Comments
 (0)