diff --git a/ESP32/console_esp32.cpp b/ESP32/console_esp32.cpp index 5924311..efb9858 100644 --- a/ESP32/console_esp32.cpp +++ b/ESP32/console_esp32.cpp @@ -37,7 +37,7 @@ int console_esp32::wait_for_char_ll(const short timeout) void console_esp32::put_char_ll(const char c) { - for(auto & port : io_ports) + for(auto port : io_ports) port->print(c); } diff --git a/ESP32/main.ino b/ESP32/main.ino index 0b283b4..50fb914 100644 --- a/ESP32/main.ino +++ b/ESP32/main.ino @@ -2,6 +2,7 @@ // Released under Apache License v2.0 #include #include +#include #include #include #include @@ -41,6 +42,8 @@ std::atomic_bool *running { nullptr }; bool trace_output { false }; +HardwareSerial Serial_RS232(2); + // std::atomic_bool on_wifi { false }; void console_thread_wrapper_panel(void *const c) @@ -318,7 +321,12 @@ void setup() { b->add_cpu(c); Serial.println(F("Init console")); - std::vector serial_ports { &Serial, &Serial1 }; + constexpr uint32_t hwSerialConfig = SERIAL_8N1; + Serial_RS232.begin(115200, hwSerialConfig, 16, 17); + Serial_RS232.setHwFlowCtrlMode(0); + Serial_RS232.println(F("Console enabled on TTY")); + + std::vector serial_ports { &Serial_RS232, &Serial }; cnsl = new console_esp32(&stop_event, b, serial_ports); Serial.println(F("Start line-frequency interrupt")); diff --git a/README.md b/README.md index d256afd..492efe3 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Wiring of SDCARD (or use disk-images exported via NBD over wifi using nbdkit (be * SS : 5 * and of course connect VCC/GND of the SD-card +Wiring of the MAX232 connection: +* TX : 22 +* RX : 21 + Released under Apache License v2.0