We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e194bd commit 5e3d08aCopy full SHA for 5e3d08a
cores/arduino/USBCore.cpp
@@ -255,7 +255,9 @@ u8 USB_SendSpace(u8 ep)
255
LockEP lock(ep);
256
if (!ReadWriteAllowed())
257
return 0;
258
- return USB_EP_SIZE - FifoByteCount();
+ // subtract 1 from the EP size to never send a full packet,
259
+ // this avoids dealing with ZLP's in USB_Send
260
+ return USB_EP_SIZE - 1 - FifoByteCount();
261
}
262
263
// Blocking Send of data to an endpoint
0 commit comments