mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Fix late argument verification in emac-main
Prevent crash when emac_phy_power_enable is not set. Merges #426 https://github.com/espressif/esp-idf/pull/426
This commit is contained in:
parent
5272bd899b
commit
eba6789e6c
@ -948,14 +948,14 @@ esp_err_t esp_eth_init(eth_config_t *config)
|
||||
emac_set_user_config_data(config);
|
||||
}
|
||||
|
||||
emac_config.emac_phy_power_enable(true);
|
||||
|
||||
ret = emac_verify_args();
|
||||
|
||||
if (ret != ESP_OK) {
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
emac_config.emac_phy_power_enable(true);
|
||||
|
||||
//before set emac reg must enable clk
|
||||
emac_enable_clk(true);
|
||||
REG_SET_FIELD(EMAC_EX_PHYINF_CONF_REG, EMAC_EX_PHY_INTF_SEL, EMAC_EX_PHY_INTF_RMII);
|
||||
|
Loading…
x
Reference in New Issue
Block a user