Merge pull request #481 from adafruit/dev2

remove the force Serial connected when debug is eanbled.
This commit is contained in:
Ha Thach authored and GitHub committed 2020-04-13 15:02:47 +07:00
commit d727583ad1
2 files changed
+7 -7

No files matched your search

+2 -6
View File
@@ -46,17 +46,13 @@ static void loop_task(void* arg)
#if CFG_DEBUG
// If Serial is not begin(), call it to avoid hard fault
Serial.begin(115200);
// Wait for Serial connection in debug mode
while ( !Serial ) yield();
dbgPrintVersion();
if(!Serial) Serial.begin(115200);
#endif
setup();
#if CFG_DEBUG
dbgPrintVersion();
Bluefruit_printInfo();
#endif
@@ -24,7 +24,11 @@ BLEBas blebas; // battery
void setup()
{
Serial.begin(115200);
// while ( !Serial ) delay(10); // for nrf52840 with native usb
#if CFG_DEBUG
// Blocking wait for connection when debug mode is enabled via IDE
while ( !Serial ) yield();
#endif
Serial.println("Bluefruit52 BLEUART Example");
Serial.println("---------------------------\n");