Don't set TX timeout to 0 anymore for HW/USB CDC
Due to a change in the Espressif Arduino core, the TX timeout for the HW CDC (used in the ESP32-S3, for example) must not be set to 0, as otherwise, an integer underflow occurs. Removing the TX timeout is not necessary anymore anyways, because it is now detected when CDC is not active, and attempts to write will return immediately until the host read something again. Only when the transmit buffer becomes full initially, the default timeout of just 100ms takes effect once. For USB CDC (used with the ESP32-S2, for example), the timeout is not relevant either.
This commit is contained in:
parent
b7f830f64e
commit
6297ae3428
@ -43,10 +43,8 @@ void setup()
|
||||
|
||||
// Initialize serial output
|
||||
Serial.begin(SERIAL_BAUDRATE);
|
||||
#if ARDUINO_USB_CDC_ON_BOOT
|
||||
Serial.setTxTimeoutMs(0);
|
||||
delay(100);
|
||||
#else
|
||||
#if !ARDUINO_USB_CDC_ON_BOOT
|
||||
// Only wait for serial interface to be set up when not using CDC
|
||||
while (!Serial)
|
||||
yield();
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user