Always disable blocking in the console output

On USB connection, Serial.print may block the main loop if the USB is connected but isn't read, breaking the firmware logic.
This commit is contained in:
Oleg Kalachev
2026-08-30 21:32:30 +03:00
parent a2dd70654c
commit eb0018a326
+3
View File
@@ -67,6 +67,9 @@ HWCDC HWCDCSerial;
void setupConsole() { void setupConsole() {
Serial.begin(115200); Serial.begin(115200);
#if SOC_USB_SERIAL_JTAG_SUPPORTED
Serial.setTxTimeoutMs(0); // never block on usb write
#endif
} }
void print(const char* format, ...) { void print(const char* format, ...) {