aa

Dependents:   Peripheral_1_serial_copy Peripheral_1_serial 151006_1st_Scenario_normal

Fork of nRF51822 by Nordic Semiconductor

Revision:
377:808617124695
Parent:
374:d57070489710
--- a/btle/btle_discovery.cpp	Mon Jul 06 10:21:01 2015 +0100
+++ b/btle/btle_discovery.cpp	Mon Jul 06 10:21:02 2015 +0100
@@ -54,20 +54,18 @@
             }
             break;
 
-        case BLE_GATTC_EVT_READ_RSP:
-            if (DiscoveredCharacteristic::onDataReadCallback != NULL) {
+        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,
                 };
-                DiscoveredCharacteristic::onDataReadCallback(&response);
+                nRF51GattClient::getInstance().processReadResponse(&response);
             }
             break;
 
-        case BLE_GATTC_EVT_WRITE_RSP:
-            if (DiscoveredCharacteristic::onDataWriteCallback != NULL) {
+        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),
@@ -75,7 +73,7 @@
                     .len     = p_ble_evt->evt.gattc_evt.params.write_rsp.len,
                     .data    = p_ble_evt->evt.gattc_evt.params.write_rsp.data,
                 };
-                DiscoveredCharacteristic::onDataWriteCallback(&response);
+                nRF51GattClient::getInstance().processWriteResponse(&response);
             }
             break;
     }