Skip to content

Conversation

mniestroj
Copy link
Member

Use ARDUINO_HEADER_R3_* macros, as those are much more readable and less
error prone.

@kartben kartben requested a review from Copilot August 22, 2025 09:42
Copy link

@Copilot Copilot AI left a 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.

decsny
decsny previously approved these changes Aug 27, 2025
@etienne-lms etienne-lms added the DNM This PR should not be merged (Do Not Merge) label Aug 27, 2025
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]>
@mniestroj mniestroj force-pushed the boards-convert-to-arduino-header-macro branch from e7617d2 to a3e2074 Compare September 1, 2025 14:50
@etienne-lms etienne-lms removed the DNM This PR should not be merged (Do Not Merge) label Sep 1, 2025
Copy link

sonarqubecloud bot commented Sep 1, 2025

@mniestroj mniestroj requested a review from decsny September 1, 2025 14:59
Copy link
Contributor

@kartben kartben left a 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

@kartben kartben merged commit 8f25922 into zephyrproject-rtos:main Sep 2, 2025
27 of 28 checks passed
@kartben
Copy link
Contributor

kartben commented Sep 2, 2025

Very cool, thanks! It would be nice to also convert shields, fwiw

#95320

@mniestroj mniestroj deleted the boards-convert-to-arduino-header-macro branch September 2, 2025 16:11
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.

4 participants