-
Notifications
You must be signed in to change notification settings - Fork 3k
Remove direct use of us and lp ticker from tests #5096
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
Remove the direct use of the microsecond and low power ticker from the tests. This enforces that sleep mode is properly locked when using timers. Furthermore, this prepares the codebase for new ticker changes which allow differing clock frequencies and timer bit widths.
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
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.
In the lp_ticker test, it is a bit strange to use a combination of the C and C++ API. I'd suggest to explain when one has to be used over, that would help future maintainers.
+1. how shall this be suggested? In the test, explaine why Timer is used instead of directly tickers? |
In general (not including the code under test) we need to encourage tests to be written using the C++ API rather than the HAL API. This is because the C++ API's provide thread and sleep safety and mbed-os is committed to keeping these APIs backwards compatible. With the HAL APIs there is more flexibility to change over time. In this PR the HAL API is used only in |
/morph test-nightly |
@c1728p9 Will this be needed for 5.6.1? |
nope |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Remove the direct use of the microsecond and low power ticker from the tests. This enforces that sleep mode is properly locked when using timers. Furthermore, this prepares the codebase for new ticker changes which allow differing clock frequencies and timer bit widths.