test
Dependents: BLE_PowerBank_HeyFaradey
Fork of BLE_API by
Diff: ble/BLE.h
- Revision:
- 829:9072de50087b
- Parent:
- 822:a0f080d1e836
- Child:
- 843:7d22b29f91bf
diff -r d22ab1419e92 -r 9072de50087b ble/BLE.h --- 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); } /**