Skip to content

Fixed error, when host send some buffer, less then minimum. #466

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

Merged
merged 1 commit into from
Mar 7, 2019

Conversation

makarenya
Copy link
Contributor

Fixed error, when host send some buffer, less then minimum, and new buffer can't be allocated

I found error in my buffer flipping technology (for usb CDC). When host sends some buffer, less than maxpacket and queue is full, USBD_CDC_Receive does nothing... But, it means, that usb pcd try to fill the rest of previously allocated buffer, and it will expect, that host will send buffer, smaller that maxpacket. But as a rule it is not. So, we must clear pcd buffer in this case.

@fpistm fpistm self-requested a review March 6, 2019 15:40
@fpistm fpistm added bug 🐛 Something isn't working fix 🩹 Bug fix labels Mar 6, 2019
@fpistm fpistm added this to the 1.5.1/1.6.0 milestone Mar 6, 2019
Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one comment else LGTM

@fpistm fpistm merged commit 33bedf6 into stm32duino:master Mar 7, 2019
benwaffle pushed a commit to benwaffle/Arduino_Core_STM32 that referenced this pull request Apr 10, 2019
Fixed error, when host send some buffer, less then minimum.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working fix 🩹 Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants