Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usb-device-cdc: Fix lost data in read() path if short reads happened.
If the CDC receive buffer was full and some code read less than 64 bytes (wMaxTransferSize), the CDC code would submit an OUT transfer with N<64 bytes length to fill the buffer back up. However if the host had more than N bytes to send then it would still send the full 64 bytes (correctly) in the transfer. The remaining (64-N) bytes would be lost. Adds the restriction that CDCInterface rxbuf has to be at least 64 bytes. Fixes issue #885. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
- Loading branch information