-
Notifications
You must be signed in to change notification settings - Fork 24
fix(led_strip): Update LedStrip to support DMA #583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
✅Static analysis result - no issues found! ✅ |
There was a problem hiding this 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_dmaanddma_allocation_flagsto 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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…fix/582-led-strip-dma
Description
Update
LedStripto replace use ofstd::vectorwith 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
Checklist:
Software
.github/workflows/build.ymlfile to add my new test to the automated cloud build github action.