Add option USB CDC to be used for Serial (starting USB early)

This commit is contained in:
me-no-dev
2020-07-22 19:16:22 +03:00
parent 4967f19513
commit 1a7a928b64
9 changed files with 33 additions and 3 deletions

View File

@ -113,8 +113,13 @@ protected:
extern void serialEventRun(void) __attribute__((weak));
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
#if ARDUINO_SERIAL_PORT //Serial used for USB CDC
#include "USB.h"
#include "USBCDC.h"
extern HardwareSerial Serial0;
#else
extern HardwareSerial Serial;
extern HardwareSerial Serial1;
#endif
#if CONFIG_IDF_TARGET_ESP32
extern HardwareSerial Serial2;
#endif