mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-31 20:52:13 +01:00
Merge pull request #4864 from sandeepmistry/avr-usb-tx
Subtract one from USB_EP_SIZE in USB_SendSpace
This commit is contained in:
commit
bbd3ae274b
@ -255,7 +255,9 @@ u8 USB_SendSpace(u8 ep)
|
|||||||
LockEP lock(ep);
|
LockEP lock(ep);
|
||||||
if (!ReadWriteAllowed())
|
if (!ReadWriteAllowed())
|
||||||
return 0;
|
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
|
// Blocking Send of data to an endpoint
|
||||||
|
Loading…
x
Reference in New Issue
Block a user