Initialize detectedBaudRate to prevent compilation errors (#2101)

This commit is contained in:
Jamie Parkinson 2018-11-26 23:22:37 +01:00 committed by Me No Dev
parent 04963009ee
commit e609c78f20

View File

@ -56,7 +56,7 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
if(!baud) { if(!baud) {
time_t startMillis = millis(); time_t startMillis = millis();
unsigned long detectedBaudRate; unsigned long detectedBaudRate = 0;
while(millis() - startMillis < timeout_ms && !(detectedBaudRate = uartDetectBaudrate(_uart))) { while(millis() - startMillis < timeout_ms && !(detectedBaudRate = uartDetectBaudrate(_uart))) {
yield(); yield();
} }