-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLE: Scanned/Connected/Disconnected/Data Received callback in C++ style #2224
Conversation
ce6c6bf
to
d567d5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@XuGuohui OK, but if possible let's refactor and just use std::function
everywhere.
7c6a032
to
a759caf
Compare
d567d5b
to
e3967bb
Compare
wiring/src/spark_wiring_ble.cpp
Outdated
disconnectedCb_(nullptr), | ||
connectedContext_(nullptr), | ||
disconnectedContext_(nullptr) { | ||
: wiringConnectedCb_(nullptr), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: probably fine without wiring
prefix :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed.
This PR is targeting to the feature/ble_scan_filter/ch37224 branch.
Problem
The existing wiring BLE APIs only support c style callback.
Solution
Using function wrapper to support c++ style callback.
Example App
References
N/A
Completeness