From 6db437e2dee38da27f9cc47140ef7b2f883a46b7 Mon Sep 17 00:00:00 2001 From: Tiago Medicci Serrano Date: Thu, 31 Jul 2025 16:16:57 -0300 Subject: [PATCH] boards/esp32[c3|c6|h2]: Fix GPIO function used by the button This commit fixes the function to select the GPIO behavior for the pins associated to the board's button. Signed-off-by: Tiago Medicci Serrano --- boards/risc-v/esp32c3/esp32c3-generic/src/esp32c3_buttons.c | 2 +- boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_buttons.c | 2 +- boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_buttons.c | 2 +- boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_buttons.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/boards/risc-v/esp32c3/esp32c3-generic/src/esp32c3_buttons.c b/boards/risc-v/esp32c3/esp32c3-generic/src/esp32c3_buttons.c index 0be6be2eff..bde9c3993e 100644 --- a/boards/risc-v/esp32c3/esp32c3-generic/src/esp32c3_buttons.c +++ b/boards/risc-v/esp32c3/esp32c3-generic/src/esp32c3_buttons.c @@ -75,7 +75,7 @@ uint32_t board_button_initialize(void) { - esp_configgpio(BUTTON_BOOT, INPUT_FUNCTION_3 | PULLUP); + esp_configgpio(BUTTON_BOOT, INPUT_FUNCTION_2 | PULLUP); return 1; } diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_buttons.c b/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_buttons.c index 33304dcfbb..8f43500ba4 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_buttons.c +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_buttons.c @@ -75,7 +75,7 @@ uint32_t board_button_initialize(void) { - esp_configgpio(BUTTON_BOOT, INPUT_FUNCTION_3 | PULLUP); + esp_configgpio(BUTTON_BOOT, INPUT_FUNCTION_2 | PULLUP); return 1; } diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_buttons.c b/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_buttons.c index 26c552edaa..afec08d150 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_buttons.c +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_buttons.c @@ -75,7 +75,7 @@ uint32_t board_button_initialize(void) { - esp_configgpio(BUTTON_BOOT, INPUT_FUNCTION_3 | PULLUP); + esp_configgpio(BUTTON_BOOT, INPUT_FUNCTION_2 | PULLUP); return 1; } diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_buttons.c b/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_buttons.c index 6e4e722b06..5f88b9b169 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_buttons.c +++ b/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_buttons.c @@ -75,7 +75,7 @@ uint32_t board_button_initialize(void) { - esp_configgpio(BUTTON_BOOT, INPUT_FUNCTION_3 | PULLUP); + esp_configgpio(BUTTON_BOOT, INPUT_FUNCTION_2 | PULLUP); return 1; }