eldruin / ads1x1x-rs

Platform-agnostic Rust driver for the ADS1x1x ultra-small, low-power analog-to-digital converters (ADC). Compatible with ADS1013, ADS1014, ADS1015, ADS1113, ADS1114 and ADS1115
https://blog.eldruin.com/ads1x1x-analog-to-digital-converter-driver-in-rust/
Apache License 2.0
31 stars 9 forks source link

Update to `embedded-hal` 1.0. #16

Closed reitermarkus closed 5 months ago

reitermarkus commented 5 months ago

@eldruin, I moved the additional changes to a separate PR. This one should be manageable now.

reitermarkus commented 5 months ago

Please do not remove DynamicOneShot. It is a useful trait asked for by the community.

From reading https://github.com/eldruin/ads1x1x-rs/issues/10#issuecomment-890776015, it looks like this trait didn't actually solve the issue, which is why I removed it.

Why did you remove the whole device-specific channel selection mechanism? That ensures that only valid channels for the current device can be read.

Ah, I missed that this ensures only valid channels. I simply removed it since there is no corresponding embedded-hal 1.0 trait to base this on.

reitermarkus commented 5 months ago

@eldruin, I have now re-added the device-specific channel selection.