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

Fix for GPIO0/2/4/5 not being able to be used as inputs (GIT8266O-649) #1071

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/esp8266/driver/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ esp_err_t gpio_config(const gpio_config_t *gpio_cfg)
// It should be noted that GPIO0, 2, 4, and 5 need to set the func register to 0,
// and the other GPIO needs to be set to 3 so that IO can be GPIO function.
if ((0x1 << io_num) & (GPIO_Pin_0 | GPIO_Pin_2 | GPIO_Pin_4 | GPIO_Pin_5)) {
pin_reg.rtc_pin.func_low_bit = 0;
pin_reg.rtc_pin.func_high_bit = 0;
pin_reg.func_low_bit = 0;
pin_reg.func_high_bit = 0;
} else {
pin_reg.func_low_bit = 3;
pin_reg.func_high_bit = 0;
Expand Down