drivers: usb: stm32: add support for incomplete isochronous in transfer #84622
+13
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the
write_sem
for an endpoint is only given back if the data was actually read by host (and thus callingHAL_PCD_DataInStageCallback
wherin the semaphore is given back).The problem that occurs is when you want to implement an isochronous endpoint that periodically writes data to the endpoint. As isochronous transfers are not supposed to have any guarantee of delivery it should be possible to send data again and again without a host having to read/receive them. With the current design this is not possible.
To solve this problem another HAL callback was implemented in a similar fashion to
HAL_PCD_DataInStageCallback
. This other callback function is namedHAL_PCD_ISOINIncompleteCallback
, and as its name suggests it is being called when data in an isochronous in endpoint has not been "delivered". So, in this callback the write semaphore is given back allowing for sequent writes.Please let me know if you have any input on this!