Skip to content
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

Update HardwareSerialRS485_Helper.h for all possible ports #8

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

Conversation

atehxx
Copy link

@atehxx atehxx commented Jul 31, 2018

Added more ports (now matches also ArduinoMega)
Changed TRx_PORT and DDR type to uint16_t to allow all ports of Arduino Mega (e.g. PORTH)

Added more ports (now matches also ArduinoMega)
Changed TRx_PORT and DDR type to uint16_t to allow all ports of Arduino Mega (e.g. PORTH)
@MichaelJonker
Copy link
Owner

Hi thanks for your contribution. I am momentarily away with reduced access. I will look at your PR and integrate it next week (after testing that it does not break existing code).
M

@atehxx
Copy link
Author

atehxx commented Aug 2, 2018

No problem. I tested this on Arduino Mega, on Uno, and on Atmega644PA standalone chip (with arduino core added). Also there was your comment "TODO try a cleanup with a consexpr function, i.e. a function that is evaluated at compile time." this doesn't seem to be needed - I was checking compiled code and it already evaluates and compiles to final registry. uint16_t here is needed as some ports on Mega have 2 byte address, but it's enough to change it here only - I spent 2 days taking my hairs off why this library doesn't work... I was using port H :D

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.

2 participants