-
Notifications
You must be signed in to change notification settings - Fork 204
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
Tracking issue for timer traits #359
Comments
Unbounded time constraints are really cumbersome to work with. I'm currently using the timer traits (mainly To work around the several different types implemented by peripheral crates I currently use drogue-embedded-timer as a wrapper. My driver crates use embedded-time, which works quite well, but may be a bit overkill to integrate this completely in embedded-hal. I don't really need all the features in embedded-time. I mainly use timers in us or ms range. It would be really nice if we could get back timer traits with a constrained minimal |
As I can see |
Using const generics to handle the conversions at compile time seems very compelling. I'll give that a shot. |
IMO time is non-trivial enough that I think something like embedded-time should be integrated into embedded-hal - It's complex, but for a good reason. |
Highlighting a use case. I'm the owner of Implementing the full HID spec functionality requires keeping track of time-outs that are set by the host machine and ensuring that idle responses are sent if the time-out occurs. I'm currently assuming the use of I'd love a mechanism in hal that either provides a real time clock that can be polled or a mechanism to set timers. Hardware timers aren't really appropriate, I'm interested in knowing if no data has been sent for x ms rather than having a regular interrupt/clock tick. Currently I'm using |
The timer traits available on the 0.2.x versions have been removed ahead of the 1.0.0 release. See: #357
This issue servers as a tracking issue until we add them back. The open (breaking) problems should be reasonably-well solved and all associated types should have appropriate bounds that enable generic code use.
Timer traits as of the 0.2.7 release:
Relevant issues/PRs:
Periodic
timers #65Please feel free to participate, highlight your current use cases, problems and provide solutions.
The text was updated successfully, but these errors were encountered: