Fix some pin definitions for Adafruit QT Py RP2040 #397
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.
This PR corrects the pin definitions for pins A0, A1, A2, and A3 on the Adafruit QT Py RP2040.
On this board, the four pins above are reversed compared to what's defined in the common pin configuration. The current way this PR is fixing this is to just use preprocessor
#define
in the board-specificvariants/adafruit_qtpy/pins_arduino.h
to override thestatic const
declarations fromvariants/generic/common.h
of those four pins. This method appears to work fine and compiles without warnings while keeping the general board variant style alive.Another option for correcting this problem would be to copy all the pin definitions from
variants/generic/common.h
into the board's specific file with the required changes and just not include thatcommon.h
in it, but that way doesn't fit the style of how other boards are defined, so is this method in the PR okay with you, or would you prefer it be done more like this other method?