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

OneWire support #104

Closed
David-OConnor opened this issue Jun 1, 2020 · 2 comments
Closed

OneWire support #104

David-OConnor opened this issue Jun 1, 2020 · 2 comments

Comments

@David-OConnor
Copy link
Contributor

David-OConnor commented Jun 1, 2020

OneWire is a digital protocol used by a very popular temperature sensor, the DS1820B. I'm unable to get it working with this crate, and am wonder what you think the best approach is.

I'm suspicious this recent issue is related.

I think the issue is that the GPIO pins this library uses are generally input or output only, and don't implement both. Is this correct? The specific issue I'm running into with this OneWire crate is that it expects the pin to implement this:

pub trait OpenDrainOutput<E>: OutputPin<Error = E> + InputPin<Error = E> {}

Is this an issue of implementing both InputPin and OutputPin for gpio pins configured as open drain? I looked through this source file to try to find a solution, either robust, or a hack to make OneWire work, but am not sure how to deal with the macros. Is it just an issue of making a way to configure a pin with both the InputPin and OutputPin methods? Ie set_low() and is_low()? Ie a copy+paste job.

Thoughts? Is this the same thing as the issue I linked near the top?

@teskje
Copy link
Collaborator

teskje commented Jul 18, 2020

@David-OConnor I believed this was fixed with merging #114. Can you confirm?

@David-OConnor
Copy link
Contributor Author

Affirm. Closing!

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

No branches or pull requests

2 participants