Skip to content

Conversation

@finger563
Copy link
Contributor

Description

Update LedStrip to replace use of std::vector with a pointer + size approach for managing LED color data, and adds configuration options for whether to use DMA / allocation bits for the LED strip.

Motivation and Context

Closes #582 - allowing the LedStrip to be DMA-accelerated.

How has this been tested?

Tested on actual hardware with both DMA and non-DMA configurations, ensuring correct LED color output in both cases.

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 January 19, 2026 21:53
@finger563 finger563 self-assigned this Jan 19, 2026
@finger563 finger563 added enhancement New feature or request led_strip labels Jan 19, 2026
@github-actions
Copy link

github-actions bot commented Jan 19, 2026

✅Static analysis result - no issues found! ✅

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the LedStrip component to support DMA-accelerated memory allocation for improved performance with LED strip control. The change replaces std::vector<uint8_t> with manual memory management using raw pointers, allowing the use of ESP-IDF's heap capabilities API to allocate DMA-capable memory when needed.

Changes:

  • Replaced std::vector<uint8_t> with raw pointer + size for LED data buffer management
  • Added configuration options use_dma and dma_allocation_flags to control DMA memory allocation
  • Implemented proper move semantics (copy constructor/assignment deleted, move constructor/assignment added)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.

File Description
components/led_strip/include/led_strip.hpp Core implementation: replaced vector with manual memory management, added DMA support configuration, implemented move semantics, updated methods to work with raw pointers
components/led_strip/example/main/led_strip_example.cpp Updated example to demonstrate DMA usage with RMT peripheral
components/led_strip/CMakeLists.txt Added "heap" dependency for heap_caps_malloc API

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request led_strip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ledstrip.h multi DMA

2 participants