Skip to content

Commit d03c209

Browse files
committed
Changed BLE notify_callback from raw function pointer to std::function
1 parent 9be784f commit d03c209

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: libraries/BLE/src/BLERemoteCharacteristic.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#if defined(CONFIG_BT_ENABLED)
1212

1313
#include <string>
14+
#include <functional>
1415

1516
#include <esp_gattc_api.h>
1617

@@ -21,8 +22,7 @@
2122

2223
class BLERemoteService;
2324
class BLERemoteDescriptor;
24-
typedef void (*notify_callback)(BLERemoteCharacteristic* pBLERemoteCharacteristic, uint8_t* pData, size_t length, bool isNotify);
25-
25+
typedef std::function<void(BLERemoteCharacteristic* pBLERemoteCharacteristic, uint8_t* pData, size_t length, bool isNotify)> notify_callback;
2626
/**
2727
* @brief A model of a remote %BLE characteristic.
2828
*/

0 commit comments

Comments
 (0)