-
Notifications
You must be signed in to change notification settings - Fork 3k
HAL: Add a get_capabilities() function to ResetReason API #12139
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
HAL: Add a get_capabilities() function to ResetReason API #12139
Conversation
@fkjagodzinski, thank you for your changes. |
@fkjagodzinski What is the actual impact of these changes? Could you fill in that section also please. |
@fkjagodzinski Hey sorry I can't take a look at this before the holidays but I'll be sure to test out your changes as soon as I'm back. |
@adbridge I've updated the description as requested. |
@fkjagodzinski I got around to testing this out. The changes look good to me. I was able to implement the get_capabilities function for our boards and get the tests passing. |
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.
Before I approve, what other targets/families should implement this (at least to check if weakly defined is good for them) ?
Add the hal_reset_reason_get_capabilities() to ResetReason HAL API. Add a default, weak implementation, that every target can override.
Make use of the new hal_reset_reason_get_capabilities() function to skip unsupported reset resaons during tests.
5ac67eb
to
ffd8d70
Compare
This should be OK for all the targets that implement the reset reason API and had passed the tests. Checking the |
Override the default, weak implementation of hal_reset_reason_get_capabilities() for TMPM066, TMPM3H6, TMPM3HQ, TMPM46B & TMPM4G9.
Implemented the |
@0xc0170 please review the updates |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Summary of changes
Add the
hal_reset_reason_get_capabilities()
function to the ResetReason HAL API to skip the unsupported reason values during HAL & driver tests.Fixes #11792.
Updated tests:
tests-mbed_hal-reset_reason
,tests-mbed_drivers-reset_reason
.Impact of changes
Extend the ResetReason HAL API with the
hal_reset_reason_get_capabilities()
function. Unsupported reason values are skipped during the greentea tests.Migration actions required
A default, weak implementation is provided. Every target has to override this weak implementation to provide the correct
reset_reason_capabilities_t
.Documentation
None
Pull request type
Test results
Reviewers
@jamesbeyond, @mprse