We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca901a8 commit 743b6e9Copy full SHA for 743b6e9
cores/esp32/USBCDC.cpp
@@ -408,7 +408,7 @@ size_t USBCDC::write(const uint8_t *buffer, size_t size) {
408
// writeTimeout will prevent that TinyUSB failure locks the while(to_send) loop
409
uint32_t writeTimeout = millis() + tx_timeout_ms;
410
while (to_send) {
411
- if (!tud_cdc_n_connected(itf) || millis() > writeTimeout) {
+ if (!tud_cdc_n_connected(itf) || (int32_t)(millis() - writeTimeout) >= 0) {
412
log_e("USB is disconnected or CDC writing has timed out.");
413
size = so_far;
414
break;
0 commit comments