Skip to content

fix(sdfat): remove Teensy Arduino SPI hatch (#3980) - #4083

Merged
zackees merged 1 commit into
masterfrom
fix/3980-remove-sdfat-spi-hatch
Aug 31, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/3980-remove-sdfat-spi-hatch

Conversation

@zackees

@zackees zackees commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

Summary:

  • remove the broken FL_SDFAT_USE_ARDUINO_SPI escape hatch and framework SPI types
  • route supported Teensy 4.x and Teensy 3.x/LC builds exclusively through FastLED-owned LPSPI/DSPI transports
  • reject unsupported Teensy variants at compile time and lock out residual Arduino SPI fallback code

Validation:

  • uv run pytest -q ci/tests/test_teensy_sdfat_spi_transport.py
  • bash compile teensy31 --examples Blink
  • bash compile teensy41 --examples Blink (revalidated after rebase)
  • bash lint
  • git diff --check

Closes #3980

Summary by CodeRabbit

  • Bug Fixes

    • Teensy SD card communication now uses the supported, platform-specific SPI transport.
    • Removed unsupported Arduino SPI fallback behavior.
    • Unsupported Teensy platforms now fail clearly during compilation instead of selecting an incompatible SPI path.
  • Tests

    • Added automated checks to prevent unsupported Arduino SPI references from returning.

@zackees
zackees merged commit 6918cab into master Aug 31, 2026
30 checks passed
@zackees
zackees deleted the fix/3980-remove-sdfat-spi-hatch branch August 31, 2026 04:20
@coderabbitai

coderabbitai Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6f95beb5-0fcb-4fa9-9aeb-e680e4fd7b38

📥 Commits

Reviewing files that changed from the base of the PR and between a8e3b19 and 25f13ff.

📒 Files selected for processing (5)
  • ci/tests/test_teensy_sdfat_spi_transport.py
  • src/platforms/arm/teensy/sdfat/SpiDriver/SdSpiArduinoDriver.h
  • src/platforms/arm/teensy/sdfat/SpiDriver/SdSpiDriver.h
  • src/platforms/arm/teensy/sdfat/SpiDriver/SdSpiTeensy3.cpp.hpp
  • src/platforms/arm/teensy/sdfat/fs_sdfat_teensy.h

📝 Walkthrough

Walkthrough

The Teensy SdFat transport no longer supports the Arduino SPI fallback. Supported Teensy versions select LPSPI or DSPI, unsupported platforms fail at compile time, and a pytest test prevents forbidden Arduino SPI tokens.

Changes

Teensy SdFat SPI transport

Layer / File(s) Summary
Remove Arduino SPI fallback and validate transport selection
src/platforms/arm/teensy/sdfat/SpiDriver/*, src/platforms/arm/teensy/sdfat/fs_sdfat_teensy.h, ci/tests/test_teensy_sdfat_spi_transport.py
The driver removes FL_SDFAT_USE_ARDUINO_SPI, Arduino SPI typedefs, the SPI.h fallback, and the global SPI assignment. Teensy 4.x uses LPSPI, Teensy 3.x/LC uses DSPI, and unsupported platforms fail at compile time. Comments are updated, and the test rejects forbidden Arduino SPI tokens.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/3980-remove-sdfat-spi-hatch

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
@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.

sdfat(teensy): delete the FL_SDFAT_USE_ARDUINO_SPI escape hatch — it selects a path that cannot link

1 participant