aa

Dependents:   Peripheral_1_serial_copy Peripheral_1_serial 151006_1st_Scenario_normal

Fork of nRF51822 by Nordic Semiconductor

Revision:
305:293634834813
Parent:
301:59e7404a4ea3
Child:
306:76e2e7349319
--- a/btle/btle_discovery.cpp	Fri Jun 19 15:55:29 2015 +0100
+++ b/btle/btle_discovery.cpp	Fri Jun 19 15:55:29 2015 +0100
@@ -107,7 +107,7 @@
 }
 
 void
-NordicServiceDiscovery::ServiceIndicesNeedingUUIDDiscovery::triggerFirst(void)
+NordicServiceDiscovery::ServiceUUIDDiscoveryQueue::triggerFirst(void)
 {
     while (numIndices) { /* loop until a call to char_value_by_uuid_read() succeeds or we run out of pending indices. */
         parentDiscoveryObject->state = DISCOVER_SERVICE_UUIDS;
@@ -152,10 +152,10 @@
                 uuid[i] = response->handle_value[0].p_value[UUID::LENGTH_OF_LONG_UUID - 1 - i];
             }
 
-            unsigned serviceIndex = serviceIndicesNeedingUUIDDiscovery.dequeue();
+            unsigned serviceIndex = serviceUUIDDiscoveryQueue.dequeue();
             services[serviceIndex].setupLongUUID(uuid);
 
-            serviceIndicesNeedingUUIDDiscovery.triggerFirst();
+            serviceUUIDDiscoveryQueue.triggerFirst();
         }
     }
 }
@@ -171,10 +171,10 @@
         numServices = BLE_DB_DISCOVERY_MAX_SRV;
     }
 
-    serviceIndicesNeedingUUIDDiscovery.reset();
+    serviceUUIDDiscoveryQueue.reset();
     for (unsigned serviceIndex = 0; serviceIndex < numServices; serviceIndex++) {
         if (response->services[serviceIndex].uuid.type == BLE_UUID_TYPE_UNKNOWN) {
-            serviceIndicesNeedingUUIDDiscovery.enqueue(serviceIndex);
+            serviceUUIDDiscoveryQueue.enqueue(serviceIndex);
             services[serviceIndex].setup(response->services[serviceIndex].handle_range.start_handle,
                                          response->services[serviceIndex].handle_range.end_handle);
         } else {
@@ -185,8 +185,8 @@
     }
 
     /* Trigger discovery of service UUID if necessary. */
-    if (serviceIndicesNeedingUUIDDiscovery.getCount()) {
-        serviceIndicesNeedingUUIDDiscovery.triggerFirst();
+    if (serviceUUIDDiscoveryQueue.getCount()) {
+        serviceUUIDDiscoveryQueue.triggerFirst();
     }
 }