micropython-lib/micropython
Angus Gratton 0a91a37563 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 <angus@redyak.com.au>
2024-07-03 17:17:38 +10:00
..
aioespnow all: Change use of "uasyncio" to "asyncio". 2024-06-14 10:29:46 +10:00
aiorepl all: Change use of "uasyncio" to "asyncio". 2024-06-14 10:29:46 +10:00
bluetooth aioble/multitests: Store a reference to tasks and cancel when done. 2024-06-14 10:35:06 +10:00
bundles ssl: Restructure micropython SSL interface to a new tls module. 2024-02-07 12:12:13 +11:00
drivers all: Use non-u versions of built-in modules. 2024-06-14 10:35:06 +10:00
espflash all: Enable Ruff lint F541 'f-string without any placeholders'. 2024-05-15 18:11:46 +10:00
lora all: Enable Ruff lint F541 'f-string without any placeholders'. 2024-05-15 18:11:46 +10:00
mip mip: Bump minor version. 2024-05-15 13:53:01 +10:00
mip-cmdline micropython/mip: Add command-line functionality for the Unix port. 2022-11-09 12:43:04 +11:00
net all: Use non-u versions of built-in modules. 2024-06-14 10:35:06 +10:00
senml senml: Use the updated cbor2 API. 2024-03-19 17:29:22 +11:00
uaiohttpclient all: Change use of "uasyncio" to "asyncio". 2024-06-14 10:29:46 +10:00
ucontextlib all: Enable ruff F841 'Local variable is assigned to but never used'. 2024-05-15 18:05:21 +10:00
udnspkt all: Use non-u versions of built-in modules. 2024-06-14 10:35:06 +10:00
umqtt.robust all: Use non-u versions of built-in modules. 2024-06-14 10:35:06 +10:00
umqtt.simple all: Use non-u versions of built-in modules. 2024-06-14 10:35:06 +10:00
upysh all: Replace metadata.txt with manifest.py. 2022-09-05 17:50:28 +10:00
urequests requests: Rename urequests to requests. 2023-07-23 11:41:44 +10:00
urllib.urequest all: Use non-u versions of built-in modules. 2024-06-14 10:35:06 +10:00
usb usb-device-cdc: Fix lost data in read() path if short reads happened. 2024-07-03 17:17:38 +10:00
xmltok xmltok: Bump patch version. 2023-07-23 11:48:25 +10:00
README.md top: Update top-level docs. 2022-12-16 17:16:03 +11:00

README.md

MicroPython-specific packages

These are packages that have been written specifically for use on MicroPython.

Packages in this directory should not have the same name as modules from the Python Standard Library.

Future plans

  • More organised directory structure based on purpose (e.g. drivers, network, etc).