remove Bluefruit::connPaired() and BLEConnection::paired()
This commit is contained in:
1 parent
cb1a45498b
commit
0391ecac34
8 files changed
+3
-17
No files matched your search
+1
-1
@@ -114,7 +114,7 @@ void loop()
|
||||
{
|
||||
BLEConnection* connection = Bluefruit.Connection(conn_hdl);
|
||||
|
||||
if ( connection && connection->connected() && connection->paired() )
|
||||
if ( connection && connection->connected() && connection->secured() )
|
||||
{
|
||||
// Turn on red LED when we start sending data
|
||||
digitalWrite(LED_RED, 1);
|
||||
|
||||
@@ -69,7 +69,6 @@ disconnect KEYWORD2
|
||||
setConnInterval KEYWORD2
|
||||
setConnIntervalMS KEYWORD2
|
||||
connHandle KEYWORD2
|
||||
connPaired KEYWORD2
|
||||
connInterval KEYWORD2
|
||||
requestPairing KEYWORD2
|
||||
clearBonds KEYWORD2
|
||||
|
||||
@@ -83,11 +83,6 @@ bool BLEConnection::connected(void)
|
||||
return _connected;
|
||||
}
|
||||
|
||||
bool BLEConnection::paired (void)
|
||||
{
|
||||
return secured();
|
||||
}
|
||||
|
||||
bool BLEConnection::bonded(void)
|
||||
{
|
||||
return _bonded;
|
||||
|
||||
@@ -74,7 +74,6 @@ class BLEConnection
|
||||
|
||||
uint16_t handle(void);
|
||||
bool connected(void);
|
||||
bool paired(void); // todo removed
|
||||
bool bonded(void);
|
||||
bool secured(void);
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ void BLEGatt::_eventHandler(ble_evt_t* evt)
|
||||
chr->_eventHandler(evt);
|
||||
|
||||
// Save CCCD if paired
|
||||
if ( conn->paired() && (evt_id == BLE_GATTS_EVT_WRITE) && (req_handle == chr->handles().cccd_handle) )
|
||||
if ( conn->secured() && (evt_id == BLE_GATTS_EVT_WRITE) && (req_handle == chr->handles().cccd_handle) )
|
||||
{
|
||||
conn->saveCccd();
|
||||
}
|
||||
|
||||
@@ -618,12 +618,6 @@ uint16_t AdafruitBluefruit::connHandle(void)
|
||||
return _conn_hdl;
|
||||
}
|
||||
|
||||
bool AdafruitBluefruit::connPaired(uint16_t conn_hdl)
|
||||
{
|
||||
BLEConnection* conn = Bluefruit.Connection(conn_hdl);
|
||||
return conn && conn->paired();
|
||||
}
|
||||
|
||||
uint16_t AdafruitBluefruit::getMaxMtu(uint8_t role)
|
||||
{
|
||||
return (role == BLE_GAP_ROLE_PERIPH) ? _sd_cfg.prph.mtu_max : _sd_cfg.central.mtu_max;
|
||||
|
||||
@@ -166,7 +166,6 @@ class AdafruitBluefruit
|
||||
uint16_t connHandle (void);
|
||||
|
||||
// Alias to BLEConnection API()
|
||||
bool connPaired (uint16_t conn_hdl);
|
||||
bool disconnect (uint16_t conn_hdl);
|
||||
|
||||
uint16_t getMaxMtu(uint8_t role);
|
||||
|
||||
@@ -137,7 +137,7 @@ static void bledfu_control_wr_authorize_cb(uint16_t conn_hdl, BLECharacteristic*
|
||||
// Get Bond Data or using Address if not bonded
|
||||
peer_data->addr = conn->getPeerAddr();
|
||||
|
||||
if ( conn->paired() )
|
||||
if ( conn->secured() )
|
||||
{
|
||||
bond_keys_t bkeys;
|
||||
if ( conn->loadBondKey(&bkeys) )
|
||||
|
||||
Reference in new issue
Block a user