The reason I needed gpio_iomux_out() was in order to allow me to use GPIO7 and GPIO8 on the ESP32-PICO-V3-02. The ESP32 PICO Series Datasheet says in Table 8 that these two GPIOs "can be used freely". However, I found that they did not function as outputs. Further investigation revealed that the IOMUX was not set up properly to route GPIO signals to these pins. Hence the need for me to call gpio_iomux_out().gpio_iomux_in() and gpio_iomux_out() have been replaced by gpio_iomux_input() and gpio_iomux_output(), and have been moved to esp_private/gpio.h header file as private APIs for internal use only.
An earlier chip variant, the ESP32-PICO-D4, used GPIO7 and GPIO8 for in-package flash. Apparently the incorrect IOMUX setting was a left-over from that earlier chip.
Is there a way for me to setup the IOMUX as I need without relying on a private API which could go away in the future?
