diff --git a/src/main/io/serial_4way.c b/src/main/io/serial_4way.c index bbe611d8166..9b97969aa27 100644 --- a/src/main/io/serial_4way.c +++ b/src/main/io/serial_4way.c @@ -396,13 +396,19 @@ static serialPort_t *port; static bool ReadByte(uint8_t *data, timeDelta_t timeoutUs) { - // need timedOut? +#ifdef USE_TIMEOUT_4WAYIF timeUs_t startTime = micros(); while (!serialRxBytesWaiting(port)) { if (timeoutUs && (cmpTimeUs(micros(), startTime) > timeoutUs)) { return true; } } +#else + UNUSED(timeoutUs); + + // Wait indefinitely + while (!serialRxBytesWaiting(port)); +#endif *data = serialRead(port);