Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Diff: ble/services/LinkLossService.h
- Revision:
- 907:f9a79127973a
- Parent:
- 906:8ddab3271c2f
- Child:
- 912:f728aa46e7df
--- a/ble/services/LinkLossService.h Thu Nov 26 12:52:02 2015 +0000
+++ b/ble/services/LinkLossService.h Thu Nov 26 12:52:02 2015 +0000
@@ -17,7 +17,7 @@
#ifndef __BLE_LINK_LOSS_SERVICE_H__
#define __BLE_LINK_LOSS_SERVICE_H__
-#include "ble/Gap.h"
+#include "Gap.h"
/**
* @class LinkLossService
@@ -52,11 +52,11 @@
GattCharacteristic *charTable[] = {&alertLevelChar};
GattService linkLossService(GattService::UUID_LINK_LOSS_SERVICE, charTable, sizeof(charTable) / sizeof(GattCharacteristic *));
- ble.gattServer().addService(linkLossService);
+ ble.addService(linkLossService);
serviceAdded = true;
- ble.gap().onDisconnection(this, &LinkLossService::onDisconnectionFilter);
- ble.gattServer().onDataWritten(this, &LinkLossService::onDataWritten);
+ ble.addToDisconnectionCallChain(this, &LinkLossService::onDisconnectionFilter);
+ ble.onDataWritten(this, &LinkLossService::onDataWritten);
}
/**
@@ -86,7 +86,7 @@
}
}
- void onDisconnectionFilter(const Gap::DisconnectionCallbackParams_t *params) {
+ void onDisconnectionFilter(void) {
if (alertLevel != NO_ALERT) {
callback(alertLevel);
}
