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: mbed_EddystoneURL_Beacon_ssci mbed_EddystoneURL_Beacon_ssci mbed_EddystoneURL_Beacon_ssci
Fork of BLE_API by
Diff: public/BLE.h
- Revision:
- 547:f84c514eee35
- Parent:
- 546:9fdf3d960d12
- Child:
- 548:623e4c0f0b6e
--- a/public/BLE.h Fri Jun 19 15:52:09 2015 +0100
+++ b/public/BLE.h Fri Jun 19 15:52:09 2015 +0100
@@ -1131,9 +1131,18 @@
*
* @Note: it is also possible to setup a callback into a member function of
* some object.
+ *
+ * @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.onDataSent(...) should be replaced with
+ * ble.gap().onDataSent(...).
*/
- void onDataSent(void (*callback)(unsigned count));
- template <typename T> void onDataSent(T * objPtr, void (T::*memberPtr)(unsigned count));
+ void onDataSent(void (*callback)(unsigned count)) {
+ gattServer().onDataSent(callback);
+ }
+ template <typename T> void onDataSent(T * objPtr, void (T::*memberPtr)(unsigned count)) {
+ gattServer().onDataSent(objPtr, memberPtr);
+ }
/**
* Setup a callback for when a characteristic has its value updated by a
@@ -1268,16 +1277,6 @@
* transport.*/
inline void
-BLE::onDataSent(void (*callback)(unsigned count)) {
- transport->getGattServer().setOnDataSent(callback);
-}
-
-template <typename T> inline void
-BLE::onDataSent(T *objPtr, void (T::*memberPtr)(unsigned count)) {
- transport->getGattServer().setOnDataSent(objPtr, memberPtr);
-}
-
-inline void
BLE::onDataWritten(void (*callback)(const GattWriteCallbackParams *eventDataP)) {
transport->getGattServer().setOnDataWritten(callback);
}
