esp32[c3|c6|h2]: Fix misconfigured gpio issue

This commit is contained in:
Eren Terzioglu 2025-01-09 11:26:36 +01:00 committed by Xiang Xiao
parent 1b8d5a4367
commit 8c9162ef8c
3 changed files with 6 additions and 6 deletions

View file

@ -484,7 +484,7 @@ int esp_gpio_init(void)
/* Configure the pins that will be used as output */ /* Configure the pins that will be used as output */
esp_gpio_matrix_out(g_gpiooutputs[i], SIG_GPIO_OUT_IDX, 0, 0); esp_gpio_matrix_out(g_gpiooutputs[i], SIG_GPIO_OUT_IDX, 0, 0);
esp_configgpio(g_gpiooutputs[i], OUTPUT_FUNCTION_1 | INPUT_FUNCTION_1); esp_configgpio(g_gpiooutputs[i], OUTPUT_FUNCTION_2 | INPUT_FUNCTION_2);
esp_gpiowrite(g_gpiooutputs[i], 0); esp_gpiowrite(g_gpiooutputs[i], 0);
pincount++; pincount++;
@ -503,7 +503,7 @@ int esp_gpio_init(void)
/* Configure the pins that will be used as interrupt input */ /* Configure the pins that will be used as interrupt input */
esp_configgpio(g_gpiointinputs[i], INPUT_FUNCTION_1 | PULLDOWN); esp_configgpio(g_gpiointinputs[i], INPUT_FUNCTION_2 | PULLDOWN);
pincount++; pincount++;
} }

View file

@ -484,7 +484,7 @@ int esp_gpio_init(void)
/* Configure the pins that will be used as output */ /* Configure the pins that will be used as output */
esp_gpio_matrix_out(g_gpiooutputs[i], SIG_GPIO_OUT_IDX, 0, 0); esp_gpio_matrix_out(g_gpiooutputs[i], SIG_GPIO_OUT_IDX, 0, 0);
esp_configgpio(g_gpiooutputs[i], OUTPUT_FUNCTION_1 | INPUT_FUNCTION_1); esp_configgpio(g_gpiooutputs[i], OUTPUT_FUNCTION_2 | INPUT_FUNCTION_2);
esp_gpiowrite(g_gpiooutputs[i], 0); esp_gpiowrite(g_gpiooutputs[i], 0);
pincount++; pincount++;
@ -503,7 +503,7 @@ int esp_gpio_init(void)
/* Configure the pins that will be used as interrupt input */ /* Configure the pins that will be used as interrupt input */
esp_configgpio(g_gpiointinputs[i], INPUT_FUNCTION_1 | PULLDOWN); esp_configgpio(g_gpiointinputs[i], INPUT_FUNCTION_2 | PULLDOWN);
pincount++; pincount++;
} }

View file

@ -484,7 +484,7 @@ int esp_gpio_init(void)
/* Configure the pins that will be used as output */ /* Configure the pins that will be used as output */
esp_gpio_matrix_out(g_gpiooutputs[i], SIG_GPIO_OUT_IDX, 0, 0); esp_gpio_matrix_out(g_gpiooutputs[i], SIG_GPIO_OUT_IDX, 0, 0);
esp_configgpio(g_gpiooutputs[i], OUTPUT_FUNCTION_1 | INPUT_FUNCTION_1); esp_configgpio(g_gpiooutputs[i], OUTPUT_FUNCTION_2 | INPUT_FUNCTION_2);
esp_gpiowrite(g_gpiooutputs[i], 0); esp_gpiowrite(g_gpiooutputs[i], 0);
pincount++; pincount++;
@ -503,7 +503,7 @@ int esp_gpio_init(void)
/* Configure the pins that will be used as interrupt input */ /* Configure the pins that will be used as interrupt input */
esp_configgpio(g_gpiointinputs[i], INPUT_FUNCTION_1 | PULLDOWN); esp_configgpio(g_gpiointinputs[i], INPUT_FUNCTION_2 | PULLDOWN);
pincount++; pincount++;
} }