- Notifications
You must be signed in to change notification settings - Fork1k
feat(uart): support UART Tx, Rx and Data invert function#2701
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
ndoo commentedMar 27, 2025
Workflow run status on my fork:https://github.com/ndoo/Arduino_Core_STM32/actions?query=branch%3Auart-invert |
ndoo commentedMar 28, 2025
Not sure if it actually works, marking as Draft again. Squashed in a fixup for missing |
ndoo commentedMar 28, 2025
Please let me know if the code flow makes sense in uart.c. Thank you. |
fpistm commentedMar 28, 2025
Hi@ndoo |
fpistm left a comment
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.
Hi@ndoo
Thanks for this PR (well made 😉)
Some comments to address (open to discussion).
In addition, it would be fine to add new methods in the keywords.txt.
Could you also write doc about its usage to be added in the Wiki ?
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
ndoo commentedMar 28, 2025
Thanks for the review. Since I seem to be headed in the right direction, I will extend this to invert data as well, for completeness. FWIW, I had my sketch freeze trying to read from serial, but let me debug over SWD after everything is done. |
ndoo commentedMar 28, 2025
Force-pushed with the requested code changes. Workflows are still running. I have to go to bed, but I will take a look at keywords.txt (which?) and updating the Wiki tomorrow. |
This enables UART Tx, Rx and data invert function on STM32 families that support it.In order to enable Tx, Rx and/or data invert, call respectively:```c++Serial1.setTxInvert();Serial1.setRxInvert();Serial1.setDataInvert();```Fixes:stm32duino#1160stm32duino#2669See also:stm32duino#1418Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo commentedMar 29, 2025
Done updating keywords.txt - now having a look at writing for the Wiki. |
Update documentation to support [stm32duino/Arduino_Core_STM32#2701](stm32duino/Arduino_Core_STM32#2701)Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo commentedMar 29, 2025
Wiki PR:stm32duino/wiki_contrib#2 Taking PR out of draft. Do let me know if anything was missed. Cheers! |
Update documentation to support [stm32duino/Arduino_Core_STM32#2701](stm32duino/Arduino_Core_STM32#2701)Signed-off-by: Andrew Yong <me@ndoo.sg>
fpistm left a comment
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.
Thanks@ndoo
3a60776 intostm32duino:mainUh oh!
There was an error while loading.Please reload this page.
Update documentation to support [stm32duino/Arduino_Core_STM32#2701](stm32duino/Arduino_Core_STM32#2701)Signed-off-by: Andrew Yong <me@ndoo.sg>
Uh oh!
There was an error while loading.Please reload this page.
Fixes:
See also:#1418
Summary
This enables UART Tx, Rx and data invert function on STM32 families that support it.
In order to enable Tx, Rx and/or data invert, call respectively:
This PR fixes/implements the followingbugs/features
This adds a feature exposed by the native STM32 HAL & (some) hardware.
Validation
Closing issues
Closes#1160#2669