-
Notifications
You must be signed in to change notification settings - Fork 1.3k
limit fifo read size to ep_bufsize regardless ep_buf is used or not #3424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: HiFiPhile <admin@hifiphile.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug where the CFG_TUD_CDC_EP_BUFSIZE configuration was not being respected for devices using hardware FIFO. The fix removes a conditional check that incorrectly prevented the endpoint buffer size limit from being applied when ep_buf is NULL (hardware FIFO mode), ensuring consistent behavior for all devices regardless of whether they use a dedicated endpoint buffer or hardware FIFO.
Key Changes
- Removed conditional check for
ep_buf != NULLthat preventedep_bufsizefrom limiting transfer size in hardware FIFO mode - Ensures
CFG_TUD_CDC_EP_BUFSIZEsetting is effective for all device configurations
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Size Difference ReportBecause TinyUSB code size varies by port and configuration, the metrics below represent the averaged totals across all example builds. Note: If there is no change, only one value is shown. Changes >1% in sizeNo entries. Changes <1% in size
No changes
|
Describe the PR
I've added
if (s->ep_buf != NULL) {during the fixup but it will break receiving behavior when the host can't send ZLP. With thisifadded settingCFG_TUD_CDC_EP_BUFSIZEwill no longer have effect on devices using HWFIFO.Related to #2287