Skip to content

feat(spi): Add espp::Spi SPI component#618

Merged
finger563 merged 13 commits into
mainfrom
feat/spi-component-display-drivers-refactor
May 28, 2026
Merged

feat(spi): Add espp::Spi SPI component#618
finger563 merged 13 commits into
mainfrom
feat/spi-component-display-drivers-refactor

Conversation

@finger563

@finger563 finger563 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Description

  • feat(spi): Add SPI component
  • update doc
  • update ci

Motivation and Context

Allows better reuse across the project for SPI and SSI devices by reducing the amount of boilerplate SPI code required for devices like encoders, IMUs, displays, etc. that might be connected over SPI.

How has this been tested?

  • Use within updated components (bsps and examples) which are not committed yet, as they will be committed with updated display driver component as well.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

Copilot AI review requested due to automatic review settings May 26, 2026 21:38
@github-actions

Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

@finger563 finger563 self-assigned this May 26, 2026
@finger563 finger563 added enhancement New feature or request peripherals spi labels May 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new components/spi component that wraps the ESP-IDF SPI master driver in a C++ API (espp::Spi + Spi::Device) and adds a queued command/data helper intended for display-style workloads (SpiPanelIo / SpiCommandData). It also wires the new component into the documentation and CI example-build matrix so it’s published and continuously built like the other ESPP components.

Changes:

  • Add the new components/spi component (bus/device wrapper + queued command/data helper).
  • Add Sphinx/Doxygen documentation entries for the SPI component and example.
  • Update CI workflows to build the new example and upload the new component.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
doc/en/spi.rst New SPI documentation landing page + API include.
doc/en/spi_example.md Includes the SPI example README into docs.
doc/en/index.rst Adds spi to the docs index toctree.
doc/Doxyfile Adds SPI header + example to Doxygen inputs.
components/spi/src/spi.cpp Implements espp::Spi, Spi::Device, and SpiPanelIo.
components/spi/include/spi.hpp Public API for SPI wrapper + panel helper.
components/spi/README.md Component overview and intended usage.
components/spi/idf_component.yml Component Manager manifest for espp/spi.
components/spi/example/README.md Example description.
components/spi/example/main/spi_example.cpp Example demonstrating basic bus+device usage.
components/spi/example/main/CMakeLists.txt Registers the example “main” component.
components/spi/example/CMakeLists.txt ESP-IDF example project configuration.
components/spi/CMakeLists.txt Registers the SPI component and dependencies.
.github/workflows/upload_components.yml Adds components/spi to upload list.
.github/workflows/build.yml Adds components/spi/example to the build matrix.

Comment thread components/spi/include/spi.hpp Outdated
Comment thread components/spi/include/spi.hpp Outdated
Comment thread components/spi/src/spi.cpp Outdated
Comment thread components/spi/src/spi.cpp Outdated
Comment thread components/spi/src/spi.cpp
Comment thread components/spi/idf_component.yml
Comment thread components/spi/example/CMakeLists.txt
Comment thread components/spi/example/main/spi_example.cpp
@finger563 finger563 changed the title feat(spi): Add espp::Spi SPI component' feat(spi): Add espp::Spi SPI component May 26, 2026
@finger563 finger563 requested a review from Copilot May 26, 2026 22:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Comment thread components/spi/src/spi.cpp Outdated
Comment thread components/spi/src/spi.cpp Outdated
Comment thread components/spi/src/spi.cpp
Comment thread components/spi/src/spi.cpp Outdated
Comment thread doc/en/spi.rst Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Comment thread components/spi/src/spi.cpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Comment thread components/spi/src/spi.cpp
Comment thread components/spi/src/spi.cpp
Comment thread components/spi/example/CMakeLists.txt
Comment thread doc/en/spi.rst Outdated
Comment thread components/spi/include/spi.hpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Comment thread components/spi/src/spi.cpp Outdated
Comment thread doc/en/spi.rst Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Comment thread components/spi/include/spi.hpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Comment thread components/spi/example/main/spi_example.cpp
Comment thread components/spi/include/spi.hpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Comment thread components/spi/src/spi.cpp Outdated
finger563 and others added 2 commits May 27, 2026 22:28
Ensure the TXDATA and RXDATA spi transaction flags are ignored and only set by this transfer call

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@finger563 finger563 merged commit 694cc02 into main May 28, 2026
105 of 107 checks passed
@finger563 finger563 deleted the feat/spi-component-display-drivers-refactor branch May 28, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request peripherals spi

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants