-
Notifications
You must be signed in to change notification settings - Fork 7.7k
feat(rmt): adds new function to send specific number of loops #11748
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: master
Are you sure you want to change the base?
Conversation
Adds a new function `rmtWriteLoopingCount()` to send a specific number of times, repeating the same RMT Symbols.
👋 Hello SuGlider, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Adds: bool rmtWriteLoopingCount(int pin, rmt_data_t *data, size_t num_rmt_symbols, uint32_t loop_count) It will send a pattern defined by `*data` RMT Symbols for `loop_count` times (repeated). This is different from `rmtWriteLooping()`, which will repeat it for ever (endless looping).
Test Results 76 files 76 suites 13m 10s ⏱️ Results for commit eedf368. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Updated rmtWriteLoopingCount to handle loop_count validation and added logic for single transmission.
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>
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>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
Adds a new RMT function to send patterns a specific number of times rather than infinitely. The PR introduces rmtWriteRepeated()
which transmits RMT symbols for a fixed loop count, complementing the existing rmtWriteLooping()
function that loops indefinitely.
Key changes:
- Modified internal
_rmtWrite()
function to handle loop counts instead of boolean looping flag - Added
rmtWriteRepeated()
function for finite repetition with input validation - Updated function documentation to clarify looping behavior differences
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
cores/esp32/esp32-hal-rmt.h | Adds function declaration and updates documentation for new repeated transmission feature |
cores/esp32/esp32-hal-rmt.c | Implements the repeated transmission logic and refactors internal write function to use numeric loop counts |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Description of Change
Adds a new function
rmtWriteLoopingCount()
to send a specific number of times, repeating the same RMT Symbols.Adds:
bool rmtWriteLoopingCount(int pin, rmt_data_t *data, size_t num_rmt_symbols, uint32_t loop_count)
It will send a pattern defined by
*data
RMT Symbols forloop_count
times (repeated).This is different from
rmtWriteLooping()
, which will repeat it for ever (endless looping).Test Scenarios
To-Do:
Related links
Closes #11731