Nordic Semiconductor / nRF51822

Dependents:   BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate writable_gatt ... more

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Fri Jun 19 15:55:32 2015 +0100
Parent:
329:d11ef9cc041b
Child:
331:352bc4a36ea0
Commit message:
Synchronized with git rev 168eed4e
Author: Rohit Grover
nRFDiscoveredCharacteristic::setup() takes a GattClient poitner

Changed in this revision

btle/btle_discovery.cpp Show annotated file Show diff for this revision Revisions of this file
nRFDiscoveredCharacteristic.h Show annotated file Show diff for this revision Revisions of this file
--- a/btle/btle_discovery.cpp	Fri Jun 19 15:55:32 2015 +0100
+++ b/btle/btle_discovery.cpp	Fri Jun 19 15:55:32 2015 +0100
@@ -248,12 +248,14 @@
     for (unsigned charIndex = 0; charIndex < numCharacteristics; charIndex++) {
         if (response->chars[charIndex].uuid.type == BLE_UUID_TYPE_UNKNOWN) {
             charUUIDDiscoveryQueue.enqueue(charIndex);
-            characteristics[charIndex].setup(connHandle,
+            characteristics[charIndex].setup(NULL, /* gattc FIX THIS */
+                                             connHandle,
                                              response->chars[charIndex].char_props,
                                              response->chars[charIndex].handle_decl,
                                              response->chars[charIndex].handle_value);
         } else {
-            characteristics[charIndex].setup(connHandle,
+            characteristics[charIndex].setup(NULL, /* gattc FIX THIS */
+                                             connHandle,
                                              response->chars[charIndex].uuid.uuid,
                                              response->chars[charIndex].char_props,
                                              response->chars[charIndex].handle_decl,
--- a/nRFDiscoveredCharacteristic.h	Fri Jun 19 15:55:32 2015 +0100
+++ b/nRFDiscoveredCharacteristic.h	Fri Jun 19 15:55:32 2015 +0100
@@ -19,10 +19,12 @@
 
 class nRFDiscoveredCharacteristic : public DiscoveredCharacteristic {
 public:
-    void setup(Gap::Handle_t           connectionHandleIn,
-               ble_gatt_char_props_t   propsIn,
-               GattAttribute::Handle_t declHandleIn,
-               GattAttribute::Handle_t valueHandleIn) {
+    void setup(GattClient              *gattcIn,
+               Gap::Handle_t            connectionHandleIn,
+               ble_gatt_char_props_t    propsIn,
+               GattAttribute::Handle_t  declHandleIn,
+               GattAttribute::Handle_t  valueHandleIn) {
+        gattc       = gattcIn;
         connHandle  = connectionHandleIn;
         declHandle  = declHandleIn;
         valueHandle = valueHandleIn;
@@ -36,11 +38,13 @@
         props._authSignedWrite = propsIn.auth_signed_wr;
     }
 
-    void setup(Gap::Handle_t connectionHandleIn,
-               UUID::ShortUUIDBytes_t  uuidIn,
-               ble_gatt_char_props_t   propsIn,
-               GattAttribute::Handle_t declHandleIn,
-               GattAttribute::Handle_t valueHandleIn) {
+    void setup(GattClient              *gattcIn,
+               Gap::Handle_t            connectionHandleIn,
+               UUID::ShortUUIDBytes_t   uuidIn,
+               ble_gatt_char_props_t    propsIn,
+               GattAttribute::Handle_t  declHandleIn,
+               GattAttribute::Handle_t  valueHandleIn) {
+        gattc       = gattcIn;
         connHandle  = connectionHandleIn;
         uuid        = uuidIn;
         declHandle  = declHandleIn;