Skip to content

Conversation

kartben
Copy link
Contributor

@kartben kartben commented Sep 2, 2025

Make shield overlays less error prone and easier to maintain by switching to GPIO pin constants defined in arduino-header-r3.h.

Also start adding Doxygen docs for documenting available constants for common pin headers (see https://builds.zephyrproject.io/zephyr/pr/95320/docs/doxygen/html/group__devicetree-gpio-pin-headers.html)

@kartben kartben force-pushed the shields_arduheader branch 2 times, most recently from e079ee8 to 5824a3a Compare September 2, 2025 10:50
@kartben kartben requested a review from Copilot September 2, 2025 11:24
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 shield device tree overlays to use symbolic GPIO pin constants from arduino-header-r3.h instead of numeric pin values, making the shield configurations less error-prone and easier to maintain.

  • Adds include for arduino-header-r3.h header to shield overlay files
  • Replaces numeric GPIO pin references with named constants (e.g., 16 becomes ARDUINO_HEADER_R3_D10)
  • Updates multi-line GPIO configurations to use proper line continuation formatting

Reviewed Changes

Copilot reviewed 67 out of 67 changed files in this pull request and generated no comments.

Show a summary per file
File Description
x_nucleo_wb05kn1_spi.overlay Updates BLE shield to use symbolic pin constants for CS, reset, and IRQ GPIOs
x_nucleo_iks4a1/*.overlay Updates sensor shield variants to use symbolic pin constants for interrupt GPIOs
x_nucleo_iks02a1/*.overlay Updates sensor shield variants to use symbolic pin constants for data ready GPIOs
x_nucleo_iks01a*.overlay Updates sensor shield variants to use symbolic pin constants for interrupt/data ready GPIOs
x_nucleo_idb05a1/*.overlay Updates BLE shield to use symbolic pin constants for CS, reset, and IRQ GPIOs
x_nucleo_eeprma2/*.overlay Updates EEPROM shield to use symbolic pin constants for write protect and CS GPIOs
x_nucleo_bnrg2a1/*.overlay Updates BLE shield to use symbolic pin constants for CS, reset, and IRQ GPIOs
waveshare_epaper/*.overlay Updates e-paper display shields to use symbolic pin constants for DC, reset, and busy GPIOs
wnc_m14a2a/*.overlay Updates cellular modem shield to use symbolic pin constants for control GPIOs
st7789v_generic/*.overlay Updates display shields to use symbolic pin constants for DC, reset, and CS GPIOs
st7735r/*.overlay Updates display shield to use symbolic pin constants for DC, reset, and CS GPIOs
ssd1306/*.overlay Updates OLED display shield to use symbolic pin constants for data/command GPIO
sparkfun_sara_r4/*.overlay Updates cellular modem shield to use symbolic pin constants for power and reset GPIOs
semtech_sx12*/*.overlay Updates LoRa shields to use symbolic pin constants for reset, DIO, and control GPIOs
Additional shields Similar updates for ethernet, sensor, display, ADC, DAC, and other shield types

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kartben kartben force-pushed the shields_arduheader branch 4 times, most recently from 9dc2061 to 776f205 Compare September 2, 2025 13:10
Make shield overlays less error prone and easier to maintain by
switching to GPIO pin constants defined in arduino-header-r3.h.

Signed-off-by: Benjamin Cabé <[email protected]>
Add mention of ARDUINO_HEADER_R3_* constants in binding description for
the Arduino Uno (R3) header.

Signed-off-by: Benjamin Cabé <[email protected]>
@kartben kartben force-pushed the shields_arduheader branch 3 times, most recently from 9579164 to a63cb86 Compare September 2, 2025 14:04
@kartben kartben marked this pull request as ready for review September 2, 2025 14:05
@zephyrbot zephyrbot added area: CAN area: GPIO area: Shields Shields (add-on boards) platform: ADI Analog Devices, Inc. area: Wi-Fi Wi-Fi platform: Seeed Studio Seeed Studio platforms area: Devicetree platform: STM32 ST Micro STM32 labels Sep 2, 2025
pdgendt
pdgendt previously approved these changes Sep 2, 2025
@kartben kartben changed the title shields: devicetree: arduino-header-r3.h constants shields: devicetree: use arduino-header-r3.h constants in all shields Sep 2, 2025
mniestroj
mniestroj previously approved these changes Sep 2, 2025
Add a Doxygen group for the GPIO pin headers macros and initially
document Arduino Uno (R3) header pin constants.

Signed-off-by: Benjamin Cabé <[email protected]>
@kartben kartben dismissed stale reviews from mniestroj and pdgendt via a656b21 September 2, 2025 16:37
Copy link

sonarqubecloud bot commented Sep 2, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants