Skip to content

esp_io_expander: how to use with APIs with GPIO number parameter #615

@dmartauz

Description

@dmartauz

Related area

esp_io_expander

Hardware specification

custom ESP32-P4 board

Is your feature request related to a problem?

In our application with ESP32-P4 as main host we need to use IO expander due to lack of GPIOs. We would like to use it for slow and rarely used signals such as RESET pins of external circuits, BOOT pins of external RCPs, etc.

Example - we would like to connect RESET pin of external Ethernet PHY to an IO expander.
https://docs.espressif.com/projects/esp-idf/en/latest/esp32p4/api-reference/network/esp_eth.html#create-mac-and-phy-instance
phy_config.reset_gpio_num = CONFIG_EXAMPLE_ETH_PHY_RST_GPIO; // alter the GPIO used for PHY reset
eth_phy_config_t struct does not allow to define callbacks, only GPIO pin number.

Describe the solution you'd like

It is possible to set pin number parameter to -1 and handle RESET pin of Ethernet PHY outside of Ethernet API but it would be better if GPIOs provided by IO expander could be used the same way as native GPIOs available on the SoC.

Describe alternatives you've considered

No response

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions