nordic
Fork of nRF51822 by
Revision 367:969fea92a126, committed 2015-07-02
- Comitter:
- rgrover1
- Date:
- Thu Jul 02 09:08:45 2015 +0100
- Parent:
- 366:d114c459b288
- Child:
- 368:baa35c3860e6
- Commit message:
- Synchronized with git rev 4bedd5ac
Author: Rohit Grover
replace DiscoveredCharacteristic::setupOnDataRead() with GattClient::onDataRead()
Changed in this revision
btle/btle_discovery.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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; }