Permalink
Browse files

USB TX fix

Fix USB serial port data loss during transmit.

Signed-off-by: Paul Brook <paul@codesourcery.com>
  • Loading branch information...
1 parent bd9ccb4 commit 0d4947fac03a1fd301b7d3701b4684d231e7e1ba Paul Brook committed Sep 27, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 cores/minimus/USBCore.cpp
@@ -280,11 +280,12 @@ int USB_Send(u8 ep, const void* d, int len)
continue;
}
- if (n > len)
- n = len;
- len -= n;
{
LockEP lock(ep);
+ u8 n = USB_SendSpace(ep);
+ if (n > len)
+ n = len;
+ len -= n;
if (ep & TRANSFER_ZERO)
{
while (n--)

0 comments on commit 0d4947f

Please sign in to comment.