mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
Merge pull request #13575 from Jason2866/c3_serial
remove c3 serial workaround
This commit is contained in:
commit
2607edb54c
@ -1841,19 +1841,20 @@ int8_t ParseSerialConfig(const char *pstr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if defined(ESP32) && CONFIG_IDF_TARGET_ESP32C3
|
// workaround disabled 05.11.2021 solved with https://github.com/espressif/arduino-esp32/pull/5549
|
||||||
|
//#if defined(ESP32) && CONFIG_IDF_TARGET_ESP32C3
|
||||||
// temporary workaround, see https://github.com/espressif/arduino-esp32/issues/5287
|
// temporary workaround, see https://github.com/espressif/arduino-esp32/issues/5287
|
||||||
#include <driver/uart.h>
|
//#include <driver/uart.h>
|
||||||
uint32_t GetSerialBaudrate(void) {
|
//uint32_t GetSerialBaudrate(void) {
|
||||||
uint32_t br;
|
// uint32_t br;
|
||||||
uart_get_baudrate(0, &br);
|
// uart_get_baudrate(0, &br);
|
||||||
return (br / 300) * 300; // Fix ESP32 strange results like 115201
|
// return (br / 300) * 300; // Fix ESP32 strange results like 115201
|
||||||
}
|
//}
|
||||||
#else
|
//#else
|
||||||
uint32_t GetSerialBaudrate(void) {
|
uint32_t GetSerialBaudrate(void) {
|
||||||
return (Serial.baudRate() / 300) * 300; // Fix ESP32 strange results like 115201
|
return (Serial.baudRate() / 300) * 300; // Fix ESP32 strange results like 115201
|
||||||
}
|
}
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
void SetSerialSwap(void) {
|
void SetSerialSwap(void) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user