diff options
| author | hathach <[email protected]> | 2025-07-08 12:13:22 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-07-08 12:13:22 +0700 |
| commit | 961ea73e55a54d77882ebc3a40fbacc3bd1899e3 (patch) | |
| tree | 2abea8152478e12787bcb9bcd156e39d6a2fac52 /src | |
| parent | 2908995c4c0a1221247c9d5aed7a5c9817dcb52e (diff) | |
revert edpt busy/claim status if xfer_isr() defer to xfer_cb()
Diffstat (limited to 'src')
| -rw-r--r-- | src/device/usbd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c index a803301e3..1e16034a8 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -1275,6 +1275,12 @@ TU_ATTR_FAST_FUNC void dcd_event_handler(dcd_event_t const* event, bool in_isr) _usbd_dev.ep_status[epnum][ep_dir].claimed = 0; send = !driver->xfer_isr(event->rhport, ep_addr, (xfer_result_t) event->xfer_complete.result, event->xfer_complete.len); + + // xfer_isr() is deferred to xfer_cb(), revert busy/claimed status + if (send) { + _usbd_dev.ep_status[epnum][ep_dir].busy = 1; + _usbd_dev.ep_status[epnum][ep_dir].claimed = 1; + } } } break; |
