update nrf crypto
This commit is contained in:
1 parent
6a22fa5a9a
commit
96dc54aeb8
3 files changed
+13
-5
No files matched your search
Submodule libraries/Adafruit_nRFCrypto updated: 9b62a1b9a3...48b08a59d1.
@@ -22,7 +22,11 @@
|
||||
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 Clear Bonds Example");
|
||||
Serial.println("-------------------------------\n");
|
||||
|
||||
@@ -119,7 +119,8 @@ void setup()
|
||||
|
||||
// Configure and Start BLE Uart Service
|
||||
// Set Permission to access BLE Uart is to require man-in-the-middle protection
|
||||
// This will cause central to perform pairing with static PIN we set above
|
||||
// This will cause central to perform pairing with a generated passkey, the passkey will
|
||||
// be printed on display or Serial and wait for our input
|
||||
Serial.println("Configure BLE Uart to require man-in-the-middle protection for PIN pairing");
|
||||
bleuart.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM);
|
||||
bleuart.begin();
|
||||
@@ -266,7 +267,7 @@ bool pairing_passkey_callback(uint16_t conn_handle, uint8_t const passkey[6], bo
|
||||
uint32_t justReleased;
|
||||
do
|
||||
{
|
||||
// Disconnected while waiting for input
|
||||
// Peer is disconnected while waiting for input
|
||||
if ( !Bluefruit.connected(conn_handle) ) break;
|
||||
|
||||
// time out
|
||||
@@ -286,7 +287,7 @@ bool pairing_passkey_callback(uint16_t conn_handle, uint8_t const passkey[6], bo
|
||||
// wait until either button is pressed (30 seconds timeout)
|
||||
while( digitalRead(BUTTON_YES) && digitalRead(BUTTON_NO) )
|
||||
{
|
||||
// Disconnected while waiting for input
|
||||
// Peer is disconnected while waiting for input
|
||||
if ( !Bluefruit.connected(conn_handle) ) break;
|
||||
|
||||
// time out
|
||||
@@ -355,6 +356,9 @@ void disconnect_callback(uint16_t conn_handle, uint8_t reason)
|
||||
Serial.print("Disconnected, reason = 0x"); Serial.println(reason, HEX);
|
||||
|
||||
#ifdef USE_ARCADA
|
||||
tft->fillScreen(ARCADA_BLACK);
|
||||
tft->setTextSize(2);
|
||||
tft->setCursor(0, 0);
|
||||
tft->println("Advertising ...");
|
||||
#endif
|
||||
}
|
||||
Reference in new issue
Block a user