prova

Fork of BLE_API by Bluetooth Low Energy

Revision:
1113:b6d999e7a73a
Parent:
1111:30326e58c830
Child:
1115:82d4a8a56d91
--- a/source/DiscoveredCharacteristic.cpp	Mon Jan 11 08:51:59 2016 +0000
+++ b/source/DiscoveredCharacteristic.cpp	Mon Jan 11 08:52:00 2016 +0000
@@ -151,12 +151,17 @@
     return error;
 }
 
-ble_error_t
-DiscoveredCharacteristic::discoverDescriptors(DescriptorCallback_t callback, const UUID &matchingUUID) const
-{
-    /* Avoid compiler warnings */
-    (void) callback;
-    (void) matchingUUID;
+ble_error_t DiscoveredCharacteristic::discoverDescriptors(
+    const CharacteristicDescriptorDiscovery::DiscoveryCallback_t& onCharacteristicDiscovered, 
+    const CharacteristicDescriptorDiscovery::TerminationCallback_t& onTermination) const {
 
-    return BLE_ERROR_NOT_IMPLEMENTED; /* TODO: this needs to be filled in. */
+    if(!gattc) {
+        return BLE_ERROR_INVALID_STATE;
+    }
+
+    ble_error_t err = gattc->discoverCharacteristicDescriptors(
+        *this, onCharacteristicDiscovered, onTermination
+    );
+
+    return err;
 }
\ No newline at end of file