summaryrefslogtreecommitdiff
path: root/src/tusb_option.h
diff options
context:
space:
mode:
authorZixun LI <[email protected]>2026-07-29 14:27:59 +0200
committerZixun LI <[email protected]>2026-07-29 15:56:12 +0200
commit8f287a9e8ea6073f1970a4bf6993ade3a9db620d (patch)
tree7404b73c6002d752333a76bb24ccdb47988877b9 /src/tusb_option.h
parent529fd0532ae6eeb13b1ac8dc87381c6560e3a995 (diff)
raw_gadget: fix MSC recovery after endpoint haltraw_gadget_review
Allow opt-in DCDs to queue transfers behind a halted endpoint without changing hardware DCD behavior. Retry dummy_hcd's transient EP_SET_HALT failure, queue MSC BOT status and recovery requests behind the halt, and clean up Raw Gadget endpoint workers across bus reset. Signed-off-by: Zixun LI <[email protected]>
Diffstat (limited to 'src/tusb_option.h')
-rw-r--r--src/tusb_option.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tusb_option.h b/src/tusb_option.h
index 614a78803..05e46ffff 100644
--- a/src/tusb_option.h
+++ b/src/tusb_option.h
@@ -652,6 +652,16 @@
#error "CFG_TUD_ENDPPOINT_MAX must be less than or equal to TUP_DCD_ENDPOINT_MAX"
#endif
+// Allow transfers to be queued while an endpoint is halted. The DCD must preserve each transfer
+// for delivery after the halt is cleared, though it may report completion after taking ownership.
+// If ClearFeature is handled below USBD, the software stalled state remains the last observed state.
+#ifndef CFG_TUD_ENDPOINT_XFER_BEHIND_HALT
+ #ifndef CFG_TUD_ENDPOINT_XFER_BEHIND_HALT_DEFAULT
+ #define CFG_TUD_ENDPOINT_XFER_BEHIND_HALT_DEFAULT 0
+ #endif
+ #define CFG_TUD_ENDPOINT_XFER_BEHIND_HALT CFG_TUD_ENDPOINT_XFER_BEHIND_HALT_DEFAULT
+#endif
+
// USB 2.0 7.1.20: compliance test mode support
#ifndef CFG_TUD_TEST_MODE
#define CFG_TUD_TEST_MODE 0