mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
esp_eth: rework KSZ80xx implementation and add more KSZ80xx PHYs
* add support for KSZ8001, KSZ8021, KSZ8031, KSZ8051 and KSZ8061 * remove duplicate code * simplify architecture to make the code base extensible (for future work)
This commit is contained in:
@@ -322,7 +322,13 @@ static inline esp_eth_phy_t *esp_eth_phy_new_lan8720(const eth_phy_config_t *con
|
||||
esp_eth_phy_t *esp_eth_phy_new_dp83848(const eth_phy_config_t *config);
|
||||
|
||||
/**
|
||||
* @brief Create a PHY instance of KSZ8041
|
||||
* @brief Create a PHY instance of KSZ80xx
|
||||
*
|
||||
* The phy model from the KSZ80xx series is detected automatically. If the driver
|
||||
* is unable to detect a supported model, \c NULL is returned.
|
||||
*
|
||||
* Currently, the following models are supported:
|
||||
* KSZ8001, KSZ8021, KSZ8031, KSZ8041, KSZ8051, KSZ8061, KSZ8081, KSZ8091
|
||||
*
|
||||
* @param[in] config: configuration of PHY
|
||||
*
|
||||
@@ -330,32 +336,7 @@ esp_eth_phy_t *esp_eth_phy_new_dp83848(const eth_phy_config_t *config);
|
||||
* - instance: create PHY instance successfully
|
||||
* - NULL: create PHY instance failed because some error occurred
|
||||
*/
|
||||
esp_eth_phy_t *esp_eth_phy_new_ksz8041(const eth_phy_config_t *config);
|
||||
|
||||
/**
|
||||
* @brief Create a PHY instance of KSZ8081
|
||||
*
|
||||
* @param[in] config: configuration of PHY
|
||||
*
|
||||
* @return
|
||||
* - instance: create PHY instance successfully
|
||||
* - NULL: create PHY instance failed because some error occurred
|
||||
*/
|
||||
esp_eth_phy_t *esp_eth_phy_new_ksz8081(const eth_phy_config_t *config);
|
||||
|
||||
/**
|
||||
* @brief Create a PHY instance of KSZ8091
|
||||
*
|
||||
* @param[in] config: configuration of PHY
|
||||
*
|
||||
* @return
|
||||
* - instance: create PHY instance successfully
|
||||
* - NULL: create PHY instance failed because some error occurred
|
||||
*/
|
||||
static inline esp_eth_phy_t *esp_eth_phy_new_ksz8091(const eth_phy_config_t *config)
|
||||
{
|
||||
return esp_eth_phy_new_ksz8081(config);
|
||||
}
|
||||
esp_eth_phy_t *esp_eth_phy_new_ksz80xx(const eth_phy_config_t *config);
|
||||
|
||||
#if CONFIG_ETH_SPI_ETHERNET_DM9051
|
||||
/**
|
||||
|
Reference in New Issue
Block a user