Update HardwareSerialRS485_Helper.h for all possible ports - #8
Open
atehxx wants to merge 1 commit into
Open
Conversation
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)
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). |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)