config changes

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
vcoubard
Date:
Mon Jan 11 10:19:04 2016 +0000
Parent:
544:9e3d053ad4ec
Child:
546:1e147322b2b5
Commit message:
Synchronized with git rev 8bd7bdfa
Author: Vincent Coubard
Add ARM header into source/nRF5xGattClient.h.
Use const references for passing characteristic discovery callbacks
Fix a bug in btle_discovery.cpp, the discovered descriptors were captured
by value instead of reference.

Changed in this revision

source/btle/btle_discovery.cpp Show annotated file Show diff for this revision Revisions of this file
source/nRF5xCharacteristicDescriptorDiscoverer.cpp Show annotated file Show diff for this revision Revisions of this file
source/nRF5xGattClient.cpp Show annotated file Show diff for this revision Revisions of this file
source/nRF5xGattClient.h Show annotated file Show diff for this revision Revisions of this file
--- a/source/btle/btle_discovery.cpp	Mon Jan 11 10:19:04 2016 +0000
+++ b/source/btle/btle_discovery.cpp	Mon Jan 11 10:19:04 2016 +0000
@@ -98,7 +98,7 @@
         case BLE_GATTC_EVT_DESC_DISC_RSP: {
             uint16_t conn_handle = p_ble_evt->evt.gattc_evt.conn_handle;
             uint16_t status = p_ble_evt->evt.gattc_evt.gatt_status;
-            ble_gattc_evt_desc_disc_rsp_t discovered_descriptors = p_ble_evt->evt.gattc_evt.params.desc_disc_rsp;
+            const ble_gattc_evt_desc_disc_rsp_t& discovered_descriptors = p_ble_evt->evt.gattc_evt.params.desc_disc_rsp;
 
             switch(status) { 
                 case BLE_GATT_STATUS_SUCCESS:
--- a/source/nRF5xCharacteristicDescriptorDiscoverer.cpp	Mon Jan 11 10:19:04 2016 +0000
+++ b/source/nRF5xCharacteristicDescriptorDiscoverer.cpp	Mon Jan 11 10:19:04 2016 +0000
@@ -1,3 +1,19 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2015 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
 #include "nRF5xCharacteristicDescriptorDiscoverer.h"
 #include "ble_err.h"
 #include "mbed-drivers/mbed_error.h"
--- a/source/nRF5xGattClient.cpp	Mon Jan 11 10:19:04 2016 +0000
+++ b/source/nRF5xGattClient.cpp	Mon Jan 11 10:19:04 2016 +0000
@@ -38,8 +38,8 @@
 
 ble_error_t nRF5xGattClient::discoverCharacteristicDescriptors(
     const DiscoveredCharacteristic& characteristic,
-    CharacteristicDescriptorDiscovery::DiscoveryCallback_t discoveryCallback,
-    CharacteristicDescriptorDiscovery::TerminationCallback_t terminationCallback)
+    const CharacteristicDescriptorDiscovery::DiscoveryCallback_t& discoveryCallback,
+    const CharacteristicDescriptorDiscovery::TerminationCallback_t& terminationCallback)
 {
     return characteristicDescriptorDiscoverer.launch(
         characteristic, 
--- a/source/nRF5xGattClient.h	Mon Jan 11 10:19:04 2016 +0000
+++ b/source/nRF5xGattClient.h	Mon Jan 11 10:19:04 2016 +0000
@@ -112,8 +112,8 @@
      */
     virtual ble_error_t discoverCharacteristicDescriptors(
         const DiscoveredCharacteristic& characteristic,
-        CharacteristicDescriptorDiscovery::DiscoveryCallback_t discoveryCallback,
-        CharacteristicDescriptorDiscovery::TerminationCallback_t terminationCallback
+        const CharacteristicDescriptorDiscovery::DiscoveryCallback_t& discoveryCallback,
+        const CharacteristicDescriptorDiscovery::TerminationCallback_t& terminationCallback
     );
 
     /**