cdc: Fix autoflush for FIFO < MPS#1487
Merged
hathach merged 1 commit intohathach:masterfrom Dec 6, 2022
Merged
Conversation
Contributor
Author
|
|
perigoso
reviewed
Jun 2, 2022
7cf5f75 to
bf22f89
Compare
Contributor
Author
hathach
requested changes
Dec 5, 2022
Owner
hathach
left a comment
There was a problem hiding this comment.
sorry for late response, I was too busy with other works. The reason for change request: although it has more code, the additional condition CFG_TUD_CDC_TX_BUFSIZE < BULK_PACKET_SIZE is constant expression and will help the compiler to optimize it out.
Therefore we don't have to run tu_fifo_full() when bufsize is larger than the packet size (and const expression also not executed at all in other case)
bf22f89 to
603effb
Compare
7FM
pushed a commit
to 7FM/tinyusb
that referenced
this pull request
Aug 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Describe the PR
If CDC TX buffer size is configured to be less than bulk packet size, the autoflushing condition is never reached.
Changes:
Additional context
Found out during espressif/esp-idf#9040