aa

Dependents:   Peripheral_1_serial_copy Peripheral_1_serial 151006_1st_Scenario_normal

Fork of nRF51822 by Nordic Semiconductor

Revision:
431:db7edc9ad0bc
Parent:
430:bff56e081b6e
Child:
435:95f196557042
--- a/source/btle/btle_discovery.cpp	Fri Sep 25 15:26:39 2015 +0100
+++ b/source/btle/btle_discovery.cpp	Fri Sep 25 15:26:40 2015 +0100
@@ -17,6 +17,7 @@
 #include "nRF5xServiceDiscovery.h"
 #include "nRF5xGattClient.h"
 
+#if !defined(MCU_NORDIC_16K_S110) && !defined(MCU_NORDIC_32K_S110)
 void bleGattcEventHandler(const ble_evt_t *p_ble_evt)
 {
     nRF5xServiceDiscovery &sdSingleton = nRF5xGattClient::getInstance().discovery;
@@ -56,10 +57,11 @@
 
         case BLE_GATTC_EVT_READ_RSP: {
                 GattReadCallbackParams response = {
-                    .handle = p_ble_evt->evt.gattc_evt.params.read_rsp.handle,
-                    .offset = p_ble_evt->evt.gattc_evt.params.read_rsp.offset,
-                    .len    = p_ble_evt->evt.gattc_evt.params.read_rsp.len,
-                    .data   = p_ble_evt->evt.gattc_evt.params.read_rsp.data,
+                    .connHandle = p_ble_evt->evt.gattc_evt.conn_handle,
+                    .handle     = p_ble_evt->evt.gattc_evt.params.read_rsp.handle,
+                    .offset     = p_ble_evt->evt.gattc_evt.params.read_rsp.offset,
+                    .len        = p_ble_evt->evt.gattc_evt.params.read_rsp.len,
+                    .data       = p_ble_evt->evt.gattc_evt.params.read_rsp.data,
                 };
                 nRF5xGattClient::getInstance().processReadResponse(&response);
             }
@@ -67,11 +69,12 @@
 
         case BLE_GATTC_EVT_WRITE_RSP: {
                 GattWriteCallbackParams response = {
-                    .handle  = p_ble_evt->evt.gattc_evt.params.write_rsp.handle,
-                    .writeOp = (GattWriteCallbackParams::WriteOp_t)(p_ble_evt->evt.gattc_evt.params.write_rsp.write_op),
-                    .offset  = p_ble_evt->evt.gattc_evt.params.write_rsp.offset,
-                    .len     = p_ble_evt->evt.gattc_evt.params.write_rsp.len,
-                    .data    = p_ble_evt->evt.gattc_evt.params.write_rsp.data,
+                    .connHandle = p_ble_evt->evt.gattc_evt.conn_handle,
+                    .handle     = p_ble_evt->evt.gattc_evt.params.write_rsp.handle,
+                    .writeOp    = (GattWriteCallbackParams::WriteOp_t)(p_ble_evt->evt.gattc_evt.params.write_rsp.write_op),
+                    .offset     = p_ble_evt->evt.gattc_evt.params.write_rsp.offset,
+                    .len        = p_ble_evt->evt.gattc_evt.params.write_rsp.len,
+                    .data       = p_ble_evt->evt.gattc_evt.params.write_rsp.data,
                 };
                 nRF5xGattClient::getInstance().processWriteResponse(&response);
             }
@@ -79,10 +82,11 @@
 
         case BLE_GATTC_EVT_HVX: {
                 GattHVXCallbackParams params;
-                params.handle = p_ble_evt->evt.gattc_evt.params.hvx.handle;
-                params.type   = static_cast<HVXType_t>(p_ble_evt->evt.gattc_evt.params.hvx.type);
-                params.len    = p_ble_evt->evt.gattc_evt.params.hvx.len;
-                params.data   = p_ble_evt->evt.gattc_evt.params.hvx.data;
+                params.connHandle = p_ble_evt->evt.gattc_evt.conn_handle;
+                params.handle     = p_ble_evt->evt.gattc_evt.params.hvx.handle;
+                params.type       = static_cast<HVXType_t>(p_ble_evt->evt.gattc_evt.params.hvx.type);
+                params.len        = p_ble_evt->evt.gattc_evt.params.hvx.len;
+                params.data       = p_ble_evt->evt.gattc_evt.params.hvx.data;
 
                 nRF5xGattClient::getInstance().processHVXEvent(&params);
             }
@@ -92,3 +96,4 @@
     sdSingleton.progressCharacteristicDiscovery();
     sdSingleton.progressServiceDiscovery();
 }
+#endif