File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
libraries/Bluefruit52Lib/examples/Peripheral/bleuart Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -46,17 +46,13 @@ static void loop_task(void* arg)
4646
4747#if CFG_DEBUG
4848 // If Serial is not begin(), call it to avoid hard fault
49- Serial.begin (115200 );
50-
51- // Wait for Serial connection in debug mode
52- while ( !Serial ) yield ();
53-
54- dbgPrintVersion ();
49+ if (!Serial) Serial.begin (115200 );
5550#endif
5651
5752 setup ();
5853
5954#if CFG_DEBUG
55+ dbgPrintVersion ();
6056 Bluefruit_printInfo ();
6157#endif
6258
Original file line number Diff line number Diff line change @@ -24,7 +24,11 @@ BLEBas blebas; // battery
2424void setup ()
2525{
2626 Serial.begin (115200 );
27- // while ( !Serial ) delay(10); // for nrf52840 with native usb
27+
28+ #if CFG_DEBUG
29+ // Blocking wait for connection when debug mode is enabled via IDE
30+ while ( !Serial ) yield ();
31+ #endif
2832
2933 Serial.println (" Bluefruit52 BLEUART Example" );
3034 Serial.println (" ---------------------------\n " );
You can’t perform that action at this time.
0 commit comments