Unverified Commit 1ab550f6 authored by Michael's avatar Michael Committed by GitHub

Changed BLE notify_callback from raw function pointer to std::function (#4737)

parent 9be784f6
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#if defined(CONFIG_BT_ENABLED) #if defined(CONFIG_BT_ENABLED)
#include <string> #include <string>
#include <functional>
#include <esp_gattc_api.h> #include <esp_gattc_api.h>
...@@ -21,8 +22,7 @@ ...@@ -21,8 +22,7 @@
class BLERemoteService; class BLERemoteService;
class BLERemoteDescriptor; class BLERemoteDescriptor;
typedef void (*notify_callback)(BLERemoteCharacteristic* pBLERemoteCharacteristic, uint8_t* pData, size_t length, bool isNotify); typedef std::function<void(BLERemoteCharacteristic* pBLERemoteCharacteristic, uint8_t* pData, size_t length, bool isNotify)> notify_callback;
/** /**
* @brief A model of a remote %BLE characteristic. * @brief A model of a remote %BLE characteristic.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment