High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Fri Jun 19 15:52:04 2015 +0100
Parent:
507:77c551e72d06
Child:
509:fc2a15248577
Commit message:
Synchronized with git rev 06deb965
Author: Rohit Grover
GattClient now reuses GattCharacteristicReadCBParams

Changed in this revision

public/DiscoveredCharacteristic.h Show annotated file Show diff for this revision Revisions of this file
public/GattClient.h Show annotated file Show diff for this revision Revisions of this file
--- a/public/DiscoveredCharacteristic.h	Fri Jun 19 15:52:04 2015 +0100
+++ b/public/DiscoveredCharacteristic.h	Fri Jun 19 15:52:04 2015 +0100
@@ -22,7 +22,6 @@
 #include "GattAttribute.h"
 #include "GattClient.h"
 
-
 /**
  * Structure for holding information about the service and the characteristics
  * found during the discovery process.
@@ -154,7 +153,7 @@
     Gap::Handle_t           connHandle;
 
 public:
-    static ReadCallback_t   onDataReadCallback;
+    static GattClient::ReadCallback_t onDataReadCallback;
 };
 
 #endif /*__DISCOVERED_CHARACTERISTIC_H__*/
\ No newline at end of file
--- a/public/GattClient.h	Fri Jun 19 15:52:04 2015 +0100
+++ b/public/GattClient.h	Fri Jun 19 15:52:04 2015 +0100
@@ -21,15 +21,11 @@
 #include "GattAttribute.h"
 #include "ServiceDiscovery.h"
 
+#include "GattCharacteristicCallbackParams.h"
+
 class GattClient {
 public:
-    struct ReadResponse_t {
-        GattAttribute::Handle_t  handle; /**< Attribute Handle. */
-        uint16_t                 offset; /**< Offset of the attribute data. */
-        uint16_t                 len;    /**< Attribute data length. */
-        const uint8_t           *data;   /**< Attribute data, variable length. */
-    };
-    typedef void (*ReadCallback_t)(const ReadResponse_t *params);
+    typedef void (*ReadCallback_t)(const GattCharacteristicReadCBParams *params);
 
     enum WriteOp_t {
         GATT_OP_INVALID        = 0x00,  /**< Invalid Operation. */
@@ -40,14 +36,7 @@
         GATT_OP_EXEC_WRITE_REQ = 0x05,  /**< Execute Write Request. */
     };
 
-    struct WriteResponse_t {
-        GattAttribute::Handle_t  handle;  /**< Attribute Handle. */
-        WriteOp_t                writeOp;
-        uint16_t                 offset;  /**< Offset of the attribute data. */
-        uint16_t                 len;     /**< Attribute data length. */
-        const uint8_t           *data;    /**< Attribute data, variable length. */
-    };
-    typedef void (*WriteCallback_t)(const WriteResponse_t *params);
+    typedef void (*WriteCallback_t)(const GattCharacteristicWriteCBParams *params);
 
 public:
     /**