summaryrefslogtreecommitdiff
path: root/examples/device/hid_multiple_interface/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-08-12 22:36:49 +0700
committerhathach <[email protected]>2026-08-12 22:41:17 +0700
commita0249ada9096365697340031a7b4a285beb18a2b (patch)
treea860c416a256718d4e2a5ef0c623bbc32fa0977b /examples/device/hid_multiple_interface/src
parent32530d8f4b6cd6d6f7a7df7e6358856c7ebc4f5e (diff)
usbd: don't leak the queued-setup counter when the event queue is full
A SETUP arriving while the event queue is full is silently dropped by queue_event(), but _usbd_queued_setup has already been incremented. The leaked count makes the event handler skip every subsequent SETUP ("Skipped since there is other SETUP in queue") forever: EP0 stays deaf until tud_init() while the device otherwise looks alive - enumerated, endpoints armed. Undo the increment when the enqueue fails. Unit test: fill the queue so a SETUP is dropped, then verify the next SETUP still completes a GET_DESCRIPTOR control transfer.
Diffstat (limited to 'examples/device/hid_multiple_interface/src')
0 files changed, 0 insertions, 0 deletions