tinyusb
tinyusb copied to clipboard
tud_cdc_n_write_flush() blocks if the host isn't pulling data
Related area
CDC device class, probably others
Hardware specification
RP2040
Is your feature request related to a problem?
Unless I have missed something or not done something correctly, it seems that a call to tud_cdc_n_write_flush() can block if the host is not pulling data. I haven't tried yet, but I'm guessing that it's a more general issue that happens with the vendor device class as well, and possibly others.
Not completely sure how to deal with it gracefully. It's definitely a condition that should be dealt with, and I don't know how to as is.
Describe the solution you'd like
I suppose that the function could have some kind of time-out. If another kind of solution comes to mind to someone else, I'll be also happy to hear it.
If I have missed anything obvious, please let me know and sorry about the request.
I have checked existing issues, dicussion and documentation
- [X] I confirm I have checked existing issues, dicussion and documentation.