Chapter 2. API Reference
esp_err_t (*get_link)(esp_eth_phy_t
Get Ethernet PHY link status.
Return
• ESP_OK: get Ethernet PHY link status successfully
• ESP_FAIL: get Ethernet PHY link status failed because some error occurred
Parameters
• [in] phy: Ethernet PHY instance
esp_err_t (*pwrctl)(esp_eth_phy_t
Power control of Ethernet PHY.
Return
• ESP_OK: control Ethernet PHY power successfully
• ESP_FAIL: control Ethernet PHY power failed because some error occurred
Parameters
• [in] phy: Ethernet PHY instance
• [in] enable: set true to power on Ethernet PHY; ser false to power off Ethernet PHY
esp_err_t (*set_addr)(esp_eth_phy_t
Set PHY chip address.
Return
• ESP_OK: set Ethernet PHY address successfully
• ESP_FAIL: set Ethernet PHY address failed because some error occurred
Parameters
• [in] phy: Ethernet PHY instance
• [in] addr: PHY chip address
esp_err_t (*get_addr)(esp_eth_phy_t
Get PHY chip address.
Return
• ESP_OK: get Ethernet PHY address successfully
• ESP_ERR_INVALID_ARG: get Ethernet PHY address failed because of invalid argument
Parameters
• [in] phy: Ethernet PHY instance
• [out] addr: PHY chip address
esp_err_t (*advertise_pause_ability)(esp_eth_phy_t
Advertise pause function supported by MAC layer.
Return
• ESP_OK: Advertise pause ability successfully
• ESP_ERR_INVALID_ARG: Advertise pause ability failed because of invalid argument
Parameters
• [in] phy: Ethernet PHY instance
• [out] addr: Pause ability
esp_err_t (*loopback)(esp_eth_phy_t
Return
• ESP_OK: configures PHY instance loopback function successfully
• ESP_FAIL: PHY instance loopback configuration failed because some error occurred
Parameters
• [in] phy: Ethernet PHY instance
• [in] enable: enables or disables PHY loopback
esp_err_t (*del)(esp_eth_phy_t
Free memory of Ethernet PHY instance.
Return
• ESP_OK: free PHY instance successfully
• ESP_FAIL: free PHY instance failed because some error occurred
Parameters
Espressif Systems
*phy)
*phy, bool enable)
*phy, uint32_t addr)
*phy, uint32_t *addr)
*phy, bool enable)
*phy)
190
Submit Document Feedback
*phy, uint32_t ability)
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers