Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1ab550f

Browse filesBrowse files
authored
Changed BLE notify_callback from raw function pointer to std::function (espressif#4737)
1 parent 9be784f commit 1ab550f
Copy full SHA for 1ab550f

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎libraries/BLE/src/BLERemoteCharacteristic.h

Copy file name to clipboardExpand all lines: libraries/BLE/src/BLERemoteCharacteristic.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#if defined(CONFIG_BT_ENABLED)
1212

1313
#include <string>
14+
#include <functional>
1415

1516
#include <esp_gattc_api.h>
1617

@@ -21,8 +22,7 @@
2122

2223
class BLERemoteService;
2324
class BLERemoteDescriptor;
24-
typedef void (*notify_callback)(BLERemoteCharacteristic* pBLERemoteCharacteristic, uint8_t* pData, size_t length, bool isNotify);
25-
25+
typedef std::function<void(BLERemoteCharacteristic* pBLERemoteCharacteristic, uint8_t* pData, size_t length, bool isNotify)> notify_callback;
2626
/**
2727
* @brief A model of a remote %BLE characteristic.
2828
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.