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.

Revision:
1179:4ab722f8dca0
Parent:
1162:2cb412b35d95
Child:
1183:1589830dbdb7
--- a/ble/GattCallbackParamTypes.h	Wed Apr 06 19:15:28 2016 +0100
+++ b/ble/GattCallbackParamTypes.h	Wed Apr 06 19:15:30 2016 +0100
@@ -18,9 +18,6 @@
 #define __GATT_CALLBACK_PARAM_TYPES_H__
 
 struct GattWriteCallbackParams {
-    /**
-     * Enumeration for write operations.
-     */
     enum WriteOp_t {
         OP_INVALID               = 0x00,  /**< Invalid operation. */
         OP_WRITE_REQ             = 0x01,  /**< Write request. */
@@ -31,32 +28,20 @@
         OP_EXEC_WRITE_REQ_NOW    = 0x06,  /**< Execute write request: immediately execute all prepared writes. */
     };
 
-    Gap::Handle_t            connHandle; /**< The handle of the connection that triggered the event */
-    GattAttribute::Handle_t  handle;     /**< Attribute Handle to which the write operation applies. */
-    WriteOp_t                writeOp;    /**< Type of write operation. */
-    uint16_t                 offset;     /**< Offset for the write operation. */
-    uint16_t                 len;        /**< Length (in bytes) of the data to write. */
-    /**
-     * Pointer to the data to write.
-     *
-     * @note Data might not persist beyond the callback; make a local copy if
-     *       needed.
-     */
-    const uint8_t           *data;
+    Gap::Handle_t            connHandle;
+    GattAttribute::Handle_t  handle;
+    WriteOp_t                writeOp; /**< Type of write operation. */
+    uint16_t                 offset;  /**< Offset for the write operation. */
+    uint16_t                 len;
+    const uint8_t           *data;    /* @note: Data might not persist beyond the callback; make a local copy if needed. */
 };
 
 struct GattReadCallbackParams {
-    Gap::Handle_t            connHandle; /**< The handle of the connection that triggered the event */
-    GattAttribute::Handle_t  handle;     /**< Attribute Handle to which the read operation applies. */
-    uint16_t                 offset;     /**< Offset for the read operation. */
-    uint16_t                 len;        /**< Length (in bytes) of the data to read. */
-    /**
-     * Pointer to the data read.
-     *
-     * @note Data might not persist beyond the callback; make a local copy if
-     *       needed.
-     */
-    const uint8_t           *data;
+    Gap::Handle_t            connHandle;
+    GattAttribute::Handle_t  handle;
+    uint16_t                 offset;  /**< Offset for the read operation. */
+    uint16_t                 len;
+    const uint8_t           *data;    /* @note: Data might not persist beyond the callback; make a local copy if needed. */
 };
 
 enum GattAuthCallbackReply_t {
@@ -75,41 +60,34 @@
 };
 
 struct GattWriteAuthCallbackParams {
-    Gap::Handle_t            connHandle; /**< The handle of the connection that triggered the event */
-    GattAttribute::Handle_t  handle;     /**< Attribute Handle to which the write operation applies. */
-    uint16_t                 offset;     /**< Offset for the write operation. */
-    uint16_t                 len;        /**< Length of the incoming data. */
-    const uint8_t           *data;       /**< Incoming data, variable length. */
-    /**
-     * This is the out parameter that the callback needs to set to
-     * AUTH_CALLBACK_REPLY_SUCCESS for the request to proceed.
-     */
-    GattAuthCallbackReply_t  authorizationReply;
+    Gap::Handle_t            connHandle;
+    GattAttribute::Handle_t  handle;
+    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 that the callback 
+                                                  * needs to set to AUTH_CALLBACK_REPLY_SUCCESS 
+                                                  * for the request to proceed. */
 };
 
 struct GattReadAuthCallbackParams {
-    Gap::Handle_t            connHandle; /**< The handle of the connection that triggered the event */
-    GattAttribute::Handle_t  handle;     /**< Attribute Handle to which the read operation applies. */
-    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. */
-    /**
-     * This is the out parameter that the callback needs to set to
-     * AUTH_CALLBACK_REPLY_SUCCESS for the request to proceed.
-     */
-    GattAuthCallbackReply_t  authorizationReply;
+    Gap::Handle_t            connHandle;
+    GattAttribute::Handle_t  handle;
+    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 that the callback
+                                                  * needs to set to AUTH_CALLBACK_REPLY_SUCCESS
+                                                  * for the request to proceed. */
 };
 
-/**
- * For encapsulating handle-value update events (notifications or indications)
- * generated at the remote server.
- */
+/* For encapsulating handle-value update events (notifications or indications) generated at the remote server. */
 struct GattHVXCallbackParams {
-  Gap::Handle_t            connHandle; /**< The handle of the connection that triggered the event */
-  GattAttribute::Handle_t  handle;     /**< Attribute Handle to which the HVx operation applies. */
-  HVXType_t                type;       /**< Indication or Notification, see HVXType_t. */
-  uint16_t                 len;        /**< Attribute data length. */
-  const uint8_t           *data;       /**< Attribute data, variable length. */
+  Gap::Handle_t            connHandle;
+  GattAttribute::Handle_t  handle; /**< Attribute Handle to which the HVx operation applies. */
+  HVXType_t                type;   /**< Indication or Notification, see @ref HVXType_t. */
+  uint16_t                 len;    /**< Attribute data length. */
+  const uint8_t           *data;   /**< Attribute data, variable length. */
 };
 
 #endif /*__GATT_CALLBACK_PARAM_TYPES_H__*/
\ No newline at end of file