Add TasmotaModbus hardware fallback to GPIO13/15

This commit is contained in:
Theo Arends 2022-12-11 16:44:36 +01:00
parent 958c41a9f6
commit b78886b0f1
2 changed files with 2 additions and 1 deletions

View File

@ -463,6 +463,7 @@ size_t TasmotaSerial::write(uint8_t b) {
size = 1;
}
if (m_tx_enable_valid) {
delay(1);
digitalWrite(m_tx_enable_pin, LOW);
}
return size;

View File

@ -27,7 +27,7 @@ enum LoggingLevels {LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_D
//#define TASMOTAMODBUSDEBUG
TasmotaModbus::TasmotaModbus(int receive_pin, int transmit_pin, int tx_enable_pin) : TasmotaSerial(receive_pin, transmit_pin, 1)
TasmotaModbus::TasmotaModbus(int receive_pin, int transmit_pin, int tx_enable_pin) : TasmotaSerial(receive_pin, transmit_pin, 2)
{
setTransmitEnablePin(tx_enable_pin);
mb_address = 0;