From 9cdf60d36046038722feef54e2151176f662d288 Mon Sep 17 00:00:00 2001 From: Cornelius Munz Date: Wed, 2 Sep 2020 12:13:18 -0600 Subject: [PATCH] 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 --- src/NimBLERemoteCharacteristic.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/NimBLERemoteCharacteristic.h b/src/NimBLERemoteCharacteristic.h index 38e3b6c..720a4da 100644 --- a/src/NimBLERemoteCharacteristic.h +++ b/src/NimBLERemoteCharacteristic.h @@ -24,13 +24,14 @@ #include "NimBLERemoteDescriptor.h" #include +#include class NimBLERemoteService; class NimBLERemoteDescriptor; -typedef void (*notify_callback)(NimBLERemoteCharacteristic* pBLERemoteCharacteristic, - uint8_t* pData, size_t length, bool isNotify); +typedef std::function notify_callback; typedef struct { const NimBLEUUID *uuid;