-
Notifications
You must be signed in to change notification settings - Fork 3k
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: fix scan timeout being called from interrupt #10219
BLE: fix scan timeout being called from interrupt #10219
Conversation
69ee5b3
to
3b515e4
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.
Thanks @paul-szczepanek-arm ; the change looks good but can be improved a bit.
_event_queue.post( | ||
mbed::callback( | ||
this, | ||
&GenericGap< |
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.
What's wrong with &GenericGap:: process_legacy_scan_timeout
?
@@ -3263,6 +3280,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve | |||
|
|||
_scan_timeout.detach(); | |||
if (duration.value()) { | |||
/**/ |
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.
I'm not sure that is required.
@paul-szczepanek-arm, thank you for your changes. |
I don't understand the astyle failure |
@paul-szczepanek-arm Sorry about that. We did some astyle work after finding out the current job was over-excluding files, but the fixes ended up over-including files. Problems appear to have been fixed with #10222. |
Info: This PR has now been rebased. If this was made in error, feel free to force-push your local branch to restore the PR. |
e5bef89
to
82112b6
Compare
CI started |
Making a note for future me. New function added, but appears to be needed due to legacy callback reasons. Appears fine for patch. |
…scan-timeout BLE: fix scan timeout being called from interrupt
Test run: SUCCESSSummary: 13 of 13 test jobs passed |
@pan- A hunch, but before we merge this, would y'all mind testing this against the CY8CKIT_062_BLE target? I was doing some testing to make sure all PRs RfM or in CI were alright with eachother, and found that this target was not liking one of the PRs. Logs for reference: https://mbed-os.mbedcloudtesting.com/job/mbed-os-ci_greentea-test/1612/#showFailuresLink| (Sorry, no S3 links. As of right now, the job is still in progress.) |
@cmonr The |
Description
Legacy scanning uses a timer to simulate a scan timeout event which causes the timeout to be called from the timer interrupt. This posts the call in the event queue.
Pull request type
Reviewers
@pan-
Release Notes