-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/msp430/periph_timer: fix timer_query_freqs() #20574
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`timer_query_freqs()` should return 0 when index is out of range according to the doc. This changes the code to live up to the spec.
Also test that `timer_query_freqs()` for an index out of range does return 0, as stated by the doc.
maribu
added
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
Impact: minor
The PR is small in size and might only require a quick look of a knowledgeable reviewer
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Process: needs backport
Integration Process: The PR is required to be backported to a release or feature branch
labels
Apr 14, 2024
maribu
requested review from
leandrolanzieri,
aabadie,
MichelRottleuthner,
kaspar030 and
gschorcht
as code owners
April 14, 2024 18:25
github-actions
bot
added
Platform: MSP
Platform: This PR/issue effects MSP-based platforms
Area: tests
Area: tests and testing framework
Area: cpu
Area: CPU/MCU ports
labels
Apr 14, 2024
Teufelchen1
approved these changes
Apr 15, 2024
May I also backport the commit that increases the test coverage, or only the commit that contains the fix? (The chance that the increased tests coverage breaks unrelated things is pretty much zero, but it may find things we might want to fix.) For documentation: purpose:
and
and finally a failure in the test when the fix is reverted:
|
Thx :) |
Backport provided in #20580 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: cpu
Area: CPU/MCU ports
Area: tests
Area: tests and testing framework
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Impact: minor
The PR is small in size and might only require a quick look of a knowledgeable reviewer
Platform: MSP
Platform: This PR/issue effects MSP-based platforms
Process: needs backport
Integration Process: The PR is required to be backported to a release or feature branch
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
The API doc for
timer_query_freqs()
says it should return 0 Hz as frequency when the prescaler index is out of range. This changes the MSP430 timer driver to live up to the spec.It also sneaks in an extension to the test app, so that in the future offending code is more easily detected.
Testing procedure
Run the new test. It should pass with this PR, but would fail on master (when the next test is backported).
Issues/PRs references
None