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.
Fork of BLE_API by
Diff: hw/BLEDevice.h
- Revision:
- 63:653378e782ea
- Parent:
- 49:03a51f0006f8
- Child:
- 64:95529f47b782
--- a/hw/BLEDevice.h Mon Jun 02 14:58:56 2014 +0100
+++ b/hw/BLEDevice.h Wed Jun 04 09:36:31 2014 +0100
@@ -129,6 +129,10 @@
ble_error_t disconnect(void);
+ void onTimeout(Gap::EventCallback_t timeoutCallback);
+ void onConnection(Gap::EventCallback_t connectionCallback);
+ void onDisconnection(Gap::EventCallback_t disconnectionCallback);
+
private:
/**
* Internal helper to udpate the transport backend with advertising data
@@ -300,4 +304,20 @@
return transport->getGap().startAdvertising(_advParams);
}
+inline void
+BLEDevice::onTimeout(Gap::EventCallback_t timeoutCallback) {
+ transport->getGap().setOnTimeout(timeoutCallback);
+}
+
+inline void
+BLEDevice::onConnection(Gap::EventCallback_t connectionCallback) {
+ transport->getGap().setOnConnection(connectionCallback);
+}
+
+inline void
+BLEDevice::onDisconnection(Gap::EventCallback_t disconnectionCallback) {
+ transport->getGap().setOnDisconnection(disconnectionCallback);
+}
+
+
#endif // ifndef __BLE_DEVICE_H__
