ESP32 GPIO Configuration (gpio_pad_select_gpio)

Rrobinet
Posts: 31
Joined: Wed Aug 16, 2017 7:05 am

ESP32 GPIO Configuration (gpio_pad_select_gpio)

Postby Rrobinet » Wed Jan 12, 2022 9:09 am

Hello,

I couldn't find in the ESP32 documentation any reference to

Code: Select all

gpio_pad_select_gpio()
Is this function obsolete or replaced by :

Code: Select all

gpio_config()
Alternatively where can I found a description and of course the need to use various gpio_pad_xx() functions.

Thanks in advance
Robert

Sprite
Espressif staff
Espressif staff
Posts: 10599
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 GPIO Configuration (gpio_pad_select_gpio)

Postby Sprite » Thu Jan 13, 2022 12:56 am

It's a ROM function... i think you need to #include "esp_rom_gpio.h" before you can use it, but it may be that it's renamed to esp_rom_gpio_pad_select_gpio() there (to distinguish it as a ROM function). Note that you probably want to use something like gpio_reset_pin() (or use gpio_config, which also does this as part of the process) as gpio_pad_select_gpio doesn't cover all cases anymore on newer chips.

Rrobinet
Posts: 31
Joined: Wed Aug 16, 2017 7:05 am

Re: ESP32 GPIO Configuration (gpio_pad_select_gpio)

Postby Rrobinet » Sat Jan 15, 2022 9:50 am

OK .... I understand it but after some tests despite the fact lack of documentation (with the exception of the one of Kolban)
Thanks
Robert

Sprite
Espressif staff
Espressif staff
Posts: 10599
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 GPIO Configuration (gpio_pad_select_gpio)

Postby Sprite » Sun Jan 16, 2022 1:25 am

I've made an internal issue over the lack of documentation, for what it's worth.

User avatar
dg9ngf
Posts: 65
Joined: Mon Sep 16, 2019 6:49 pm
Location: Germany
Contact:

Re: ESP32 GPIO Configuration (gpio_pad_select_gpio)

Postby dg9ngf » Thu Jun 19, 2025 11:00 am

This helped: https://github.com/espressif/ESP8266_RTOS_SDK/pull/477

I needed to add this to get the function:

#include <rom/gpio.h>

And apparently this function is undocumented outside the source code. Isn't the online documentation generated from the code?

Who is online

Users browsing this forum: No registered users and 0 guests