Added KSZ8041/81 and LAN8720 Driver IDF v5.0 migration description
LAN8720 function call clean up
This commit is contained in:
@@ -8,7 +8,7 @@ menu "esp_eth TEST_APPS Configuration"
|
||||
|
||||
config TARGET_ETH_PHY_DEVICE_IP101
|
||||
bool "IP101"
|
||||
config TARGET_ETH_PHY_DEVICE_LAN8720
|
||||
config TARGET_ETH_PHY_DEVICE_LAN87XX
|
||||
bool "LAN8720"
|
||||
endchoice
|
||||
endmenu
|
||||
|
||||
@@ -53,8 +53,8 @@ TEST_CASE("start_and_stop", "[esp_eth]")
|
||||
eth_phy_config_t phy_config = ETH_PHY_DEFAULT_CONFIG(); // apply default PHY configuration
|
||||
#if defined(CONFIG_TARGET_ETH_PHY_DEVICE_IP101)
|
||||
esp_eth_phy_t *phy = esp_eth_phy_new_ip101(&phy_config); // create PHY instance
|
||||
#elif defined(CONFIG_TARGET_ETH_PHY_DEVICE_LAN8720)
|
||||
esp_eth_phy_t *phy = esp_eth_phy_new_lan8720(&phy_config);
|
||||
#elif defined(CONFIG_TARGET_ETH_PHY_DEVICE_LAN87XX)
|
||||
esp_eth_phy_t *phy = esp_eth_phy_new_lan87xx(&phy_config);
|
||||
#endif
|
||||
TEST_ASSERT_NOT_NULL(phy);
|
||||
esp_eth_config_t config = ETH_DEFAULT_CONFIG(mac, phy); // apply default driver configuration
|
||||
@@ -104,8 +104,8 @@ TEST_CASE("get_set_mac", "[esp_eth]")
|
||||
eth_phy_config_t phy_config = ETH_PHY_DEFAULT_CONFIG(); // apply default PHY configuration
|
||||
#if defined(CONFIG_TARGET_ETH_PHY_DEVICE_IP101)
|
||||
esp_eth_phy_t *phy = esp_eth_phy_new_ip101(&phy_config); // create PHY instance
|
||||
#elif defined(CONFIG_TARGET_ETH_PHY_DEVICE_LAN8720)
|
||||
esp_eth_phy_t *phy = esp_eth_phy_new_lan8720(&phy_config);
|
||||
#elif defined(CONFIG_TARGET_ETH_PHY_DEVICE_LAN87XX)
|
||||
esp_eth_phy_t *phy = esp_eth_phy_new_lan87xx(&phy_config);
|
||||
#endif
|
||||
TEST_ASSERT_NOT_NULL(phy);
|
||||
esp_eth_config_t config = ETH_DEFAULT_CONFIG(mac, phy); // apply default driver configuration
|
||||
@@ -157,8 +157,8 @@ TEST_CASE("ethernet_broadcast_transmit", "[esp_eth]")
|
||||
eth_phy_config_t phy_config = ETH_PHY_DEFAULT_CONFIG(); // apply default PHY configuration
|
||||
#if defined(CONFIG_TARGET_ETH_PHY_DEVICE_IP101)
|
||||
esp_eth_phy_t *phy = esp_eth_phy_new_ip101(&phy_config); // create PHY instance
|
||||
#elif defined(CONFIG_TARGET_ETH_PHY_DEVICE_LAN8720)
|
||||
esp_eth_phy_t *phy = esp_eth_phy_new_lan8720(&phy_config);
|
||||
#elif defined(CONFIG_TARGET_ETH_PHY_DEVICE_LAN87XX)
|
||||
esp_eth_phy_t *phy = esp_eth_phy_new_lan87xx(&phy_config);
|
||||
#endif
|
||||
TEST_ASSERT_NOT_NULL(phy);
|
||||
esp_eth_config_t config = ETH_DEFAULT_CONFIG(mac, phy); // apply default driver configuration
|
||||
@@ -227,8 +227,8 @@ TEST_CASE("recv_pkt", "[esp_eth]")
|
||||
eth_phy_config_t phy_config = ETH_PHY_DEFAULT_CONFIG(); // apply default PHY configuration
|
||||
#if defined(CONFIG_TARGET_ETH_PHY_DEVICE_IP101)
|
||||
esp_eth_phy_t *phy = esp_eth_phy_new_ip101(&phy_config); // create PHY instance
|
||||
#elif defined(CONFIG_TARGET_ETH_PHY_DEVICE_LAN8720)
|
||||
esp_eth_phy_t *phy = esp_eth_phy_new_lan8720(&phy_config);
|
||||
#elif defined(CONFIG_TARGET_ETH_PHY_DEVICE_LAN87XX)
|
||||
esp_eth_phy_t *phy = esp_eth_phy_new_lan87xx(&phy_config);
|
||||
#endif
|
||||
TEST_ASSERT_NOT_NULL(phy);
|
||||
esp_eth_config_t config = ETH_DEFAULT_CONFIG(mac, phy); // apply default driver configuration
|
||||
|
||||
@@ -4,6 +4,6 @@ CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y
|
||||
CONFIG_ETH_USE_ESP32_EMAC=y
|
||||
CONFIG_ESP_TASK_WDT=n
|
||||
|
||||
CONFIG_TARGET_ETH_PHY_DEVICE_LAN8720=y
|
||||
CONFIG_TARGET_ETH_PHY_DEVICE_LAN87XX=y
|
||||
CONFIG_ETH_RMII_CLK_OUTPUT=y
|
||||
CONFIG_ETH_RMII_CLK_OUT_GPIO=17
|
||||
|
||||
Reference in New Issue
Block a user