remove a getPeerAddr(uint8_t[6]) variant
This commit is contained in:
5 files changed
+3
-22
No files matched your search
@@ -7,6 +7,8 @@
|
||||
- Introduce BLEPeriph
|
||||
- setConnInterval(), setConnIntervalMS(), setConnSupervisionTimeout(), setConnSupervisionTimeoutMS()
|
||||
- setDisconnectCallback(), setDisconnectCallback()
|
||||
- Bluefruit
|
||||
- remove getPeerAddr(uint8_t[6]) variant
|
||||
- Enhance Gap, add BLEConnection class to mange peer connection
|
||||
- Remove Gap.connected(), Gap.getRole() in prefer to BLEConnection API
|
||||
- Added setRssiCallback(), monitorRssi(), getRssi(), stopRssi() for tracking rssi of a connection
|
||||
|
||||
@@ -98,12 +98,6 @@ ble_gap_addr_t BLEConnection::getPeerAddr (void)
|
||||
return _addr;
|
||||
}
|
||||
|
||||
uint8_t BLEConnection::getPeerAddr (uint8_t addr[6])
|
||||
{
|
||||
memcpy(addr, _addr.addr, BLE_GAP_ADDR_LEN);
|
||||
return _addr.addr_type;
|
||||
}
|
||||
|
||||
bool BLEConnection::disconnect(void)
|
||||
{
|
||||
return ERROR_NONE == sd_ble_gap_disconnect(_conn_hdl, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
|
||||
|
||||
@@ -75,7 +75,6 @@ class BLEConnection
|
||||
uint16_t getMtu (void);
|
||||
|
||||
ble_gap_addr_t getPeerAddr(void);
|
||||
uint8_t getPeerAddr(uint8_t addr[6]);
|
||||
|
||||
bool disconnect(void);
|
||||
|
||||
|
||||
@@ -586,19 +586,6 @@ ble_gap_addr_t AdafruitBluefruit::getPeerAddr(void)
|
||||
return conn ? conn->getPeerAddr() : ((ble_gap_addr_t) {0});
|
||||
}
|
||||
|
||||
uint8_t AdafruitBluefruit::getPeerAddr(uint8_t addr[6])
|
||||
{
|
||||
BLEConnection* conn = Gap.Connection(_conn_hdl);
|
||||
if ( conn )
|
||||
{
|
||||
return conn->getPeerAddr(addr);
|
||||
}else
|
||||
{
|
||||
memclr(addr, BLE_GAP_ADDR_LEN);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
COMMENT_OUT (
|
||||
bool AdafruitBluefruit::setPIN(const char* pin)
|
||||
{
|
||||
|
||||
@@ -150,8 +150,8 @@ class AdafruitBluefruit
|
||||
/* GAP, Connections and Bonding
|
||||
*------------------------------------------------------------------*/
|
||||
uint8_t connected (void); // Number of connected central
|
||||
bool connected (uint16_t conn_hdl); // connected to a specific central
|
||||
|
||||
bool connected (uint16_t conn_hdl); // connected to a specific central
|
||||
bool disconnect (uint16_t conn_hdl);
|
||||
|
||||
uint16_t connHandle (void);
|
||||
@@ -162,7 +162,6 @@ class AdafruitBluefruit
|
||||
void clearBonds (void);
|
||||
|
||||
ble_gap_addr_t getPeerAddr (void);
|
||||
uint8_t getPeerAddr (uint8_t addr[6]);
|
||||
|
||||
void printInfo(void);
|
||||
|
||||
|
||||
Reference in new issue
Block a user