BLE
Fork of BLE_API by
Revision 1108:93b0b9304c53, committed 2016-01-11
- Comitter:
- vcoubard
- Date:
- Mon Jan 11 08:51:57 2016 +0000
- Parent:
- 1107:1a25c4e7407a
- Child:
- 1109:ce7f6dbab398
- Commit message:
- Synchronized with git rev 7398a396
Author: Liyou Zhou
Hotfix for backward compatibility
for change from Gap:AddressType_t to BLEProtocol::AddressType_t
Changed in this revision
ble/Gap.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/ble/Gap.h Mon Jan 11 08:51:57 2016 +0000 +++ b/ble/Gap.h Mon Jan 11 08:51:57 2016 +0000 @@ -57,7 +57,7 @@ * 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, @@ -276,6 +276,22 @@ } /** + * 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 * disconnectionCallback.