mirror of https://github.com/arendst/Tasmota.git
Tune Tx Enable timing
This commit is contained in:
parent
14ee8decf7
commit
ed0b7d69b6
|
@ -424,6 +424,7 @@ size_t TasmotaSerial::write(uint8_t b) {
|
|||
|
||||
if (m_tx_enable_pin > -1) {
|
||||
digitalWrite(m_tx_enable_pin, HIGH);
|
||||
delayMicroseconds(10); // delay(1) will exception here
|
||||
}
|
||||
size_t size = 0;
|
||||
if (m_hardserial) {
|
||||
|
@ -460,7 +461,7 @@ size_t TasmotaSerial::write(uint8_t b) {
|
|||
size = 1;
|
||||
}
|
||||
if (m_tx_enable_pin > -1) {
|
||||
delayMicroseconds(800); // delay(1) will exception here
|
||||
delayMicroseconds(10); // delay(1) will exception here
|
||||
digitalWrite(m_tx_enable_pin, LOW);
|
||||
}
|
||||
return size;
|
||||
|
|
|
@ -157,10 +157,11 @@ uint8_t TasmotaModbus::Send(uint8_t device_address, uint8_t function_code, uint1
|
|||
flush();
|
||||
if (mb_tx_enable_pin > -1) {
|
||||
digitalWrite(mb_tx_enable_pin, HIGH);
|
||||
delayMicroseconds(10); // delay(1) will exception here
|
||||
}
|
||||
write(frame, framepointer);
|
||||
if (mb_tx_enable_pin > -1) {
|
||||
delayMicroseconds(800); // delay(1) will exception here
|
||||
delayMicroseconds(10); // delay(1) will exception here
|
||||
digitalWrite(mb_tx_enable_pin, LOW);
|
||||
}
|
||||
free(frame);
|
||||
|
|
Loading…
Reference in New Issue