-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
feat(eth): Add setters for negotiation, speed and duplex modes #11053
Conversation
👋 Hello me-no-dev, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Test Results 76 files 76 suites 13m 19s ⏱️ Results for commit 922ef56. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Note that as pointed out in the initial post in #10923, these added functions are effectively unusable. The ioctl call stipulations require the driver to be created, yet not started--which is not a possible state from Arduino-ESP32 Eth, as "eth.begin" both creates and starts the driver before returning. ETH_CMD_S_SPEED -> https://github.com/espressif/esp-idf/blob/1f46216a7214e27c1e351b4310acf7fcd77029d4/components/esp_eth/src/esp_eth.c#L474 About the only way these can effectively be implemented with the current ecosystem, is if they are added as arguments to "eth.begin()". That way, if the user wanted to change the rate, they could stop it with "eth.end()", then restart with different args to "eth.begin()". |
@WebDust21 will be possible to do with the same API. I'll rework how things are done. Basically you will call the methods before |
This pull request introduces several new methods and modifications to the
ETHClass
in the Ethernet library to enhance its functionality. The primary changes include adding methods to set duplex mode, auto-negotiation, and link speed, as well as updating the return type of thelinkSpeed
method.Enhancements to
ETHClass
:setFullDuplex
method to allow setting the duplex mode of the Ethernet connection.setAutoNegotiation
method to enable or disable auto-negotiation on the Ethernet connection.setLinkSpeed
method to set the link speed of the Ethernet connection.linkSpeed
method to returnuint16_t
instead ofuint8_t
for better compatibility with link speed values.Header file updates:
ETH.h
to declare the new methods and modify the return type oflinkSpeed
.fixes: #10923