summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-06-15 16:42:10 +0700
committerhathach <[email protected]>2026-06-15 16:42:10 +0700
commitabc3114d53aee421a0a457ece561ac000ace2c67 (patch)
tree4a83a5bcd549d9863e86de62727250bd5bfe1980 /src/class
parent3bdf52fc1ba06eb96ca28e9c3656b0d6a59cd201 (diff)
dcd/musb: end EP0 IN data stage on short packet, split DATA case
A short IN control response (device sends fewer bytes than wLength — e.g. the 18-byte device descriptor answering a 64-byte GET_DESCRIPTOR) left remain_wlength != 0, so the DATA_IN -> STATUS_OUT transition never fired and pipe0 stayed in DATA_IN through the status stage. usbd then armed the status-OUT while state was still DATA_IN. Set DATAEND and transition on the last packet: remain_wlength == 0, or a short packet (incl. a terminating ZLP) which ends the data stage. With state now tracking the stage, split edpt0_xfer's DATA handling into separate DATA_IN / DATA_OUT cases dispatching on state (asserting state == call direction) instead of the combined dir_in branch. Verified: HIL pass on ek_tm4c123gxl and max32666fthr (13/13 each), including the #3643 high-CPU-load IRQ-toggle coalescing stress. Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'src/class')
0 files changed, 0 insertions, 0 deletions