-
Notifications
You must be signed in to change notification settings - Fork 3k
Remove mbed wait deprecated APIs #12572
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
Conversation
7332519
to
8fa3202
Compare
These APIs are widely used so we need to ensure that there is no internal usage in greentea tests, examples etc. before merging. @0xc0170 it would be useful to kick off CI to see which tests/targets fail to build. |
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.
Why some test use thread_sleep_for
and the other use ThisThread::sleep_for
?
platform/mbed_wait_api.h
Outdated
@@ -46,54 +46,14 @@ extern "C" { | |||
* int main() { | |||
* while (1) { | |||
* heartbeat = 1; | |||
* wait(0.5); | |||
* wait_us(500); |
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.
Should be 500ms not 500us
platform/mbed_wait_api.h
Outdated
* heartbeat = 0; | ||
* wait(0.5); | ||
* wait_us(500); |
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.
same here
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.
@maciejbocianski We try to showcase time precision sleeping, but we are working on better example to showcase wait API.
CI started |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
|
This PR needs to merge after : ARMmbed/mbed-os-examples-docs_only#59 |
To clarify, both APIs are available bare-metal, but you do have to ask for the C++ apis with Biggest 2 reasons to use It's no big deal which the tests use though. Using the C one is fine. Note that all the C++ timing APIs you're switching to are planned to be deprecated by #12425 - they'll want to be changed again to |
67f1a6f
to
da3e53e
Compare
b3c8b9f
to
1468a73
Compare
there are two libraries that need to be rebuilt for this PR:
Can you please rebuilt the libraries using this PR and share SHA on your branch? We can cherry-pick them here so all goes in together. @rajkan01 Please correct me if any other library missing in this list. |
@tymoteuszblochmobica / @mtomczykmobica - Could you check Martin's last comment regarding to libwiced drivers? |
Test run: FAILEDSummary: 1 of 7 test jobs failed Failed test jobs:
|
@0xc0170 mbed test setup handler was failed. Please restart the greentea test
|
Restarted test, this is known issue |
Restarted tests, some targets were put into maintenance mode in CI. |
…PI with IRQ masked, so wait_us is used to fix this issue as PWM testes to be executed with interrupt disabled to avoid context switch.
- Incorporate the review comment.
5eba674
to
3d128e8
Compare
CI restarted |
Test run: FAILEDSummary: 2 of 3 test jobs failed Failed test jobs:
|
CI restarted (ble example was fixed) |
Test run: SUCCESSSummary: 7 of 7 test jobs passed |
CI passed, time for some reviews |
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.
Re-approved
Summary of changes
Removed mbed wait deprecated APIs.
Impact of changes
Breaking change:
wait
andwait_ms
APIs have been deprecated since Mbed OS 5.14 and they are removed now.Migration actions required
If you wish to sleep, use
ThisThread::sleep_for
(C++) orthread_sleep_for
(C). If you wish to wait (without sleeping), callwait_us
.wait_us
is safe to call from ISR context.Documentation
ARMmbed/mbed-os-5-docs@19d1ed0
Pull request type
Test results
Reviewers
@evedon