mirror of
https://github.com/okalachev/flix.git
synced 2026-09-05 16:00:56 +00:00
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:
@@ -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, ...) {
|
||||||
|
|||||||
Reference in New Issue
Block a user