test
Fork of nRF51822 by
Diff: btle/btle_discovery.cpp
- Revision:
- 366:969fea92a126
- Parent:
- 344:2a44e5fd26bc
--- a/btle/btle_discovery.cpp Thu Jul 02 09:08:45 2015 +0100 +++ b/btle/btle_discovery.cpp Thu Jul 02 09:08:45 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; }