Skip to content

Commit

Permalink
USB TX fix
Browse files Browse the repository at this point in the history
Fix USB serial port data loss during transmit.

Signed-off-by: Paul Brook <paul@codesourcery.com>
  • Loading branch information
Paul Brook committed Sep 27, 2012
1 parent bd9ccb4 commit 0d4947f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cores/minimus/USBCore.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -280,11 +280,12 @@ int USB_Send(u8 ep, const void* d, int len)
continue; continue;
} }


if (n > len)
n = len;
len -= n;
{ {
LockEP lock(ep); LockEP lock(ep);
u8 n = USB_SendSpace(ep);
if (n > len)
n = len;
len -= n;
if (ep & TRANSFER_ZERO) if (ep & TRANSFER_ZERO)
{ {
while (n--) while (n--)
Expand Down

0 comments on commit 0d4947f

Please sign in to comment.