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