-
Notifications
You must be signed in to change notification settings - Fork 7.9k
boards: convert to ARDUINO_HEADER_R3_* macro #94837
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
boards: convert to ARDUINO_HEADER_R3_* macro #94837
Conversation
a2e94ad
to
e7617d2
Compare
boards/shields/adafruit_2_8_tft_touch_v2/adafruit_2_8_tft_touch_v2_nano.overlay
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR converts Arduino R3 header pin definitions from numeric constants to descriptive macros to improve code readability and reduce errors. The changes replace hardcoded pin numbers (0-21) with self-documenting macros like ARDUINO_HEADER_R3_A0
and ARDUINO_HEADER_R3_D0
.
- Standardizes all Arduino R3 connector definitions across STMicroelectronics and u-blox board files
- Adds required header include
<zephyr/dt-bindings/gpio/arduino-header-r3.h>
to all affected files - Maintains identical functionality while improving code maintainability
Reviewed Changes
Copilot reviewed 161 out of 161 changed files in this pull request and generated no comments.
File | Description |
---|---|
Various u-blox board DTS files | Updated GPIO pin mappings from numeric to macro definitions |
Various STMicroelectronics board DTS files | Updated GPIO pin mappings from numeric to macro definitions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Use ARDUINO_HEADER_R3_* macros, as those are much more readable and less error prone. Signed-off-by: Marcin Niestroj <[email protected]>
Use ARDUINO_HEADER_R3_* macros, as those are much more readable and less error prone. Signed-off-by: Marcin Niestroj <[email protected]>
Use ARDUINO_HEADER_R3_* macros, as those are much more readable and less error prone. Signed-off-by: Marcin Niestroj <[email protected]>
Use ARDUINO_HEADER_R3_* macros, as those are much more readable and less error prone. Signed-off-by: Marcin Niestroj <[email protected]>
Use ARDUINO_HEADER_R3_* macros, as those are much more readable and less error prone. Signed-off-by: Marcin Niestroj <[email protected]>
Use ARDUINO_HEADER_R3_* macros, as those are much more readable and less error prone. Signed-off-by: Marcin Niestroj <[email protected]>
e7617d2
to
a3e2074
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool, thanks! It would be nice to also convert shields, fwiw
|
Use
ARDUINO_HEADER_R3_*
macros, as those are much more readable and lesserror prone.