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: ble/BLE.h
- Revision:
- 829:9072de50087b
- Parent:
- 822:a0f080d1e836
- Child:
- 843:7d22b29f91bf
--- a/ble/BLE.h Tue Sep 29 09:54:18 2015 +0100 +++ b/ble/BLE.h Tue Sep 29 09:54:18 2015 +0100 @@ -1151,7 +1151,7 @@ } /** - * Used to setup a callback for GAP disconnection. + * Append to a chain of callbacks to be invoked upon GAP disconnection. * * @note: This API is now *deprecated* and will be dropped in the future. * You should use the parallel API from Gap directly. A former call @@ -1162,19 +1162,9 @@ gap().onDisconnection(disconnectionCallback); } - /** - * Append to a chain of callbacks to be invoked upon disconnection; these - * callbacks receive no context and are therefore different from the - * onDisconnection callback. - * - * @note: This API is now *deprecated* and will be dropped in the future. - * You should use the parallel API from Gap directly. A former call - * to ble.addToDisconnectionCallchain(...) should be replaced with - * ble.gap().addToDisconnectionCallchain(...). - */ template<typename T> - void addToDisconnectionCallChain(T *tptr, void (T::*mptr)(void)) { - gap().addToDisconnectionCallChain(tptr, mptr); + void onDisconnection(T *tptr, void (T::*mptr)(const Gap::DisconnectionCallbackParams_t*)) { + gap().onDisconnection(tptr, mptr); } /**