|
@ -56,8 +56,12 @@ |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#include "../../core/serial_hook.h" |
|
|
#include "../../core/serial_hook.h" |
|
|
typedef Serial1Class<decltype(Serial)> DefaultSerial1; |
|
|
#define Serial0 Serial |
|
|
extern DefaultSerial1 MSerial0; |
|
|
#define _DECLARE_SERIAL(X) \ |
|
|
|
|
|
typedef ForwardSerial1Class<decltype(Serial##X)> DefaultSerial##X; \ |
|
|
|
|
|
extern DefaultSerial##X MSerial##X |
|
|
|
|
|
#define DECLARE_SERIAL(X) _DECLARE_SERIAL(X) |
|
|
|
|
|
|
|
|
typedef ForwardSerial1Class<decltype(SerialUSB)> USBSerialType; |
|
|
typedef ForwardSerial1Class<decltype(SerialUSB)> USBSerialType; |
|
|
extern USBSerialType USBSerial; |
|
|
extern USBSerialType USBSerial; |
|
|
|
|
|
|
|
@ -67,6 +71,7 @@ extern USBSerialType USBSerial; |
|
|
#if SERIAL_PORT == -1 |
|
|
#if SERIAL_PORT == -1 |
|
|
#define MYSERIAL1 SerialUSB |
|
|
#define MYSERIAL1 SerialUSB |
|
|
#elif WITHIN(SERIAL_PORT, 0, 8) |
|
|
#elif WITHIN(SERIAL_PORT, 0, 8) |
|
|
|
|
|
DECLARE_SERIAL(SERIAL_PORT); |
|
|
#define MYSERIAL1 MSERIAL(SERIAL_PORT) |
|
|
#define MYSERIAL1 MSERIAL(SERIAL_PORT) |
|
|
#else |
|
|
#else |
|
|
#error "The required SERIAL_PORT must be from -1 to 8. Please update your configuration." |
|
|
#error "The required SERIAL_PORT must be from -1 to 8. Please update your configuration." |
|
|