未验证 提交 1ab550f6 编写于 作者: M Michael 提交者: GitHub

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

上级 9be784f6
......@@ -11,6 +11,7 @@
#if defined(CONFIG_BT_ENABLED)
#include <string>
#include <functional>
#include <esp_gattc_api.h>
......@@ -21,8 +22,7 @@
class BLERemoteService;
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.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册