multiple console ports
This commit is contained in:
parent
97ba6fd41b
commit
75ee217530
3 changed files with 14 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Released under Apache License v2.0
|
||||
#include <Arduino.h>
|
||||
#include <atomic>
|
||||
#include <HardwareSerial.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
@ -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<Stream *> 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<Stream *> serial_ports { &Serial_RS232, &Serial };
|
||||
cnsl = new console_esp32(&stop_event, b, serial_ports);
|
||||
|
||||
Serial.println(F("Start line-frequency interrupt"));
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue