-
Notifications
You must be signed in to change notification settings - Fork 7.6k
feat(uart): Add function to invert hardware UART Tx line #11428
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
base: master
Are you sure you want to change the base?
Conversation
Simply clone existing Rx functionality for Tx. Allow granular control over both lines. Avoid overloading HardwareSerial::begin() to change the bool invert parameter to a bitmask type. Add an untested implementation for ESP32C6, ESP32H2, ESP32P4 that references the different register naming on those chips.
👋 Hello asund, 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 12m 42s ⏱️ Results for commit 948c485. |
This PR may need a few improvements based on how IDF 5.4.1 has changed UART driver. |
No problem at all. Let me know if there's anything I can do if you want. |
Description of Change
Adds a setTxInvert() to HardwareSerial and corresponding uartSetTxInvert to the HAL.
Tests scenarios
I have tested my Pull Request on Arduino-esp32 core v3.2.0 with ESP32 and ESP32-S2 Board.
I added an untested implementation for the ESP32C6, ESP32H2, ESP32P4 platform in the HAL to reflect the different register name.
Related links
N/A