Skip to content
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

Espidf5 new RMT support #367

Merged
merged 2 commits into from
Oct 30, 2023
Merged

Espidf5 new RMT support #367

merged 2 commits into from
Oct 30, 2023

Conversation

ladyada
Copy link
Member

@ladyada ladyada commented Oct 28, 2023

cc @me-no-dev & espressif/arduino-esp32#8796

i think this is right? i dont need to disable the rmt post-write and it's ok that the rmt_data_t led_data[numBytes * 8] its writing is on the function stack? or should i malloc it on the heap?

@me-no-dev
Copy link

@ladyada I am not sure how many bytes this function will try to send, but each byte takes 32 actual bytes of RMT memory. Maybe best to malloc if data might grow. Also I see you test against IDF version, but at the same time you use Arduino API. Why not test against the Arduino version? We have a header since early 2.x and is much like IDF's :)

@me-no-dev
Copy link

Oh and on the disabling RMT, no you do not need to do that. You could even later use that same pin for something else and as soon as you try to use it for it, the peripheral manager in Arduino will deinit the RMT and init whatever you asked.

@ladyada
Copy link
Member Author

ladyada commented Oct 30, 2023

yes i definitely learned that manually setting the pin to be an output will disable the RMT. the stack memory is fine as long as RMT peripheral cleans up after itself.
i think testing against IDF instead of BSP might be better because some people could use this code in IDF directly

@ladyada ladyada merged commit f8ec6ae into master Oct 30, 2023
2 checks passed
@me-no-dev
Copy link

i think testing against IDF instead of BSP might be better because some people could use this code in IDF directly

It calls ESP32 Arduino API's so even if used in IDF, Arduino needs to be added as component. It generally does not matter which one you use, at least for now they mean the same thing, but in the future that might not be the case. I'm merely suggesting it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants