Skip to content

cores: restrict connector fallback to arduino-header-r3 only#22

Merged
soburi merged 1 commit into
connectordeffrom
codex/review-last-3-commits
Feb 11, 2026
Merged

cores: restrict connector fallback to arduino-header-r3 only#22
soburi merged 1 commit into
connectordeffrom
codex/review-last-3-commits

Conversation

@soburi
Copy link
Copy Markdown
Owner

@soburi soburi commented Feb 11, 2026

Motivation

  • Prevent the connector auto-generation introduced earlier from matching arbitrary arduino_header nodes and narrow support to the Arduino Uno R3 connector format only, as required by the variant/support policy.

Description

  • Add a compatibility gate DT_NODE_HAS_COMPAT(DT_NODELABEL(arduino_header), arduino_header_r3) to enable connector-derived pin generation only for R3-style headers.
  • Emit a compile-time #error "Only arduino-header-r3 connector is supported" when an arduino_header node exists but is not R3-compatible to make the supported scope explicit.
  • The change is localized to cores/arduino/Arduino.h and documentation/variants.md was intentionally left unchanged.

Testing

  • Inspected the modified header to confirm the new DT_NODE_HAS_COMPAT guard and #error are present, and that inspection succeeded.
  • Performed repository diffs and status checks to verify only cores/arduino/Arduino.h was modified and documentation/variants.md remained untouched, and these checks succeeded.
  • Generated the PR metadata using the local tooling to summarize the change, and that operation completed successfully.

Codex Task

Copilot AI review requested due to automatic review settings February 11, 2026 13:57
@soburi soburi merged commit 52541a1 into connectordef Feb 11, 2026
7 checks passed
Copy link
Copy Markdown

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

Restricts the Arduino connector-derived pin auto-generation path to only the Arduino Uno R3 header format, preventing unintended matches on arbitrary arduino_header connector nodes.

Changes:

  • Gate ZARD_CONNECTOR auto-selection behind DT_NODE_HAS_COMPAT(..., arduino_header_r3).
  • Emit a compile-time #error when an arduino_header node exists but is not R3-compatible (in the connector-fallback path).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@soburi soburi deleted the codex/review-last-3-commits branch February 21, 2026 07:29
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.

2 participants