Espressif ESP32-S2 Programming Manual page 202

Table of Contents

Advertisement

Chapter 2. API Reference
• [in] phy: Ethernet PHY instance
struct eth_phy_config_t
Ethernet PHY configuration.
Public Members
int32_t phy_addr
PHY address, set -1 to enable PHY address detection at initialization stage
uint32_t reset_timeout_ms
Reset timeout value (Unit: ms)
uint32_t autonego_timeout_ms
Auto-negotiation timeout value (Unit: ms)
int reset_gpio_num
Reset GPIO number, -1 means no hardware reset
Macros
ESP_ETH_PHY_ADDR_AUTO
ETH_PHY_DEFAULT_CONFIG()
Default configuration for Ethernet PHY object.
Type Definitions
typedef struct
esp_eth_phy_s
Ethernet PHY.
Header File
components/esp_eth/include/esp_eth_netif_glue.h
Functions
esp_eth_netif_glue_handle_t esp_eth_new_netif_glue(esp_eth_handle_t
Create a netif glue for Ethernet driver.
Note netif glue is used to attach io driver to TCP/IP netif
Return glue object, which inherits esp_netif_driver_base_t
Parameters
• eth_hdl: Ethernet driver handle
esp_err_t esp_eth_del_netif_glue(esp_eth_netif_glue_handle_t
Delete netif glue of Ethernet driver.
Return -ESP_OK: delete netif glue successfully
Parameters
• eth_netif_glue: netif glue
esp_err_t
esp_eth_set_default_handlers(void *esp_netif)
Register default IP layer handlers for Ethernet.
Note : Ethernet handle might not yet properly initialized when setting up these default handlers
Warning : This function is deprecated and is kept here only for compatibility reasons. Registration of default
IP layer handlers for Ethernet is now handled automatically. Do not call this function if you want to use
multiple Ethernet instances at a time.
Return
• ESP_ERR_INVALID_ARG: invalid parameter (esp_netif is NULL)
• ESP_OK: set default IP layer handlers successfully
• others: other failure occurred during register esp_event handler
Parameters
Espressif Systems
esp_eth_phy_t
191
Submit Document Feedback
eth_hdl)
eth_netif_glue)
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF