feat(eth): Add setters for negotiation, speed and duplex modes by me-no-dev · Pull Request #11053 · espressif/arduino-esp32 (original) (raw)
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
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 the linkSpeed method.
Enhancements to ETHClass:
- Added
setFullDuplexmethod to allow setting the duplex mode of the Ethernet connection. - Added
setAutoNegotiationmethod to enable or disable auto-negotiation on the Ethernet connection. - Added
setLinkSpeedmethod to set the link speed of the Ethernet connection. - Updated
linkSpeedmethod to returnuint16_tinstead ofuint8_tfor better compatibility with link speed values.
Header file updates:
- Updated
ETH.hto declare the new methods and modify the return type oflinkSpeed.
fixes: #10923
| Messages | |
|---|---|
| 📖 | 🎉 Good Job! All checks are passing! |
👋 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 ...
This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.
DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.
Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.
Review and merge process you can expect ...
We do welcome contributions in the form of bug reports, feature requests and pull requests.
1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.
Generated by 🚫 dangerJS against 922ef56
Test Results
76 files 76 suites 13m 19s ⏱️
38 tests 38 ✅ 0 💤 0 ❌
241 runs 241 ✅ 0 💤 0 ❌
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.
| Memory | FLASH [bytes] | FLASH [%] | RAM [bytes] | RAM [%] | ||||
|---|---|---|---|---|---|---|---|---|
| Target | DEC | INC | DEC | INC | DEC | INC | DEC | INC |
| ESP32P4 | 0 | 0 | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00 |
| ESP32S3 | 0 | ⚠️ +84 | 0.00 | ⚠️ +0.01 | 0 | 0 | 0.00 | 0.00 |
| ESP32S2 | 0 | ⚠️ +84 | 0.00 | ⚠️ +0.02 | 0 | 0 | 0.00 | 0.00 |
| ESP32C3 | 0 | 0 | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00 |
| ESP32C6 | 0 | 0 | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00 |
| ESP32H2 | 0 | 0 | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00 |
| ESP32 | 0 | ⚠️ +84 | 0.00 | ⚠️ +0.02 | 0 | 0 | 0.00 | 0.00 |
Click to expand the detailed deltas report [usage change in BYTES]
| Target | ESP32P4 | ESP32S3 | ESP32S2 | ESP32C3 | ESP32C6 | ESP32H2 | ESP32 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Example | FLASH | RAM | FLASH | RAM | FLASH | RAM | FLASH | RAM | FLASH | RAM | FLASH | RAM | FLASH | RAM |
| Ethernet/examples/ETH_TLK110 | 0 | 0 | - | - | - | - | - | - | - | - | - | - | ⚠️ +84 | 0 |
| Ethernet/examples/ETH_W5500_Arduino_SPI | 0 | 0 | ⚠️ +84 | 0 | ⚠️ +84 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ⚠️ +84 | 0 |
| Ethernet/examples/ETH_W5500_IDF_SPI | 0 | 0 | ⚠️ +84 | 0 | ⚠️ +84 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ⚠️ +84 | 0 |
| Ethernet/examples/ETH_WIFI_BRIDGE | 0 | 0 | ⚠️ +84 | 0 | ⚠️ +84 | 0 | 0 | 0 | 0 | 0 | - | - | ⚠️ +84 | 0 |
| Ethernet/examples/ETH_LAN8720 | - | - | - | - | - | - | - | - | - | - | - | - | ⚠️ +84 | 0 |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@WebDust21 will be possible to do with the same API. I'll rework how things are done. Basically you will call the methods before begin() and in begin() they will get executed with the selected settings