Implement global GPIO numbering for PWM and ADC pin mappings#13
Merged
soburi merged 4 commits intoFeb 11, 2026
Conversation
Co-authored-by: soburi <458281+soburi@users.noreply.github.com>
Co-authored-by: soburi <458281+soburi@users.noreply.github.com>
Co-authored-by: soburi <458281+soburi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Configure board model by connector definitions
Implement global GPIO numbering for PWM and ADC pin mappings
Feb 11, 2026
There was a problem hiding this comment.
Pull request overview
Implements “global GPIO numbering mode” pin mapping for PWM and ADC when /zephyr,user/digital-pin-gpios is not present, bringing arduino_pwm_pins[] and arduino_analog_pins[] in line with the existing global numbering approach used elsewhere (e.g., ZARD_AN_ENUM_GLOBAL in Arduino.h).
Changes:
- Add
PWM_PINS_GLOBALto mappwm-pin-gpiosentries to global GPIO numbers forarduino_pwm_pins[]. - Add
ADC_PINS_GLOBALto mapadc-pin-gpiosentries to global GPIO numbers forarduino_analog_pins[]. - Ignore CodeQL-generated build artifacts in
.gitignore.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cores/arduino/zephyrCommon.cpp | Adds global-numbering macro expansions for PWM/ADC pin arrays when digital_pin_gpios is not defined. |
| .gitignore | Adds CodeQL artifact paths to ignore list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Completes the implementation of global GPIO numbering mode for PWM and ADC pin configurations when
/zephyr,user/digital-pin-gpiosis not defined.Changes
PWM_PINS_GLOBALmacro to convertpwm-pin-gpiosentries to global GPIO numbers, populatingarduino_pwm_pins[]correctly in global numbering modeADC_PINS_GLOBALmacro to convertadc-pin-gpiosentries to global GPIO numbers, populatingarduino_analog_pins[]correctly in global numbering modeBoth macros follow the same pattern as
ZARD_AN_ENUM_GLOBALused in Arduino.h, usingZARD_GLOBAL_GPIO_NUM()to derive pin numbers from GPIO specifiers.This enables boards using connector-based configuration without explicit digital pin mappings to properly support PWM and ADC functionality.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.