Skip to content

Update HardwareSerialRS485_Helper.h for all possible ports - #8

Open
atehxx wants to merge 1 commit into
MichaelJonker:masterfrom
atehxx:patch-2
Open

Update HardwareSerialRS485_Helper.h for all possible ports#8
atehxx wants to merge 1 commit into
MichaelJonker:masterfrom
atehxx:patch-2

Conversation

@atehxx

@atehxx atehxx commented Jul 31, 2018

Copy link
Copy Markdown

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
Copy Markdown
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

atehxx commented Aug 2, 2018

Copy link
Copy Markdown
Author

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