-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Update ESP32 RMT driver and managed code to latest API version #1540
Comments
The new API has a number of underlying concept differences that will make C# code not backward compatible.
WIP |
The code that converts the mark to space ratio is very slow, on one board we have, setting the colour of 4 leds (we were using the RMT driver directly not the led library), we could see the led colour changes being applied with about a 1/2 second delay. Investigations found the SerializeCommands to be slow. We changed our code so that as we wrote colours the correct serialised data was being written to memory immediately, so SendData(byte[] data, bool waitTxDone) could be called. We suspect the use of math '/', '%' (and the branching) and not bit manipulation is the main problem. SerializeCommands could look something like this:
All the variable assignment is redundant, but the compiler should optimise the code nicely. |
If you're just looking for faster LED control you might want to check out my CCSWE.nanoFramework.NeoPixel library. It's been a while since I implemented it but I believe there was a reason I didn't backport any of the serialization improvements into the main library. That being said pull requests are always welcome if you have an improvement. |
@eeegs just following up on this that I implemented your change to the RMT library and it's now 50% faster. |
The next version speeds the serialization even further by putting it into native code. |
Awesome! I'm assuming |
Description
Currently the RMT code uses the legacy RMT API which is deprecated. This should be updated to the latest APi and include the new features.
How to solve the problem
Update native and managed RMT code to use latest API.
Describe alternatives you've considered
No response
Aditional context
No response
The text was updated successfully, but these errors were encountered: