Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: nrf51-sdk
Fork of nRF51822 by
Diff: btle/btle_discovery.cpp
- Revision:
- 301:59e7404a4ea3
- Parent:
- 299:19064275c0e0
- Child:
- 305:293634834813
--- a/btle/btle_discovery.cpp Fri Jun 19 15:55:28 2015 +0100
+++ b/btle/btle_discovery.cpp Fri Jun 19 15:55:29 2015 +0100
@@ -110,7 +110,7 @@
NordicServiceDiscovery::ServiceIndicesNeedingUUIDDiscovery::triggerFirst(void)
{
while (numIndices) { /* loop until a call to char_value_by_uuid_read() succeeds or we run out of pending indices. */
- parentContainer->state = DISCOVER_SERVICE_UUIDS;
+ parentDiscoveryObject->state = DISCOVER_SERVICE_UUIDS;
unsigned serviceIndex = getFirst();
ble_uuid_t uuid = {
@@ -118,10 +118,10 @@
.type = BLE_UUID_TYPE_BLE,
};
ble_gattc_handle_range_t handleRange = {
- .start_handle = parentContainer->services[serviceIndex].getStartHandle(),
- .end_handle = parentContainer->services[serviceIndex].getEndHandle(),
+ .start_handle = parentDiscoveryObject->services[serviceIndex].getStartHandle(),
+ .end_handle = parentDiscoveryObject->services[serviceIndex].getEndHandle(),
};
- if (sd_ble_gattc_char_value_by_uuid_read(parentContainer->connHandle, &uuid, &handleRange) == NRF_SUCCESS) {
+ if (sd_ble_gattc_char_value_by_uuid_read(parentDiscoveryObject->connHandle, &uuid, &handleRange) == NRF_SUCCESS) {
return;
}
@@ -131,8 +131,8 @@
}
/* Switch back to service discovery upon exhausting the service-indices pending UUID discovery. */
- if (parentContainer->state == DISCOVER_SERVICE_UUIDS) {
- parentContainer->state = SERVICE_DISCOVERY_ACTIVE;
+ if (parentDiscoveryObject->state == DISCOVER_SERVICE_UUIDS) {
+ parentDiscoveryObject->state = SERVICE_DISCOVERY_ACTIVE;
}
}
