This commit is contained in:
iranl
2025-03-02 21:48:58 +01:00
parent 603844b4e9
commit bd8120d10f
22 changed files with 232 additions and 21 deletions

View File

@@ -118,7 +118,7 @@ NetworkDevice *NetworkDeviceInstantiator::Create(NetworkDeviceType networkDevice
preferences->getInt(preference_network_custom_mosi, -1),
custEthtype);
}
#if defined(CONFIG_IDF_TARGET_ESP32)
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
else if(custPHY >= 4 && custPHY <= 9)
{
int custCLKpref = preferences->getInt(preference_network_custom_clk, 0);

View File

@@ -77,7 +77,7 @@ std::string NetworkUtil::GetCustomEthernetDeviceName(int custPHY)
}
}
#if defined(CONFIG_IDF_TARGET_ESP32)
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
eth_phy_type_t NetworkUtil::GetCustomEthernetType(int custPHY)
{
switch(custPHY)

View File

@@ -9,7 +9,7 @@ class NetworkUtil
public:
static NetworkDeviceType GetDeviceTypeFromPreference(int hardwareDetect, int customPhy);
static std::string GetCustomEthernetDeviceName(int custPHY);
#if defined(CONFIG_IDF_TARGET_ESP32)
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
static eth_phy_type_t GetCustomEthernetType(int custPHY);
static eth_clock_mode_t GetCustomClock(int custCLKpref);
#endif