Skip to content

Commit

Permalink
Use ETH_PHY_TYPE_ prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
hacker-cb committed Oct 9, 2024
1 parent 21f5b84 commit 1984685
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -854,25 +854,25 @@ menu "CHIP Device Layer"
help
Set PHY address according your board schematic.

choice ETH_PHY_MODEL
choice ETH_PHY_TYPE
prompt "Ethernet PHY Device"
default ETH_PHY_IP101
default ETH_PHY_TYPE_IP101
help
Select the Ethernet PHY device to use in the example.

config ETH_PHY_IP101
config ETH_PHY_TYPE_IP101
bool "IP101"
help
IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.

config ETH_PHY_RTL8201
config ETH_PHY_TYPE_RTL8201
bool "RTL8201/SR8201"
help
RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.

config ETH_PHY_LAN87XX
config ETH_PHY_TYPE_LAN87XX
bool "LAN87xx"
help
Below chips are supported:
Expand All @@ -885,13 +885,13 @@ menu "CHIP Device Layer"
flexPWR® Technology.
Goto https://www.microchip.com for more information about them.

config ETH_PHY_DP83848
config ETH_PHY_TYPE_DP83848
bool "DP83848"
help
DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
Goto http://www.ti.com/product/DP83848J for more information about it.

config ETH_PHY_KSZ80XX
config ETH_PHY_TYPE_KSZ80XX
bool "KSZ80xx"
help
With the KSZ80xx series, Microchip offers single-chip 10BASE-T/100BASE-TX
Expand Down
10 changes: 5 additions & 5 deletions src/platform/ESP32/NetworkCommissioningDriver_Ethernet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ CHIP_ERROR ESPEthernetDriver::Init(NetworkStatusChangeCallback * networkStatusCh
esp_eth_mac_t * mac = esp_eth_mac_new_esp32(&esp32_emac_config, &mac_config);

// Based on https://github.com/espressif/esp-idf/tree/master/examples/ethernet/basic/components/ethernet_init
#if defined(CONFIG_ETH_PHY_IP101)
#if defined(CONFIG_ETH_PHY_TYPE_IP101)
esp_eth_phy_t * phy = esp_eth_phy_new_ip101(&phy_config);
#elif defined(CONFIG_ETH_PHY_RTL8201)
#elif defined(CONFIG_ETH_PHY_TYPE_RTL8201)
esp_eth_phy_t * phy = esp_eth_phy_new_rtl8201(&phy_config);
#elif defined(CONFIG_ETH_PHY_LAN87XX)
#elif defined(CONFIG_ETH_PHY_TYPE_LAN87XX)
esp_eth_phy_t * phy = esp_eth_phy_new_lan87xx(&phy_config);
#elif defined(CONFIG_ETH_PHY_DP83848)
#elif defined(CONFIG_ETH_PHY_TYPE_DP83848)
esp_eth_phy_t * phy = esp_eth_phy_new_dp83848(&phy_config);
#elif defined(CONFIG_ETH_PHY_KSZ80XX)
#elif defined(CONFIG_ETH_PHY_TYPE_KSZ80XX)
esp_eth_phy_t * phy = esp_eth_phy_new_ksz80xx(&phy_config);
#else
#error "Ethernet PHY not selected"
Expand Down

0 comments on commit 1984685

Please sign in to comment.