We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c8df30 commit 92ea116Copy full SHA for 92ea116
src/pio_usb_host.c
@@ -615,12 +615,12 @@ static int __no_inline_not_in_flash_func(usb_setup_transaction)(
615
pio_usb_bus_wait_handshake(pp);
616
pio_sm_set_enabled(pp->pio_usb_rx, pp->sm_rx, false);
617
618
- ep->actual_len = 8;
619
-
620
if (pp->usb_rx_buffer[0] == USB_SYNC && pp->usb_rx_buffer[1] == USB_PID_ACK) {
+ ep->actual_len = 8;
621
pio_usb_ll_transfer_complete(ep, PIO_USB_INTS_ENDPOINT_COMPLETE_BITS);
622
} else {
623
res = -1;
+ ep->data_id = USB_PID_SETUP; // retry setup
624
if (++ep->failed_count > TRANSACTION_MAX_RETRY) {
625
pio_usb_ll_transfer_complete(ep, PIO_USB_INTS_ENDPOINT_ERROR_BITS);
626
}
0 commit comments