ESP32S3 UART output mode for Tx (#22426)

This commit is contained in:
s-hadinger 2024-11-04 22:23:46 +01:00 committed by GitHub
parent 490c48eefe
commit 57d8bea761
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
### Changed
### Fixed
- ESP32S3 UART output mode for Tx
### Removed

View File

@ -149,6 +149,12 @@ void TCPInit(void) {
if (!Settings->tcp_baudrate) {
Settings->tcp_baudrate = 115200 / 300;
}
// patch for ESP32S3
#if CONFIG_IDF_TARGET_ESP32S3
pinMode(Pin(GPIO_TCP_TX), OUTPUT);
digitalWrite(Pin(GPIO_TCP_TX), HIGH);
sleep(1);
#endif // CONFIG_IDF_TARGET_ESP32S3
TCPSerial = new TasmotaSerial(Pin(GPIO_TCP_RX), Pin(GPIO_TCP_TX), TasmotaGlobal.seriallog_level ? 1 : 2, 0, TCP_BRIDGE_BUF_SIZE); // set a receive buffer of 256 bytes
tcp_serial = TCPSerial->begin(Settings->tcp_baudrate * 300, ConvertSerialConfig(0x7F & Settings->tcp_config));
if (PinUsed(GPIO_TCP_TX_EN)) {