mirror of
https://github.com/im-tomu/foboot.git
synced 2024-09-20 02:40:09 +00:00
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:
parent
bd41cbc2b5
commit
c8872c1088
Binary file not shown.
Binary file not shown.
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user