Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: BLE_PowerBank_HeyFaradey
Fork of BLE_API by
Diff: ble/Gap.h
- Revision:
- 1107:93b0b9304c53
- Parent:
- 1104:0244fbb0324e
- Child:
- 1108:ce7f6dbab398
--- 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.
