Skip to content
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

embedded-hal DelayNs implementation is inconsistent with embedded-hal-async #74

Open
chrysn opened this issue Jan 26, 2024 · 0 comments

Comments

@chrysn
Copy link
Member

chrysn commented Jan 26, 2024

Those implementations use different approaches:

  • embedded-hal implements the trait on every ZTimer Clock, switching around times.
  • embedded-hal-async implements a clock independent Delay struct, which picks the right clock.
  • embedded-hal 0.2 had different traits that were implemented on the different clocks. (support removed from this crate)

There's no clear winner here yet; still, some unification is in order (at least for the new traits). Possibly we could supply both, with the Delay being more "pick the best available clock for the task", and the impls on Clock using that clock no matter how sensible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant