Update serial console
This commit is contained in:
parent
bbdbf88a76
commit
d967d8efd9
@ -148,7 +148,7 @@ build_flags =
|
||||
-DCORE_DEBUG_LEVEL=0
|
||||
-DESP32C3
|
||||
-DARDUINO_ESP32C3_DEV
|
||||
-DUSE_SERIAL0
|
||||
-DUSE_SERIAL_PINS # Use the TX/RX pins for the serial port
|
||||
lib_deps =
|
||||
${common_env_data.lib_deps}
|
||||
${common_env_data.lib_deps32}
|
||||
@ -181,7 +181,7 @@ build_flags =
|
||||
-DCORE_DEBUG_LEVEL=0
|
||||
-DESP32S2
|
||||
-DARDUINO_ESP32S2_DEV
|
||||
-DUSE_SERIAL0
|
||||
-DUSE_SERIAL_PINS # Use the TX/RX pins for the serial port
|
||||
lib_deps =
|
||||
${common_env_data.lib_deps}
|
||||
lib_ignore =
|
||||
@ -226,7 +226,7 @@ build_flags =
|
||||
-DCORE_DEBUG_LEVEL=5
|
||||
-DJTAG_DEBUG
|
||||
-DESP32C3
|
||||
-DUSE_SERIAL0
|
||||
-DUSE_SERIAL_PINS # Use the TX/RX pins for the serial port
|
||||
-DARDUINO_ESP32C3_DEV
|
||||
-DCOLLECT_PERFDATA # Collect runtime data for a few defined methods to measure time, dumped to serial and/or influxdb
|
||||
lib_deps =
|
||||
|
@ -237,7 +237,24 @@ 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);
|
||||
#elif defined(ESP8266)
|
||||
EspSerial.begin(serialSpeed, SERIAL_8N1, 3, 1);
|
||||
#elif defined(USE_SERIAL_PINS) && defined(ESP32C3)
|
||||
EspSerial.begin(115200L, SERIAL_8N1, 20, 21);
|
||||
#elif defined(ESP32C3)
|
||||
EspSerial.begin(115200L);
|
||||
#elif defined(USE_SERIAL_PINS) && defined(ESP32S2)
|
||||
EspSerial.begin(115200L, SERIAL_8N1, 37, 39);
|
||||
#elif defined(ESP32S2)
|
||||
EspSerial.begin(115200L);
|
||||
#elif defined(USE_SERIAL_PINS) && defined(ESP32)
|
||||
EspSerial.begin(serialSpeed, SERIAL_8N1, 3, 1);
|
||||
#elif defined(ESP32)
|
||||
EspSerial.begin(115200L);
|
||||
#endif
|
||||
|
||||
EspSerial.println("Serial connection established");
|
||||
getLog()->begin(LOG_LEVEL, &EspSerial, true);
|
||||
getLog()->setPrefix(printTimestamp);
|
||||
|
@ -91,9 +91,9 @@ extern RunMode runMode;
|
||||
// #define PIN_A0 A4
|
||||
#endif
|
||||
|
||||
#if defined(ESP32C3) && defined(USE_SERIAL0)
|
||||
#define EspSerial Serial0
|
||||
// #warning "Using Serial0 for output RX/TX pins on ESP32C3"
|
||||
#if defined(USE_SERIAL_PINS) && defined(ESP32)
|
||||
// #define EspSerial Serial0 // We cant use Serial on newer boards since this is using USBC port
|
||||
#define EspSerial Serial0 // We cant use Serial on newer boards since this is using USBC port
|
||||
#else
|
||||
#define EspSerial Serial
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user