forked from h2zero/esp-nimble-cpp
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:
1 parent
26b3ba3e8f
commit
9cdf60d360
1 file changed
+3
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user