Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using ksz8081 only from ESP-IDF 4.4 onwards #5918

Merged
merged 3 commits into from
Dec 14, 2021

Conversation

vitorrussi
Copy link
Contributor

@vitorrussi vitorrussi commented Nov 22, 2021

Summary

The previous assertion only considerate the existence of ESP-IDF 4.3, but with the ESP-IDF 4.3.1 release this assertion would generate errors. Now only includes from ESP-IDF 4.4 onwards.

Impact

Now don't generate esp_eth_phy_new_ksz8081 not included error

The previous assertion only considerate the existance of ESP-IDF 4.3, but with the ESP-IDF 4.3.1 release this assertion would generate errors. Now only includes from ESP-IDF 4.4 onwards.
@CLAassistant
Copy link

CLAassistant commented Nov 22, 2021

CLA assistant check
All committers have signed the CLA.

@@ -282,7 +282,7 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ
break;
#endif
case ETH_PHY_KSZ8081:
#if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(4,3,0)
#if ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will fail for 5.2.0 for example. Use ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(4,4,0) instead. In any case, current Arduino does not support anything below 4.4 (and now has a cmake check added to ensure that the version of IDF is correct) which makes this change unnecessary. Has the API for 4.3 changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, 4.3 hasn't changed but they released 4.3.1, which fails the previous assertion. If it's ensured by cmake check, this assertion can be deleted, but as it's don't make any significant improvement it can be like that. Arduino 2.0.0 don't make this assertion, should I make this change and make a new PR?

Copy link
Collaborator

@atanisoft atanisoft Nov 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If updating to v4.4+ it should be ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4,4,0) (note the = being added)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the commit as instructed

@me-no-dev me-no-dev merged commit 4b638de into espressif:master Dec 14, 2021
@vitorrussi vitorrussi deleted the patch-2 branch December 14, 2021 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants