fix(esp_eth): Fixed Ethernet link reset when Ethernet is stopped

This commit is contained in:
Ondrej Kosta
2024-02-16 12:34:01 +01:00
parent dee34c2a48
commit 1ae315e1ed
8 changed files with 123 additions and 20 deletions
+14 -1
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -128,6 +128,19 @@ struct esp_eth_phy_s {
*/
esp_err_t (*get_link)(esp_eth_phy_t *phy);
/**
* @brief Set Ethernet PHY link status
*
* @param[in] phy: Ethernet PHY instance
* @param[in] link new link status
*
* @return
* - ESP_OK: set Ethernet PHY link status successfully
* - ESP_FAIL: set Ethernet PHY link status failed because some error occurred
*
*/
esp_err_t (*set_link)(esp_eth_phy_t *phy, eth_link_t link);
/**
* @brief Power control of Ethernet PHY
*
@@ -150,6 +150,16 @@ esp_err_t esp_eth_phy_802_3_set_speed(phy_802_3_t *phy_802_3, eth_speed_t speed)
*/
esp_err_t esp_eth_phy_802_3_set_duplex(phy_802_3_t *phy_802_3, eth_duplex_t duplex);
/**
* @brief Set Ethernet PHY link status
*
* @param phy_802_3 IEEE 802.3 PHY object infostructure
* @param link new link status
* @return
* - ESP_OK: Ethernet PHY link set successfuly
*/
esp_err_t esp_eth_phy_802_3_set_link(phy_802_3_t *phy_802_3, eth_link_t link);
/**
* @brief Initialize Ethernet PHY
*