High level Bluetooth Low Energy API and radio abstraction layer

Fork of BLE_API by Bluetooth Low Energy

Revision:
1107:93b0b9304c53
Parent:
1104:0244fbb0324e
Child:
1108:ce7f6dbab398
diff -r 1a25c4e7407a -r 93b0b9304c53 ble/Gap.h
--- 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.