diff --git a/ESP32/esp32.h b/ESP32/esp32.h index b7554d8..750c667 100644 --- a/ESP32/esp32.h +++ b/ESP32/esp32.h @@ -18,5 +18,5 @@ // #define HEARTBEAT_PIN LED_BUILTIN #define HEARTBEAT_PIN 25 -// #define CONSOLE_SERIAL_RX 16 -// #define CONSOLE_SERIAL_TX 17 +// #define TTY_SERIAL_RX 16 +// #define TTY_SERIAL_TX 17 diff --git a/ESP32/main.ino b/ESP32/main.ino index 804a5d6..890003f 100644 --- a/ESP32/main.ino +++ b/ESP32/main.ino @@ -54,8 +54,8 @@ constexpr const char SERIAL_CFG_FILE[] = "/serial.json"; #if defined(BUILD_FOR_RP2040) #define Serial_RS232 Serial1 -#elif defined(CONSOLE_SERIAL_RX) -HardwareSerial Serial_RS232(1); +#elif defined(TTY_SERIAL_RX) +HardwareSerial Serial_RS232(2); #endif bus *b = nullptr; @@ -212,7 +212,7 @@ void start_network(console *const c) dc11 *dc11_ = new dc11(1100, b); b->add_DC11(dc11_); -#if !defined(BUILD_FOR_RP2040) && defined(CONSOLE_SERIAL_RX) +#if !defined(BUILD_FOR_RP2040) && defined(TTY_SERIAL_RX) constexpr uint32_t hwSerialConfig = SERIAL_8N1; uint32_t bitrate = load_serial_speed_configuration(); @@ -220,7 +220,7 @@ void start_network(console *const c) Serial.print(bitrate); Serial.println(F("bps")); - Serial_RS232.begin(bitrate, hwSerialConfig, CONSOLE_SERIAL_RX, CONSOLE_SERIAL_TX); + Serial_RS232.begin(bitrate, hwSerialConfig, TTY_SERIAL_RX, TTY_SERIAL_TX); Serial_RS232.setHwFlowCtrlMode(0); dc11_->set_serial(&Serial_RS232); @@ -243,7 +243,7 @@ void recall_configuration(console *const cnsl) } #endif -#if defined(CONSOLE_SERIAL_RX) +#if defined(TTY_SERIAL_RX) void set_tty_serial_speed(console *const c, const uint32_t bps) { Serial_RS232.begin(bps); diff --git a/ESP32/platformio.ini b/ESP32/platformio.ini index edc8d7a..7b310ee 100644 --- a/ESP32/platformio.ini +++ b/ESP32/platformio.ini @@ -47,7 +47,7 @@ board_build.filesystem = littlefs lib_deps = greiman/SdFat@^2.1.2 adafruit/Adafruit NeoPixel bblanchon/ArduinoJson@^6.19.4 -build_flags = -std=gnu++17 -DESP32=1 -ggdb3 -D_GLIBCXX_USE_C99 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -DCONFIG_SPIRAM_USE_MALLOC +build_flags = -std=gnu++17 -DESP32=1 -ggdb3 -D_GLIBCXX_USE_C99 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -DCONFIG_SPIRAM_USE_MALLOC -DTTY_SERIAL_RX=4 -DTTY_SERIAL_TX=15 build_unflags = -std=gnu++11 extra_scripts = pre:prepare.py