-
Notifications
You must be signed in to change notification settings - Fork 32
zephyr: sys: Create Timer #42
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
9d8e709
to
f3528b3
Compare
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.
LGTM - in the test, I originally mistook 'simples' for 'samples' and thought it was a typo. Naming things is hard 🤷🏼♂️
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.
Looks good overall, just some minor comments. Going approve regardless.
I think some of the intermediate commits look like they could be squashed? They just read like minor followups of the main commits.
So, I'm not sure the right answer here. When commits are amended, github basically discards the history and it is really hard to tell what was changed, so I tend to add more commits. For new code like this, it probably makes sense to squash the history down after the reviews are done. I'll fix the things you mention, which are pretty minor, and then simplify the history.. |
Avoid generating build warnings about things that look like links in bindgen copied rustdocs. The larger problem is that these are in a different syntax than rustdoc comments, and will not be formatted nicely. Signed-off-by: David Brown <[email protected]>
Add a set of wrappers for Zephyr's timer. Timers start as `StoppedTimer`, which can be either dynamic or static (through object). This can then be started either with `start_simple` or `start_callback` which will return a `SimpleTimer` or a `CallbackTimer`. This can then be turned back into stopped timers with a `stop` method. Signed-off-by: David Brown <[email protected]>
Create a test to exercise the zephyr::timer timers. This uses both SimpleTimer and CallbackTimer intensely for 5 seconds and prints out the results. Signed-off-by: David Brown <[email protected]>
Add a set of wrappers for Zephyr's timer. Timers start as
StoppedTimer
, which can be either dynamic or static (through object). This can then be started either withstart_simple
orstart_callback
which will return aSimpleTimer
or aCallbackTimer
. This can then be turned back into stopped timers with astop
method.