fix rp2 iso transfer: reset state before notify stack. since new audio driver can execute xfer_is()

This commit is contained in:
hathach
2025-08-05 22:05:56 +07:00
parent 51533129cf
commit 4bfba6b09a
2 changed files with 6 additions and 3 deletions

View File

@@ -190,8 +190,9 @@ static void __tusb_irq_path_func(hw_handle_buff_status)(void) {
bool done = hw_endpoint_xfer_continue(ep);
if (done) {
// Notify
dcd_event_xfer_complete(0, ep->ep_addr, ep->xferred_len, XFER_RESULT_SUCCESS, true);
const uint16_t xferred_len = ep->xferred_len;
hw_endpoint_reset_transfer(ep);
dcd_event_xfer_complete(0, ep->ep_addr, xferred_len, XFER_RESULT_SUCCESS, true);
}
remaining_buffers &= ~bit;
}