From 68b644e52ca9edfdfbf2b891b2b1e3a0d9aff2ca Mon Sep 17 00:00:00 2001 From: "U-AndyHPNB2\\Andy" Date: Thu, 1 Apr 2021 00:21:08 +0200 Subject: [PATCH] fix gpio_config from https://github.com/espressif/ESP8266_RTOS_SDK/pull/1071 --- components/esp8266/driver/gpio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/esp8266/driver/gpio.c b/components/esp8266/driver/gpio.c index a0124f669..d41db6242 100644 --- a/components/esp8266/driver/gpio.c +++ b/components/esp8266/driver/gpio.c @@ -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;