Skip to content

Commit

Permalink
Changed BLE notify_callback from raw function pointer to std::function (
Browse files Browse the repository at this point in the history
  • Loading branch information
morsisko authored Feb 16, 2021
1 parent 9be784f commit 1ab550f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLERemoteCharacteristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#if defined(CONFIG_BT_ENABLED)

#include <string>
#include <functional>

#include <esp_gattc_api.h>

Expand All @@ -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.
*/
Expand Down

0 comments on commit 1ab550f

Please sign in to comment.