Hotfix for backward compatibility
for change from Gap:AddressType_t to BLEProtocol::AddressType_t
This commit is contained in:
parent
3036b058fe
commit
7398a396d7
1 changed files with 17 additions and 1 deletions
18
ble/Gap.h
18
ble/Gap.h
|
@ -57,7 +57,7 @@ public:
|
|||
* deprecated state to transparenly support existing applications which may
|
||||
* have used Gap::ADDR_TYPE_*.
|
||||
*/
|
||||
enum {
|
||||
enum AddressTypeOverload_t {
|
||||
ADDR_TYPE_PUBLIC = BLEProtocol::AddressType::PUBLIC,
|
||||
ADDR_TYPE_RANDOM_STATIC = BLEProtocol::AddressType::RANDOM_STATIC,
|
||||
ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE = BLEProtocol::AddressType::RANDOM_PRIVATE_RESOLVABLE,
|
||||
|
@ -275,6 +275,22 @@ public:
|
|||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a connection (GAP Link Establishment).
|
||||
*
|
||||
* @note: deprecated. This funtion overloads Gap::connect(const BLEProtocol::Address_t peerAddr,
|
||||
BLEProtocol::AddressType_t peerAddrType,
|
||||
const ConnectionParams_t *connectionParams,
|
||||
const GapScanningParams *scanParams)
|
||||
* to maintain backward compatibility for change from Gap::AddressType_t to BLEProtocol::AddressType_t
|
||||
*/
|
||||
ble_error_t connect(const BLEProtocol::Address_t peerAddr,
|
||||
AddressTypeOverload_t peerAddrType,
|
||||
const ConnectionParams_t *connectionParams,
|
||||
const GapScanningParams *scanParams) {
|
||||
return connect(peerAddr, (BLEProtocol::AddressType_t) peerAddrType, connectionParams, scanParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* This call initiates the disconnection procedure, and its completion will
|
||||
* be communicated to the application with an invocation of the
|
||||
|
|
Loading…
Reference in a new issue