Skip to content

UART Tx/Rx Pin Swap #2538

Closed
Closed
@fronders

Description

@fronders

I'm working on implementing Rx/Tx pin swap functionality (mentioned in #1418) for a project at the moment, thought I'd open a PR when I'm done.

I have a question about which option you guys prefer:

  • have a dedicated pin swap enable method for user to explicitly select i.e. smth like void setPinSwap(bool enabled);. This means user would have to call it before begin(), with Rx and Tx pins specified unswapped in constructor or setRx() and setTx()
  • automatically enable pin swap if Tx pin is found in the Rx pin map and vice versa

I personally prefer the second one that would just let the user select needed Rx Tx pins wanted and if MCU supports it things would just work.
What do you think?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions