From a707f0ba4deb4e217a6a1dd8067f21692a2c9be7 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 4 Jan 2017 17:10:09 +0100 Subject: [PATCH] Revert "Subtract one from USB_EP_SIZE in USB_SendSpace" This reverts commit 817d700a7503b269f986075cad637ce56c657e37. --- hardware/arduino/avr/cores/arduino/USBCore.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hardware/arduino/avr/cores/arduino/USBCore.cpp b/hardware/arduino/avr/cores/arduino/USBCore.cpp index 723edb3c8..efac25ed6 100644 --- a/hardware/arduino/avr/cores/arduino/USBCore.cpp +++ b/hardware/arduino/avr/cores/arduino/USBCore.cpp @@ -256,9 +256,7 @@ u8 USB_SendSpace(u8 ep) LockEP lock(ep); if (!ReadWriteAllowed()) return 0; - // 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(); + return USB_EP_SIZE - FifoByteCount(); } // Blocking Send of data to an endpoint