Skip to content

Composed boards: a microSD slot on SPI - #7

Open
scottvr wants to merge 1 commit into
geastack:mainfrom
scottvr:composed-spi-microsd
Open

scottvr wants to merge 1 commit into
geastack:mainfrom
scottvr:composed-spi-microsd

Conversation

@scottvr

@scottvr scottvr commented Oct 16, 2026

Copy link
Copy Markdown

[This PR is a sibling to @geastack/targets PR#6; it can be merged on its own, but won't be useful until the targets PR for SPI MicroSD is also in.]

The composer knew one card wiring, SD_MMC 1-bit on the SDMMC host. The Waveshare RGB boards (the 7-inch, the 4.3B) put the card on SPI2 with its chip-select on the CH422G, so no composed definition could declare their slot. storage.microSD.interface now takes "spi" beside "sdmmc-1bit": spiHost (spi2 or spi3), maxFreqKhz (default 20000), the mosi/miso/sck pins and one select line, either pins.cs on a GPIO or chips.expander.outputs.cardSelect on the expander. Both or neither is an error, as is a cardSelect with no storage, and the bus pins join the GPIO conflict table.

The board header gains GEA_BOARD_MICROSD_SPI, an SdSpiConfig storageSpi constant and a cardSelect member on IoExpanderConfig; the SD_MMC constants stay, wired to GPIO_NUM_NC, because the base checks them. The CMake fragment names the interface and asks for esp_driver_sdspi and esp_driver_spi. The matching mount lives in @geastack/targets.

Tested in test/boards.test.mjs (header, CMake, both select styles, the error cases, a lane clash) and documented in the setup guide's composed targets section. Verified on a Waveshare ESP32-S3-Touch-LCD-4.3B.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b0f5361f-44a3-4142-a404-462491d4b9ef
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA.
Posted by the CLA Assistant Lite bot.

The composer knew one card wiring, SD_MMC 1-bit on the SDMMC host. The
Waveshare RGB boards (the 7-inch, the 4.3B) put the card on SPI2 with
its chip-select on the CH422G, so no composed definition could declare
their slot. storage.microSD.interface now takes "spi" beside
"sdmmc-1bit": spiHost (spi2 or spi3), maxFreqKhz (default 20000), the
mosi/miso/sck pins and one select line, either pins.cs on a GPIO or
chips.expander.outputs.cardSelect on the expander. Both or neither is
an error, as is a cardSelect with no storage, and the bus pins join the
GPIO conflict table.

The board header gains GEA_BOARD_MICROSD_SPI, an SdSpiConfig storageSpi
constant and a cardSelect member on IoExpanderConfig; the SD_MMC
constants stay, wired to GPIO_NUM_NC, because the base checks them. The
CMake fragment names the interface and asks for esp_driver_sdspi and
esp_driver_spi. The matching mount lives in @geastack/targets.

Tested in test/boards.test.mjs (header, CMake, both select styles, the
error cases, a lane clash) and documented in the setup guide's composed
targets section. Verified on a Waveshare ESP32-S3-Touch-LCD-4.3B.
@scottvr
scottvr force-pushed the composed-spi-microsd branch from e392453 to 1949183 Compare October 16, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant