-
Notifications
You must be signed in to change notification settings - Fork 1k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Workflow run status on my fork: https://github.com/ndoo/Arduino_Core_STM32/actions?query=branch%3Auart-invert |
Not sure if it actually works, marking as Draft again. Squashed in a fixup for missing
|
Please let me know if the code flow makes sense in uart.c. Thank you. |
Hi @ndoo |
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 ?
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. |
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#1160 stm32duino#2669 See also: stm32duino#1418 Signed-off-by: Andrew Yong <[email protected]>
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 <[email protected]>
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 <[email protected]>
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
Update documentation to support [stm32duino/Arduino_Core_STM32#2701](stm32duino/Arduino_Core_STM32#2701) Signed-off-by: Andrew Yong <[email protected]>
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 following bugs/features
This adds a feature exposed by the native STM32 HAL & (some) hardware.
Validation
Closing issues
Closes #1160 #2669