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