Lancaster University's fork of the mbed BLE API. Lives on github, https://github.com/lancaster-university/BLE_API

Dependents:   microbit-dal microbit-dal microbit-ble-open microbit-dal ... more

Fork of BLE_API by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Thu Nov 26 12:52:05 2015 +0000
Parent:
924:f4a901a3e6cd
Child:
926:e1e44fb9bd8a
Commit message:
Synchronized with git rev acf4467c
Author: Vincent Coubard
Replace callbacks with function pointer into FunctionPointer object

Changed in this revision

ble/ServiceDiscovery.h Show annotated file Show diff for this revision Revisions of this file
--- a/ble/ServiceDiscovery.h	Thu Nov 26 12:52:04 2015 +0000
+++ b/ble/ServiceDiscovery.h	Thu Nov 26 12:52:05 2015 +0000
@@ -38,7 +38,7 @@
      * framework. The application can safely make a persistent shallow-copy of
      * this object to work with the service beyond the callback.
      */
-    typedef void (*ServiceCallback_t)(const DiscoveredService *);
+    typedef FunctionPointerWithContext<const DiscoveredService *> ServiceCallback_t;
 
     /**
      * Callback type for when a matching characteristic is found during service-
@@ -48,12 +48,12 @@
      * framework. The application can safely make a persistent shallow-copy of
      * this object to work with the characteristic beyond the callback.
      */
-    typedef void (*CharacteristicCallback_t)(const DiscoveredCharacteristic *);
+    typedef FunctionPointerWithContext<const DiscoveredCharacteristic *> CharacteristicCallback_t;
 
     /**
      * Callback type for when serviceDiscovery terminates.
      */
-    typedef void (*TerminationCallback_t)(Gap::Handle_t connectionHandle);
+    typedef FunctionPointerWithContext<Gap::Handle_t> TerminationCallback_t;
 
 public:
     /**