kellerkindt / onewire

OneWire bus implementation in Rust using embedded-hal
Apache License 2.0
35 stars 14 forks source link

Focus library on generic one wire support #4

Closed TDHolmes closed 4 years ago

TDHolmes commented 4 years ago

Hello, I'm looking to start my own crate specifically for a different one wire temperature sensor and stumbled upon this crate. It looks like there is good, generic one wire support in this crate, but support for the ds18b20 is mixed in here too. I think it makes sense to clean up this crate to focus on generic one wire support and perhaps spin ds18b20 out into its own crate that uses this crate. Let me know what you think.

If you want, I can open a PR that removes the ds18b20 stuff, but I'm assuming you would want to make a new repo yourself to have a ds18b20 specific crate.

riaqn commented 4 years ago

An alternative approach would be to add support for other devices directly into this library.

TDHolmes commented 4 years ago

True, but doesn't seem very scaleable. There's a lot of one wire chips out there

riaqn commented 4 years ago

Yes, but I don't see how is that not scaleable.

Each chip will take like 2kb of source code. We can use features to control whether the support for a device is actually compiled. It won't be a big trouble.

I suggest you start by adding new devices to this library and create PR. Only consider spliting crates when it's clearly motivated.