Closed TDHolmes closed 2 years ago
The issue is that atsamd-hal doesn't implement InputPin
on OpenDrain pins, only on Input pins (https://github.com/atsamd-rs/atsamd/blob/1badb46942c2ec6eed9a4f5fe498c0d220b6f811/hal/src/common/gpio.rs#L343). The onewire implementation needs this and the stm32f1xx-hal does provide it (https://github.com/stm32-rs/stm32f1xx-hal/blob/8b5251431af453d4075b52d1c4dcd456104243f7/src/gpio.rs#L303). Your best bet is to fix it (implement InputPin for OpenDrain pins) in the atsamd-hal or open an issue over there.
Same issue with stm32f3xx_hal
, and rppal
, which both seem to be V2
compatible. Happens with push_pull_output
as well as open drain.
I patched the above crate to make it work. Was a quick fix.
So, this issue is no longer valid?
I'm still unable to make it work with stm32f3, or Rasperry Pi.
It looks like the latest set of commits fixes it for me.
This works with atsamd GPIO revamp
Hey, I've been trying for the last few days to get this crate to work with my setup on an
atsamd
chip (specifically, thefeather_m0
board), but have been unable to get it to work. It seems I can't get a pin that clearly implements both the input and output trait as required by theOpenDrainOutput
trait.Here's a slimmed down version of my code:
I get the following error:
In your example, you call
downgrade()
after converting to an open drain output, but it seems theatsamd-hal
does not have this method on their GPIO HAL. Any ideas?