sangaboard-firmware/lib/ComPort/ComPort.cpp
Richard Bowman 3997d66cde Merge in com port switching from sangaboard v4
I've refactored the use of the serial port, to store the
current serial port in a global variable in a module.
This is set to the most recent port to receive data,
and so we should always be replying to the port
that was used to initiate a command.

If SECONDARY_SERIAL_PORT is not defined, this
should result in no change - if it is, we should be
able to communicate on either port.
2023-02-22 12:05:48 +00:00

4 lines
No EOL
141 B
C++

#include <ComPort.h>
// Actually define the variable and default to the USB Serial port
HardwareSerial* comPort = (HardwareSerial*) &Serial;