From c6016952e81b5f62ad651678b720700acd2a2339 Mon Sep 17 00:00:00 2001 From: Gabe Date: Sat, 19 Nov 2016 10:03:15 -0800 Subject: [PATCH] Pullup is not configured by gpio_config #110 --- components/driver/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/driver/gpio.c b/components/driver/gpio.c index ddbcb352c0..d5d4d9d40a 100644 --- a/components/driver/gpio.c +++ b/components/driver/gpio.c @@ -321,9 +321,9 @@ esp_err_t gpio_config(gpio_config_t *pGPIOConfig) } if(pGPIOConfig->pull_up_en) { pu_en = 1; - REG_SET_BIT(gpio_pu_pd_desc[io_num].reg, gpio_pu_pd_desc[io_num].pd); + REG_SET_BIT(gpio_pu_pd_desc[io_num].reg, gpio_pu_pd_desc[io_num].pu); } else { - REG_CLR_BIT(gpio_pu_pd_desc[io_num].reg, gpio_pu_pd_desc[io_num].pd); + REG_CLR_BIT(gpio_pu_pd_desc[io_num].reg, gpio_pu_pd_desc[io_num].pu); } if(pGPIOConfig->pull_down_en) { pd_en = 1;