High level Bluetooth Low Energy API and radio abstraction layer

Dependents:   BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate BLE_ANCS_SDAPI_IRC ... more

Overview

The BLE_API is a high level abstraction for using Bluetooth Low Energy on multiple platforms. For details and examples using the BLE_API please see the BLE_API Summary Page. Or click on the API Documentation tab above.

Supported Services

Supported services can be found in the BLE_API/services folder.

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Tue Sep 29 09:47:51 2015 +0100
Parent:
803:50c9096035b1
Child:
805:de2feb3e6e41
Commit message:
Synchronized with git rev 715d0746
Author: Rohit Grover
adding LICENSE at the top level

Changed in this revision

ble/Gap.h Show annotated file Show diff for this revision Revisions of this file
ble/GattCallbackParamTypes.h Show annotated file Show diff for this revision Revisions of this file
--- a/ble/Gap.h	Tue Sep 29 09:47:51 2015 +0100
+++ b/ble/Gap.h	Tue Sep 29 09:47:51 2015 +0100
@@ -301,11 +301,9 @@
     }
 
     /**
-     * Update connection parameters.
-     * In the central role this will initiate a Link Layer connection parameter update procedure,
-     * otherwise in the peripheral role, this will send the corresponding L2CAP request and wait for
-     * the central to perform the procedure.
-     *
+     * Update connection parameters while in the peripheral role.
+     * @details In the peripheral role, this will send the corresponding L2CAP request to the connected peer and wait for
+     *          the central to perform the procedure.
      * @param[in] handle
      *              Connection Handle
      * @param[in] params
@@ -903,16 +901,6 @@
     void onDisconnection(DisconnectionEventCallback_t callback) {disconnectionCallback = callback;}
 
     /**
-     * Append to a chain of callbacks to be invoked upon connection; these
-     * callbacks receive no context and are therefore different from the
-     * connectionCallback callback.
-     * @param callback
-     *        function pointer to be invoked upon connection; receives no context.
-     */
-    template<typename T>
-    void addToConnectionCallChain(T *tptr, void (T::*mptr)(void)) {connectionCallChain.add(tptr, mptr);}
-
-    /**
      * Append to a chain of callbacks to be invoked upon disconnection; these
      * callbacks receive no context and are therefore different from the
      * disconnectionCallback callback.
@@ -972,7 +960,6 @@
         disconnectionCallback(NULL),
         radioNotificationCallback(),
         onAdvertisementReport(),
-        connectionCallChain(),
         disconnectionCallChain() {
         _advPayload.clear();
         _scanResponse.clear();
@@ -992,7 +979,6 @@
             ConnectionCallbackParams_t callbackParams(handle, role, peerAddrType, peerAddr, ownAddrType, ownAddr, connectionParams);
             connectionCallback(&callbackParams);
         }
-        connectionCallChain.call();
     }
 
     void processDisconnectionEvent(Handle_t handle, DisconnectionReason_t reason) {
@@ -1040,7 +1026,6 @@
     DisconnectionEventCallback_t     disconnectionCallback;
     RadioNotificationEventCallback_t radioNotificationCallback;
     AdvertisementReportCallback_t    onAdvertisementReport;
-    CallChain                        connectionCallChain;
     CallChain                        disconnectionCallChain;
 
 private:
--- a/ble/GattCallbackParamTypes.h	Tue Sep 29 09:47:51 2015 +0100
+++ b/ble/GattCallbackParamTypes.h	Tue Sep 29 09:47:51 2015 +0100
@@ -65,9 +65,8 @@
     uint16_t                 offset; /**< Offset for the write operation. */
     uint16_t                 len;    /**< Length of the incoming data. */
     const uint8_t           *data;   /**< Incoming data, variable length. */
-    GattAuthCallbackReply_t  authorizationReply; /* This is the out parameter which needs to be set to
-                                                  * AUTH_CALLBACK_REPLY_SUCCESS by the callback if the
-                                                  * request is to proceed. */
+    GattAuthCallbackReply_t  authorizationReply; /* This is the out parameter which needs to be set to true by the callback if the
+                                                  * request is to proceed; false otherwise. */
 };
 
 struct GattReadAuthCallbackParams {
@@ -76,9 +75,8 @@
     uint16_t                 offset; /**< Offset for the read operation. */
     uint16_t                 len;    /**< Optional: new length of the outgoing data. */
     uint8_t                 *data;   /**< Optional: new outgoing data. Leave at NULL if data is unchanged. */
-    GattAuthCallbackReply_t  authorizationReply; /* This is the out parameter which needs to be set to
-                                                  * AUTH_CALLBACK_REPLY_SUCCESS by the callback if the
-                                                  * request is to proceed. */
+    GattAuthCallbackReply_t  authorizationReply; /* This is the out parameter which needs to be set to true by the callback if the
+                                                  * request is to proceed; false otherwise. */
 };
 
 /* For encapsulating handle-value update events (notifications or indications) generated at the remote server. */