sw: don't clear OUT buffer during usb_recv

If there is data already in the OUT buffer, don't throw it away.

This was necessary when using `epfifo` due to the way it shared OUT and
SETUP packets.  However, it is causing reliability issues with eptri.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-11-29 09:47:52 +08:00
parent bd41cbc2b5
commit c8872c1088
3 changed files with 0 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@ -303,9 +303,6 @@ void usb_err(uint8_t ep) {
int usb_recv(void *buffer, int buffer_len) {
// Set the OUT response to ACK, since we are in a position to receive data now.
if (out_have) {
usb_ack(0);
}
while (1) {
if (out_have) {
if (buffer_len > out_buffer_length)