Finally
This commit is contained in:
Luc
2020-11-02 11:32:46 +01:00
parent b3f3af997f
commit bb2b7a8e62
6 changed files with 32 additions and 4 deletions

View File

@@ -21,6 +21,10 @@
#include "../include/esp3d_config.h"
#if defined(ESP_DEBUG_FEATURE)
#ifndef DEBUG_BAUDRATE
#define DEBUG_BAUDRATE 115200
#ndif //~DEBUG_BAUDRATE
#if defined(ARDUINO_ARCH_ESP8266)
const char * pathToFileName(const char * path)
{
@@ -38,6 +42,19 @@ const char * pathToFileName(const char * path)
}
#endif //ARDUINO_ARCH_ESP8266
void initDebug()
{
#ifdef ARDUINO_ARCH_ESP8266
DEBUG_OUTPUT_SERIAL.begin(DEBUG_BAUDRATE, SERIAL_8N1, SERIAL_FULL, (ESP_DEBUG_TX_PIN == -1)?1:ESP_DEBUG_TX_PIN);
#if ESP_DEBUG_RX_PIN != -1
DEBUG_OUTPUT_SERIAL.pins((ESP_DEBUG_TX_PIN == -1)?1:ESP_DEBUG_TX_PIN, ESP_DEBUG_RX_PIN)
#endif //ESP_DEBUG_RX_PIN != -1
#endif //ARDUINO_ARCH_ESP8266
#if defined(ARDUINO_ARCH_ESP32)
DEBUG_OUTPUT_SERIAL.begin (DEBUG_BAUDRATE, SERIAL_8N1, ESP_DEBUG_RX_PIN, ESP_DEBUG_TX_PIN);
#endif //ARDUINO_ARCH_ESP32
}
//Telnet
#if ESP_DEBUG_FEATURE == DEBUG_OUTPUT_TELNET
Telnet_Server telnet_debug;