Skip to content

Commit 96dc54a

Browse files
committed
update nrf crypto
1 parent 6a22fa5 commit 96dc54a

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

libraries/Bluefruit52Lib/examples/Peripheral/clearbonds/clearbonds.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
void setup()
2323
{
2424
Serial.begin(115200);
25-
// while ( !Serial ) delay(10); // for nrf52840 with native usb
25+
26+
#if CFG_DEBUG
27+
// Blocking wait for connection when debug mode is enabled via IDE
28+
while ( !Serial ) yield();
29+
#endif
2630

2731
Serial.println("Bluefruit52 Clear Bonds Example");
2832
Serial.println("-------------------------------\n");

libraries/Bluefruit52Lib/examples/Peripheral/pairing_passkey/pairing_passkey.ino

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ void setup()
119119

120120
// Configure and Start BLE Uart Service
121121
// Set Permission to access BLE Uart is to require man-in-the-middle protection
122-
// This will cause central to perform pairing with static PIN we set above
122+
// This will cause central to perform pairing with a generated passkey, the passkey will
123+
// be printed on display or Serial and wait for our input
123124
Serial.println("Configure BLE Uart to require man-in-the-middle protection for PIN pairing");
124125
bleuart.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM);
125126
bleuart.begin();
@@ -266,7 +267,7 @@ bool pairing_passkey_callback(uint16_t conn_handle, uint8_t const passkey[6], bo
266267
uint32_t justReleased;
267268
do
268269
{
269-
// Disconnected while waiting for input
270+
// Peer is disconnected while waiting for input
270271
if ( !Bluefruit.connected(conn_handle) ) break;
271272

272273
// time out
@@ -286,7 +287,7 @@ bool pairing_passkey_callback(uint16_t conn_handle, uint8_t const passkey[6], bo
286287
// wait until either button is pressed (30 seconds timeout)
287288
while( digitalRead(BUTTON_YES) && digitalRead(BUTTON_NO) )
288289
{
289-
// Disconnected while waiting for input
290+
// Peer is disconnected while waiting for input
290291
if ( !Bluefruit.connected(conn_handle) ) break;
291292

292293
// time out
@@ -355,6 +356,9 @@ void disconnect_callback(uint16_t conn_handle, uint8_t reason)
355356
Serial.print("Disconnected, reason = 0x"); Serial.println(reason, HEX);
356357

357358
#ifdef USE_ARCADA
359+
tft->fillScreen(ARCADA_BLACK);
360+
tft->setTextSize(2);
361+
tft->setCursor(0, 0);
358362
tft->println("Advertising ...");
359363
#endif
360364
}

0 commit comments

Comments
 (0)