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

[suggestion] example: Use no_std, and delay using embedded-hal #4

Merged
merged 1 commit into from
Aug 15, 2018

Conversation

chrysn
Copy link
Contributor

@chrysn chrysn commented Aug 15, 2018

This does not make any difference in the concrete example
(linux-embedded-hal's delay is implemented in terms of std::thread), but
it removes a stone from the path of people who start from the example
towards an actual use of embedded hal. (They'll still have to find
suitable replacements for env_hal and linux_embedded_hal, but that's
the parts that have to be.)


There are obviously many ways in which an example works. I think that this is a slight improvement, but if you disagree, feel free to just close this PR.

(The core::Duration stays in there because the lib uses Duration, and embedded-hal delays don't work with that, see rust-embedded/embedded-hal#59).

This does not make any difference in the concrete example
(linux-embedded-hal's delay is implemented in terms of std::thread), but
it removes a stone from the path of people who start from the example
towards an actual use of embedded hal. (They'll still have to find
suitable replacements for env_hal and linux_embedded_hal, but that's
the parts that have to be.)
@marcelbuesing
Copy link
Owner

Absolutely makes sense. Thank you!

@marcelbuesing marcelbuesing merged commit 8bdc6d4 into marcelbuesing:master Aug 15, 2018
@chrysn chrysn deleted the nostd branch August 15, 2018 21:33
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

Successfully merging this pull request may close these issues.

None yet

2 participants