micropython/shared/tinyusb
Angus Gratton a43e38544b shared/tinyusb/mp_usbd_cdc: Rewrite USB CDC TX loop.
This is related to the previous commit (where due to the new config flag
this loop could end up stuck indefinitely if the USB host was
disconnected). The previous loop could maybe still get stuck if the
low-level USB state and the high-level USB state got out of sync. (Not
clearly possible, but hard to say definitely not possible.)

To be "belts and braces" careful:

- Always run mp_usbd_task() each time around the loop to progress the
  state.
- Always evaluate the timeout if we fail to write anything to the FIFO.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2025-09-10 12:35:10 +10:00
..
mp_usbd_cdc.c shared/tinyusb/mp_usbd_cdc: Rewrite USB CDC TX loop. 2025-09-10 12:35:10 +10:00
mp_usbd_cdc.h esp32: Add automatic bootloader handling for S2 and S3. 2024-10-07 11:06:57 +11:00
mp_usbd_descriptor.c shared/tinyusb: Set MSC max endpoint size based on device speed. 2024-12-10 10:26:27 +11:00
mp_usbd_runtime.c shared/tinyusb: Fix build errors with CDC support disabled. 2025-09-09 10:29:38 +10:00
mp_usbd.c shared/tinyusb: Use device event hook to schedule USB task. 2025-05-26 11:15:33 +10:00
mp_usbd.h shared/tinyusb: Fix hang from new tx_overwritabe_if_not_connected flag. 2025-09-10 12:34:59 +10:00
tusb_config.h shared/tinyusb: Use new persistent-tx-fifo configure interface. 2024-09-26 23:13:50 +10:00