diff --git a/hardware/arduino/avr/cores/arduino/USBCore.cpp b/hardware/arduino/avr/cores/arduino/USBCore.cpp index 3c7da861c..44dce72c4 100644 --- a/hardware/arduino/avr/cores/arduino/USBCore.cpp +++ b/hardware/arduino/avr/cores/arduino/USBCore.cpp @@ -255,7 +255,9 @@ u8 USB_SendSpace(u8 ep) LockEP lock(ep); if (!ReadWriteAllowed()) return 0; - return USB_EP_SIZE - FifoByteCount(); + // subtract 1 from the EP size to never send a full packet, + // this avoids dealing with ZLP's in USB_Send + return USB_EP_SIZE - 1 - FifoByteCount(); } // Blocking Send of data to an endpoint