marcelbuesing / bme680

Pure Rust BME680 implementation
MIT License
28 stars 26 forks source link

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

Closed chrysn closed 5 years ago

chrysn commented 5 years ago

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 https://github.com/rust-embedded/embedded-hal/issues/59).

marcelbuesing commented 5 years ago

Absolutely makes sense. Thank you!