Change notify_callback typedef to enable the usage of member function as callback

With this change the callback function could be also a member function
This commit is contained in:
Cornelius Munz 2020-09-02 12:13:18 -06:00 committed by h2zero
parent 26b3ba3e8f
commit 9cdf60d360

View file

@ -24,13 +24,14 @@
#include "NimBLERemoteDescriptor.h"
#include <vector>
#include <functional>
class NimBLERemoteService;
class NimBLERemoteDescriptor;
typedef void (*notify_callback)(NimBLERemoteCharacteristic* pBLERemoteCharacteristic,
uint8_t* pData, size_t length, bool isNotify);
typedef std::function<void (NimBLERemoteCharacteristic* pBLERemoteCharacteristic,
uint8_t* pData, size_t length, bool isNotify)> notify_callback;
typedef struct {
const NimBLEUUID *uuid;