Skip to content

Commit a860206

Browse files
committed
callback rename
1 parent c322f4c commit a860206

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

libraries/Bluefruit52Lib/examples/Central/central_pairing/central_pairing.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ void setup()
104104
// For complete mapping of the IO Capabilities to Key Generation Method, check out this article
105105
// https://www.bluetooth.com/blog/bluetooth-pairing-part-2-key-generation-methods/
106106
Bluefruit.Security.setIOCaps(true, true, false); // display = true, yes/no = true, keyboard = false
107-
Bluefruit.Security.setPasskeyCallback(pairing_passkey_callback);
107+
Bluefruit.Security.setPairPasskeyCallback(pairing_passkey_callback);
108108

109109
// Set complete callback to print the pairing result
110-
Bluefruit.Security.setCompleteCallback(pairing_complete_callback);
110+
Bluefruit.Security.setPairCompleteCallback(pairing_complete_callback);
111111

112112
// Set connection secured callback, invoked when connection is encrypted
113113
Bluefruit.Security.setSecuredCallback(connection_secured_callback);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ void setup()
106106
* https://www.bluetooth.com/blog/bluetooth-pairing-part-2-key-generation-methods/
107107
*/
108108
Bluefruit.Security.setIOCaps(true, true, false); // display = true, yes/no = true, keyboard = false
109-
Bluefruit.Security.setPasskeyCallback(pairing_passkey_callback);
109+
Bluefruit.Security.setPairPasskeyCallback(pairing_passkey_callback);
110110

111111
// Set complete callback to print the pairing result
112-
Bluefruit.Security.setCompleteCallback(pairing_complete_callback);
112+
Bluefruit.Security.setPairCompleteCallback(pairing_complete_callback);
113113

114114
// Set connection secured callback, invoked when connection is encrypted
115115
Bluefruit.Security.setSecuredCallback(connection_secured_callback);

libraries/Bluefruit52Lib/src/BLESecurity.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ bool BLESecurity::setPIN(const char* pin)
197197
}
198198

199199
// Pairing using LESC with peripheral display
200-
bool BLESecurity::setPasskeyCallback(pair_passkey_cb_t fp)
200+
bool BLESecurity::setPairPasskeyCallback(pair_passkey_cb_t fp)
201201
{
202202
_passkey_cb = fp;
203203

@@ -207,12 +207,12 @@ bool BLESecurity::setPasskeyCallback(pair_passkey_cb_t fp)
207207
return true;
208208
}
209209

210-
void BLESecurity::setCompleteCallback(pair_complete_cb_t fp)
210+
void BLESecurity::setPairCompleteCallback(pair_complete_cb_t fp)
211211
{
212212
_complete_cb = fp;
213213
}
214214

215-
void BLESecurity::setSecuredCallback(pair_secured_cb_t fp)
215+
void BLESecurity::setSecuredCallback(secured_conn_cb_t fp)
216216
{
217217
_secured_cb = fp;
218218
}

libraries/Bluefruit52Lib/src/BLESecurity.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class BLESecurity
3737
public:
3838
typedef bool (*pair_passkey_cb_t ) (uint16_t conn_hdl, uint8_t const passkey[6], bool match_request);
3939
typedef void (*pair_complete_cb_t) (uint16_t conn_hdl, uint8_t auth_status);
40-
typedef void (*pair_secured_cb_t) (uint16_t conn_hdl);
40+
typedef void (*secured_conn_cb_t) (uint16_t conn_hdl);
4141

4242
BLESecurity(void);
4343

@@ -56,9 +56,9 @@ class BLESecurity
5656
bool resolveAddress(ble_gap_addr_t const * p_addr, ble_gap_irk_t const * irk);
5757

5858
//------------- Callbacks -------------//
59-
bool setPasskeyCallback(pair_passkey_cb_t fp);
60-
void setCompleteCallback(pair_complete_cb_t fp);
61-
void setSecuredCallback(pair_secured_cb_t fp);
59+
bool setPairPasskeyCallback(pair_passkey_cb_t fp);
60+
void setPairCompleteCallback(pair_complete_cb_t fp);
61+
void setSecuredCallback(secured_conn_cb_t fp);
6262

6363
/*------------------------------------------------------------------*/
6464
/* INTERNAL USAGE ONLY
@@ -83,7 +83,7 @@ class BLESecurity
8383

8484
pair_passkey_cb_t _passkey_cb;
8585
pair_complete_cb_t _complete_cb;
86-
pair_secured_cb_t _secured_cb;
86+
secured_conn_cb_t _secured_cb;
8787
};
8888

8989
#endif /* BLESECURITY_H_ */

0 commit comments

Comments
 (0)