Skip to content

[embassy-rp] Add disable and enable tx and rx functions for UART #4126

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marcemmers
Copy link
Contributor

When writing some Modbus code on top of the RP2040 UART I encountered break and framing errors. I traced this back to the fact that my hardware pulls down the RX pin whenever I am transmitting data.

The UART peripheral has support for disabling RX or TX without influencing the other. It seemed like a good addition to make this available.

I thought about creating a type that freezes the UartRx or UartTx so you cannot have it disabled and try to receive or send respectively but could not figure it out since I am still learning rust.

Also, it is my first PR here so some guidance might be necessary, thanks for that!

@marcemmers marcemmers force-pushed the uart-enable-disable-control branch from d4fecbe to e33dc09 Compare April 24, 2025 23:17
@marcemmers marcemmers changed the title Add disable and enable tx and rx functions for RP UART [embassy-rp] Add disable and enable tx and rx functions for UART Apr 24, 2025
@marcemmers marcemmers force-pushed the uart-enable-disable-control branch from e33dc09 to 979eecc Compare April 27, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant