Skip to content

Commit 3243915

Browse files
committed
Fix ESP8266 begin() call
1 parent f83deb7 commit 3243915

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/uart/hardware.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,10 @@ bool UARTHardware::ConfigureSerial() {
154154
#if ARDUINO_ARCH_ESP32
155155
_hwSerial->begin((unsigned long)_config.baud_rate, (uint32_t)cfg, rx_pin,
156156
tx_pin, false, (unsigned long)_config.timeout);
157+
#ifdef ARDUINO_ARCH_ESP8266
158+
_hwSerial->begin((unsigned long)_config.baud_rate, (SerialConfig)cfg);
157159
#else
158-
// ESP8266, SAMD, and other platforms
160+
// SAMD, and other platforms
159161
// take the default Arduino/Wiring API arguments
160162
_hwSerial->begin((unsigned long)_config.baud_rate, (uint32_t)cfg);
161163
#endif

0 commit comments

Comments
 (0)