Added serial pins for esp8266

This commit is contained in:
Magnus
2022-11-19 10:00:36 +01:00
parent 489b268f73
commit 1c3784a223
2 changed files with 56 additions and 56 deletions

View File

@ -96,6 +96,7 @@ build_unflags = ${common_env_data.build_unflags}
build_flags =
${common_env_data.build_flags}
-D LOG_LEVEL=4
#-DUSE_SERIAL_PINS # Use the TX/RX pins for the serial port
lib_deps =
https://github.com/mp-se/incbin # https://github.com/graphitemaster/incbin
${common_env_data.lib_deps}

View File

@ -238,9 +238,8 @@ void printBuildOptions() {
SerialDebug::SerialDebug(const uint32_t serialSpeed) {
// Start serial with auto-detected rate (default to defined BAUD)
#if defined(USE_SERIAL_PINS) && defined(ESP8266)
// EspSerial.begin(serialSpeed, SERIAL_8N1, 3, 1);
EspSerial.begin(serialSpeed);
#warning "SerialPins is not implemented on ESP8266"
uint8_t txPin = 3;
EspSerial.begin(serialSpeed, SERIAL_8N1, SERIAL_TX_ONLY, txPin);
#elif defined(ESP8266)
EspSerial.begin(serialSpeed);
#elif defined(USE_SERIAL_PINS) && defined(ESP32C3)