test

Dependencies:   nrf51-sdk

Dependents:   microbit-dal

Fork of nRF51822 by Lancaster University

Revision:
423:9bf22621d592
Parent:
418:d66d5957a220
Child:
424:28ea27dcba79
diff -r 041752486b03 -r 9bf22621d592 source/btle/btle_discovery.cpp
--- a/source/btle/btle_discovery.cpp	Tue Aug 11 15:14:24 2015 +0100
+++ b/source/btle/btle_discovery.cpp	Thu Aug 13 13:23:18 2015 +0100
@@ -17,7 +17,6 @@
 #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;
@@ -57,11 +56,10 @@
 
         case BLE_GATTC_EVT_READ_RSP: {
                 GattReadCallbackParams response = {
-                    .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,
+                    .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);
             }
@@ -69,12 +67,11 @@
 
         case BLE_GATTC_EVT_WRITE_RSP: {
                 GattWriteCallbackParams response = {
-                    .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,
+                    .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);
             }
@@ -82,11 +79,10 @@
 
         case BLE_GATTC_EVT_HVX: {
                 GattHVXCallbackParams params;
-                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;
+                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);
             }
@@ -96,4 +92,3 @@
     sdSingleton.progressCharacteristicDiscovery();
     sdSingleton.progressServiceDiscovery();
 }
-#endif