Skip to content

Share SPI target resource infrastructure - #3218

Merged
floitsch merged 1 commit into
masterfrom
floitsch/spi.25-target-resource-refactor
Sep 13, 2026
Merged

floitsch merged 1 commit into
masterfrom
floitsch/spi.25-target-resource-refactor

Conversation

@floitsch

@floitsch floitsch commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Regular and buffered SPI targets duplicate host, GPIO, event-queue, driver-configuration, and teardown ownership. Introduce a shared native base that owns these resources and centralizes configuration and bounded teardown. Each target mode retains its separate transaction state machine and ISR behavior. There are no public Toit API changes.

Rebased directly onto master after #3160 and the async I2C/SPI refactoring merged. This PR contains only the SPI target resource refactor, preserving master's feature guards and controller lifecycle implementation.

Validation on the rebased commit:

  • Host SDK, classic ESP32 firmware, and ESP32-S3 firmware builds passed.
  • Both ESP32 hardware pairs were flashed and passed rig health checks.
  • All 14 SPI-related hardware tests passed across classic ESP32 and ESP32-S3: regular and buffered targets, controller lifecycle, keep-active, chip-select timing, transfers, and I2C/SPI allocation-failure handling.
  • git diff --check passed.

@floitsch
floitsch force-pushed the floitsch/spi.20-buffer-target branch from a583803 to 4d9a66f Compare September 12, 2026 23:16
An error occurred while trying to automatically change base from floitsch/spi.20-buffer-target to floitsch/spi.10-target September 13, 2026 01:18
@floitsch
floitsch force-pushed the floitsch/spi.25-target-resource-refactor branch from 58e6d66 to 0f92dcf Compare September 13, 2026 22:17
@floitsch
floitsch changed the base branch from floitsch/spi.20-buffer-target to master September 13, 2026 22:17
@floitsch
floitsch enabled auto-merge (squash) September 13, 2026 22:24
@floitsch
floitsch merged commit fbfe8ff into master Sep 13, 2026
36 of 37 checks passed
@floitsch
floitsch deleted the floitsch/spi.25-target-resource-refactor branch September 13, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant