-
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
mips32r2_common: timer fixes #8817
Conversation
Fix 'timer_set', 'timer_set_absolute' and 'timer_clear' return value to 1 on success as documented in the API.
mips32r2_common already implements timer_set so it should not be provided by periph_common/timer to avoid multiple definition errors currently hidden by the linker. The firmware was using the one from `mips32r2_common` before (binary checked). So behaviour is identical.
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.
It looks good to me, I have not checked it on target hardware yet, that may take a few days.
But I cannot see why there would be any issues and you have checked the resultant binary is unchanged.
So if you want to merge this soon to resolve another issue please go ahead.
Is there a plan to fix the race in the generic implementation ?
@neiljay I have not followed the generic implementation case for the moment, I did not exactly got the problem, so hard to do a PR if I miss some points. |
@neiljay do you think you will have time to test it for the release ? |
@cladmi Just tested on pic32-wfire with timer_periodic_wakeup and it looks good: main(): This is RIOT! (Version: 2017.01-devel-1551-gbbd6a-ldt-n-jones-heads/cladmi/pr/ld/mips32r2_timer_set) |
Thanks |
mips32r2_common: timer fixes
Contribution description
Fix return value for
timer_
function that should return 1 on success.mips32r2_common already implements timer_set so it should not be provided by
periph_common/timer to avoid multiple definition errors hidden by the linker.
The firmware was using the one from
mips32r2_common
before (binary checked).So the final linked version is the same.
This PR is using a commit from #8711 with added info in the commit message.
Verification
I checked what was built with:
And the timer_set implementation is the same before and after the fix.
Issues/PRs references
It is required for #8711 and replaces #8720 which raised other problems.