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: public/BLE.h
- Revision:
- 541:aa30f63e7b3f
- Parent:
- 540:1fb1e0b809eb
- Child:
- 543:4defb791aa94
--- a/public/BLE.h Fri Jun 19 15:52:08 2015 +0100 +++ b/public/BLE.h Fri Jun 19 15:52:08 2015 +0100 @@ -1053,7 +1053,18 @@ return gattServer().write(connectionHandle, attributeHandle, value, size, localOnly); } - void onTimeout(Gap::EventCallback_t timeoutCallback); + /** + * Setup a callback for timeout events. Refer to Gap::TimeoutSource_t for + * possible event types. + * + * @note: This API is now *deprecated* and will be dropped in the future. + * You should use the parallel API from GattServer directly. A former call + * to ble.onTimeout(callback) should be replaced with + * ble.gap().onTimeout(callback). + */ + void onTimeout(Gap::TimeoutEventCallback_t timeoutCallback) { + gap().onTimeout(timeoutCallback); + } void onConnection(Gap::ConnectionEventCallback_t connectionCallback); /** @@ -1157,12 +1168,6 @@ * transport.*/ inline void -BLE::onTimeout(Gap::EventCallback_t timeoutCallback) -{ - gap().setOnTimeout(timeoutCallback); -} - -inline void BLE::onConnection(Gap::ConnectionEventCallback_t connectionCallback) { gap().setOnConnection(connectionCallback);