Skip to content

fix(avr): keep SPI defaults off UART TX - #4094

Merged
zackees merged 1 commit into
masterfrom
fix-issue-4018-platform-pin-defaults
Aug 31, 2026
Merged

zackees merged 1 commit into
masterfrom
fix-issue-4018-platform-pin-defaults

Conversation

@zackees

@zackees zackees commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

Refs #4018.

Sets ATmega328P-family default SPI data and clock pins to D11/D13, preserving user overrides and avoiding inherited D1 UART TX. Validated with lint and an Uno APA102 compile.

Summary by CodeRabbit

  • New Features
    • Added default SPI data and clock pin mappings for ATmega328P-based boards.
    • Preserves custom pin assignments when externally configured.

Use the ATmega328P family's established D11/D13 hardware SPI pair for clocked example defaults instead of inheriting D1/D2. D1 is UART TX on Uno, Nano, and Pro Mini boards and conflicts with Serial output used by examples.\n\nRefs #4018.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f72405de-34ec-41bc-a1f4-1fcbce993cad

📥 Commits

Reviewing files that changed from the base of the PR and between c39dc59 and 9e96ef8.

📒 Files selected for processing (1)
  • src/platforms/avr/atmega/m328p/fastpin_m328p.h

Included review availability: Your plan provides up to 8 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The ATmega328P pin header now defines guarded default macros for SPI data pin 11 and SPI clock pin 13. Existing externally defined values remain unchanged.

Changes

ATmega328P SPI pin configuration

Layer / File(s) Summary
Add overridable SPI pin defaults
src/platforms/avr/atmega/m328p/fastpin_m328p.h
Adds FL_PIN_SPI_DATA_1 with default value 11 and FL_PIN_SPI_CLOCK_1 with default value 13. #ifndef guards preserve external definitions.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 9e96e

The change sets ATmega328P-family SPI defaults to D11 and D13 while preserving explicit overrides. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: updating AVR SPI defaults to avoid conflict with the UART TX pin.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-issue-4018-platform-pin-defaults

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Aug 31, 2026
@zackees
zackees merged commit 4978b44 into master Aug 31, 2026
15 of 20 checks passed
@zackees
zackees deleted the fix-issue-4018-platform-pin-defaults branch August 31, 2026 20:11
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant