Skip to content

Commit a557014

Browse files
committed
skip wait for Serial in bleuart sketch
1 parent 49028ba commit a557014

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

cores/nRF5/main.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,19 @@ static void loop_task(void* arg)
4444
{
4545
(void) arg;
4646

47-
setup();
48-
4947
#if CFG_DEBUG
5048
// If Serial is not begin(), call it to avoid hard fault
5149
if ( !Serial ) Serial.begin(115200);
50+
51+
// Wait for Serial connection in debug mode
52+
while ( !Serial ) yield();
53+
5254
dbgPrintVersion();
53-
// dbgMemInfo();
55+
#endif
56+
57+
setup();
58+
59+
#if CFG_DEBUG
5460
Bluefruit_printInfo();
5561
#endif
5662

libraries/Bluefruit52Lib/examples/Peripheral/bleuart/bleuart.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ BLEBas blebas; // battery
2424
void setup()
2525
{
2626
Serial.begin(115200);
27-
while ( !Serial ) delay(10); // for nrf52840 with native usb
27+
// while ( !Serial ) delay(10); // for nrf52840 with native usb
2828

2929
Serial.println("Bluefruit52 BLEUART Example");
3030
Serial.println("---------------------------\n");

0 commit comments

Comments
 (0)