Fix ethernet driver setting gpio 5 high when no power pin defined (#4531)

This commit is contained in:
Jesse Hills 2023-03-08 20:12:07 +13:00 committed by GitHub
parent bc28ea1fde
commit 2ef25f3153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,6 @@ void EthernetComponent::setup() {
eth_phy_config_t phy_config = ETH_PHY_DEFAULT_CONFIG(); eth_phy_config_t phy_config = ETH_PHY_DEFAULT_CONFIG();
phy_config.phy_addr = this->phy_addr_; phy_config.phy_addr = this->phy_addr_;
if (this->power_pin_ != -1)
phy_config.reset_gpio_num = this->power_pin_; phy_config.reset_gpio_num = this->power_pin_;
mac_config.smi_mdc_gpio_num = this->mdc_pin_; mac_config.smi_mdc_gpio_num = this->mdc_pin_;