-
Notifications
You must be signed in to change notification settings - Fork 67
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
Implement InputPin trait for PA1<Output<OpenDrain>> #84
Comments
The hardware design of the gpio's from the stm32fx-line should all be the same, so nothing speaks against adding the So if you are willing to put together a PR, go for it. I appreciate every contribution. :) You could take the implementation from the stm32f4xx-hal. stm32f1xx-hal has a similar solution, but only implements it for OpenDrain. I don't know if we should limit the Trait to |
I think I'm running into this as well, in an attempt to get the DS18B20 temp sensor working. |
The problem with that is that it will raise wrong expectations and potentially cause hardware failure through incorrect use. You cannot safely do this with a pin in push-pull mode, guess we should have been more careful in the review of that change. 😅 |
So... How can we get the one wire protocol working? Is this an issue of needing to work off of a fork? (Note that even with my PR fork above, I'm unable to get it working, perhaps due to the OneWire lib rather than this, or perhaps something else is required) It's notable, in that in Python/Raspberry Pi land, getting a DS1820B sensor working is hardware 101, but here is seems difficult compared to SPI, I2C, and GPIO. |
The onewire crate released an unrelated patch on Github, which now works for me... if you use my Open PR. Re reluctance to merge this: What alternate do you suggest to get protocols like this working? This one in particular is popular, due to use in the DS18B20 temperature sensor. |
I'm trying to read a dht11 humidity sensor with a stm32f303 discovery board
the example in the dht11 crate is for stmf0xx boards:
https://github.com/michaelbeaumont/dht-sensor/blob/master/examples/stm32f042.rs#L30
Rather than give in and just buy an stm32f0xx board I'd like to have a crack at adding this trait. If anyone knows that it is futile (eg
Output<OpenDrain>
is not bothInputPin
andOutputPin
for the f3) or not useful in anyway please say so.Part-converted example: https://gist.github.com/peter-wilkins/b5c914b1f8f5b4098b198133b4280472
I'm just starting out with embedded but will attempt to put together an PR, it may take some time. Any advice appreciated.
The text was updated successfully, but these errors were encountered: