add mandatory build flags for -S2 and -C3 (virtual USB)
I was wondering why sometimes the new MCUs still work better in Arduino IDE, so compared our build flags to what is used in Arduino IDE: -S2 always has -DARDUINO_USB_MODE=0 -C3 always has -DARDUINO_USB_MODE=1 -S3 supports all possible modes
This commit is contained in:
@@ -268,7 +268,10 @@ void WLED::setup()
|
||||
#endif
|
||||
|
||||
Serial.begin(115200);
|
||||
Serial.setTimeout(50);
|
||||
#if !ARDUINO_USB_CDC_ON_BOOT
|
||||
Serial.setTimeout(50); // this causes troubles on new MCUs that have a "virtual" USB Serial (HWCDC)
|
||||
#else
|
||||
#endif
|
||||
#if defined(WLED_DEBUG) && defined(ARDUINO_ARCH_ESP32) && (defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || ARDUINO_USB_CDC_ON_BOOT)
|
||||
delay(2500); // allow CDC USB serial to initialise
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user