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)
46
46
47
47
#if CFG_DEBUG
48
48
// 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 );
55
50
#endif
56
51
57
52
setup ();
58
53
59
54
#if CFG_DEBUG
55
+ dbgPrintVersion ();
60
56
Bluefruit_printInfo ();
61
57
#endif
62
58
Original file line number Diff line number Diff line change @@ -24,7 +24,11 @@ BLEBas blebas; // battery
24
24
void setup ()
25
25
{
26
26
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
28
32
29
33
Serial.println (" Bluefruit52 BLEUART Example" );
30
34
Serial.println (" ---------------------------\n " );
You can’t perform that action at this time.
0 commit comments