-
Notifications
You must be signed in to change notification settings - Fork 2.1k
xtimer: Allow arbitrary timer frequency, second attempt #5608
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
Adding the CI build flag to assist in finding missing API updates.. |
Verified that the inline function for usec->tick conversion of a compile time constant generates no extra code via manual inspection of assembly output. Optimization level Conversion of run time variable values will of course generate conversion instructions since it is not possible to rescale them during compile time. |
4320828
to
f68ba74
Compare
9fc7a0f
to
12f73f2
Compare
#5612 was split off from this PR as a separate change. |
d4f231c
to
f59948a
Compare
postponing to release 2016.10 |
c404dff
to
ed1a391
Compare
rebased |
Can you squash your fixup? I think everything is OK now so we could have this PR merged soon :) |
d148b38
to
c505867
Compare
@kYc0o |
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.
ACK
And go! |
Wow, cool! |
Awesome! Thank you all for your work here |
Significantly simplified version of #3990, using the ideas from #4002.
The public API of xtimer now uses two new types
xtimer_ticks32_t
, andxtimer_ticks64_t
, to catch any missing usec/sec/nanosec to tick conversions. Internally, all timer scheduling and offsets are using hardware ticks instead of microseconds.All internal xtimer functions use untyped (i.e.
uint32_t
,uint64_t
) ticks and are prefixed with underscore to avoid mistakes. This extra level of abstraction is only a thin wrapper and the conversions between ticks and microseconds are inlined and will become a no-op if the hardware timer also runs at 1 MHz.xtimer_usleep_until
has been renamedxtimer_periodic_wakeup
, to better reflect the purpose (and since it is now using ticks and not microseconds as parameters). This change was forked off into #5612.Based on #5294, #5607.Marked as WIP until all tests and drivers have been adapted to use the new
xtimer_ticks*_t
type.