From 23f0d8c17b70f4a794a6b52646187e30f31af3ee Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Nihei Date: Wed, 3 Mar 2021 19:22:44 -0300 Subject: [PATCH] xtensa/esp32: Fix default GPIO function when no option is provided --- arch/xtensa/src/esp32/esp32_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/src/esp32/esp32_gpio.c b/arch/xtensa/src/esp32/esp32_gpio.c index e993308319..3cc4f8690d 100644 --- a/arch/xtensa/src/esp32/esp32_gpio.c +++ b/arch/xtensa/src/esp32/esp32_gpio.c @@ -222,7 +222,7 @@ int esp32_configgpio(int pin, gpio_pinattr_t attr) } else { - func |= (uint32_t)((2 >> FUNCTION_SHIFT) << MCU_SEL_S); + func |= (uint32_t)(PIN_FUNC_GPIO << MCU_SEL_S); } if ((attr & OPEN_DRAIN) != 0)