-
Notifications
You must be signed in to change notification settings - Fork 13.3k
HardwareSerial: fix issue with swapping pins twice #3258
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
base: master
Are you sure you want to change the base?
Conversation
Ref #3192 |
Previously calling HardwareSerial::swap twice would set the pins back to the original setting (1, 3). This feature was lost when swap function got an optional argument for the TX pin. This change reverts that, restoring ability to swap pins back. To use TX pin 2, HardwareSerial::pins or HardwareSerial::set_tx methods can be used. This change also simplifies UART pin configuration code.
b809a90
to
3931249
Compare
This was long time ago... I don't remember how thoroughly this was tested. Will revisit this and try to test all possible pin options. |
I've done some testing on this and there are still some issues. Will consider #3192 a known issue for 2.4.0 and work on this fix again after the release. |
#hwtest |
1 similar comment
#hwtest |
@igrr what is needed to move forward on this? |
This doesn't fit into 2.5.0. Pushing milestone back. |
Thanks for your PR, but the core and libraries have changed enough that this PR now has a merge conflict. Could you merge it manually with the latest core, so we can consider it for future releases? |
This needs work, pushing back. |
@devyte Regarding the issue mentioned in the title - if there's anything else to this PR beyond that, I have not looked for it and am disregarding it - it's not present in master, and this PR could be closed. I have successfully |
Previously calling HardwareSerial::swap twice would set the pins back
to the original setting (1, 3). This feature was lost when swap function
got an optional argument for the TX pin. This change reverts that,
restoring ability to swap pins back.
To use TX pin 2, HardwareSerial::pins or HardwareSerial::set_tx methods
can be used.