Skip to content

remove c3 serial workaround #13575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions tasmota/support.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
#include <driver/uart.h>
uint32_t GetSerialBaudrate(void) {
uint32_t br;
uart_get_baudrate(0, &br);
return (br / 300) * 300; // Fix ESP32 strange results like 115201
}
#else
//#include <driver/uart.h>
//uint32_t GetSerialBaudrate(void) {
// uint32_t br;
// uart_get_baudrate(0, &br);
// return (br / 300) * 300; // Fix ESP32 strange results like 115201
//}
//#else
uint32_t GetSerialBaudrate(void) {
return (Serial.baudRate() / 300) * 300; // Fix ESP32 strange results like 115201
}
#endif
//#endif

#ifdef ESP8266
void SetSerialSwap(void) {
Expand Down