High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Revision:
837:66f14bc44c30
Parent:
835:6556fcb2f51d
Child:
838:e2f69ba31b02
--- a/ble/services/LinkLossService.h	Mon Nov 02 09:09:03 2015 +0000
+++ b/ble/services/LinkLossService.h	Mon Nov 02 09:09:03 2015 +0000
@@ -52,11 +52,12 @@
         GattCharacteristic *charTable[] = {&alertLevelChar};
         GattService         linkLossService(GattService::UUID_LINK_LOSS_SERVICE, charTable, sizeof(charTable) / sizeof(GattCharacteristic *));
 
-        ble.addService(linkLossService);
+        ble.gattServer().addService(linkLossService);
         serviceAdded = true;
 
-        ble.addToDisconnectionCallChain(this, &LinkLossService::onDisconnectionFilter);
-        ble.onDataWritten(this, &LinkLossService::onDataWritten);
+        ble.gap().onDisconnection(this, &LinkLossService::onDisconnectionFilter);
+        ble.gattServer().onDataWritten(this, &LinkLossService::onDataWritten);
+
     }
 
     /**
@@ -86,7 +87,7 @@
         }
     }
 
-    void onDisconnectionFilter(void) {
+    void onDisconnectionFilter(const Gap::DisconnectionCallbackParams_t *params) {
         if (alertLevel != NO_ALERT) {
             callback(alertLevel);
         }