Skip to content

Commit

Permalink
fix gpio_config from espressif#1071
Browse files Browse the repository at this point in the history
  • Loading branch information
dsptech committed Mar 31, 2021
1 parent e6bf40d commit 68b644e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/esp8266/driver/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,11 @@ 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;
/*
* Fix from https://github.com/espressif/ESP8266_RTOS_SDK/pull/1071
*/
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

0 comments on commit 68b644e

Please sign in to comment.