mirror of https://github.com/arendst/Tasmota.git
Update TasmotaSerial.cpp
This commit is contained in:
parent
f1a2fb2b8d
commit
02375d6b28
|
@ -174,7 +174,9 @@ bool TasmotaSerial::begin(long speed, int stop_bits) {
|
||||||
m_uart = tasmota_serial_index;
|
m_uart = tasmota_serial_index;
|
||||||
tasmota_serial_index--;
|
tasmota_serial_index--;
|
||||||
TSerial = new HardwareSerial(m_uart);
|
TSerial = new HardwareSerial(m_uart);
|
||||||
if (TM_SERIAL_BUFFER_SIZE != serial_buffer_size) TSerial->setRxBufferSize(serial_buffer_size);
|
if (serial_buffer_size > 256) {
|
||||||
|
TSerial->setRxBufferSize(serial_buffer_size);
|
||||||
|
}
|
||||||
if (2 == m_stop_bits) {
|
if (2 == m_stop_bits) {
|
||||||
TSerial->begin(speed, SERIAL_8N2, m_rx_pin, m_tx_pin);
|
TSerial->begin(speed, SERIAL_8N2, m_rx_pin, m_tx_pin);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue