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

Remove I2cInterface. #20

Merged
merged 4 commits into from
Jan 19, 2024
Merged

Remove I2cInterface. #20

merged 4 commits into from
Jan 19, 2024

Conversation

reitermarkus
Copy link
Contributor

@reitermarkus reitermarkus commented Jan 18, 2024

Since embedded_hal::i2c::I2c provides both read and write, it make sense to merge the ReadData and WriteData traits.

Removes I2cInterface and instead depend on the embedded-hal traits directly.

@reitermarkus reitermarkus force-pushed the merge-traits branch 3 times, most recently from 243adb8 to 97bb9dc Compare January 19, 2024 13:05
@reitermarkus reitermarkus changed the title Merge ReadData and WriteData traits. Remove I2cInterface. Jan 19, 2024
Copy link
Owner

@eldruin eldruin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks!
This driver was designed to support SPI devices as well but these turned out to have a different interface, registers, etc.

src/lib.rs Outdated
@@ -24,7 +24,7 @@
//! [`into_continuous()`]: struct.Ads1x1x.html#method.into_continuous
//! [read_os]: struct.Ads1x1x.html#method.read
//! [`start()`]: struct.Ads1x1x.html#method.start
//! [read_cont]: struct.Ads1x1x.html#impl-OneShot%3CAds1x1x%3CDI%2C%20IC%2C%20CONV%2C%20OneShot%3E%2C%20i16%2C%20CH%3E
//! [read_cont]: struct.Ads1x1x.html#impl-OneShot%3CAds1x1x%3CI2C%2C%20IC%2C%20CONV%2C%20OneShot%3E%2C%20i16%2C%20CH%3E
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this link correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, fixed.

@eldruin
Copy link
Owner

eldruin commented Jan 19, 2024

I fixed the CI now and added a couple of small changes.
Could you rebase this?

@reitermarkus reitermarkus requested a review from eldruin January 19, 2024 14:08
Copy link
Owner

@eldruin eldruin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@eldruin eldruin merged commit 5cd3613 into eldruin:master Jan 19, 2024
@reitermarkus reitermarkus deleted the merge-traits branch January 19, 2024 14:18
KidiIT

This comment was marked as spam.

@KidiIT

This comment was marked as spam.

@KidiIT

This comment was marked as spam.

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.

3 participants