High level Bluetooth Low Energy API and radio abstraction layer

Fork of BLE_API by Bluetooth Low Energy

Revision:
1077:98d37e26903c
Parent:
1074:1fedc77d9add
Child:
1078:79c089630b38
diff -r 5f938eb2bd6a -r 98d37e26903c source/DiscoveredCharacteristic.cpp
--- a/source/DiscoveredCharacteristic.cpp	Mon Jan 11 08:51:43 2016 +0000
+++ b/source/DiscoveredCharacteristic.cpp	Mon Jan 11 08:51:43 2016 +0000
@@ -151,8 +151,17 @@
     return error;
 }
 
-ble_error_t
-DiscoveredCharacteristic::discoverDescriptors(DescriptorCallback_t callback, const UUID &matchingUUID) const
-{
-    return BLE_ERROR_NOT_IMPLEMENTED; /* TODO: this needs to be filled in. */
+ble_error_t DiscoveredCharacteristic::discoverDescriptors(
+    const CharacteristicDescriptorDiscovery::DiscoveryCallback_t& onCharacteristicDiscovered, 
+    const CharacteristicDescriptorDiscovery::TerminationCallback_t& onTermination) const {
+
+    if(!gattc) {
+        return BLE_ERROR_INVALID_STATE;
+    }
+
+    ble_error_t err = gattc->discoverCharacteristicDescriptors(
+        *this, onCharacteristicDiscovered, onTermination
+    );
+
+    return err;
 }
\ No newline at end of file