esp-rs / esp32-hal

A hardware abstraction layer for the esp32 written in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GPIO34-39 are not directly usable as floating inputs

sapir opened this issue · comments

commented
dp.GPIO.split().gpio34

is a GPIO34<Input<Floating>>, but I tried reading from it without calling into_floating_input() and got 0. into_floating_input() fixed it. This may also apply to other pins as well; I ran into these because they don't have pullups/pulldowns, so I have to use them as floating pins anyway.

I will check the default assumed states to fix this.

Addressed by #36. Chosen to make all pin types Unknown by default: the state can change depending on the bootloader etc, so best not to trust on the defaults.

#36 is merged, should be ok to close now.