Closed
Description
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 beforebegin()
, withRx
andTx
pins specified unswapped in constructor orsetRx()
andsetTx()
- 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?