Unverified Commit 9bed5985 authored by Giampiero Baggiani's avatar Giampiero Baggiani Committed by GitHub

Disable pull-up/pull-down when setting pin as input (#332)

In `pinMode()` I think it would be better to call `gpio_disable_pulls()` on the ulPin when ulMode == INPUT.
Adding `gpio_disable_pulls(RP_PIN);` after `pinMode(RP_PIN, INPUT);` solves the issue.
parent cf63040c
......@@ -28,6 +28,7 @@ extern "C" void pinMode(pin_size_t ulPin, PinMode ulMode) {
case INPUT:
gpio_init(ulPin);
gpio_set_dir(ulPin, false);
gpio_disable_pulls(ulPin);
break;
case INPUT_PULLUP:
gpio_init(ulPin);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment