-
Notifications
You must be signed in to change notification settings - Fork 121
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
Your thoughts? #26
Comments
hey, I'm really sorry it took so long to get back in the swing of things. You can totally just call whatever you want from inside the interrupt. You can actually do a fair bit in there. That's how I did a lot of the stuff for my Channel3 project. I would STRONGLY recommend bigger buffers though, and there is so much overhead when getting an interrupt called. Function calls aren't free. That's not to say some degree of buffering wouldn't be good. It is annoying to give up such a huge buffer :-/... so I don't really know what the right answer is. |
Thanks for your thoughts :) I've been tinkering a lot towards this already. Last code is here: Will try and test more, could be another bug.. I also need more rgb leds.. XD 8 is not enough to test with larger buffers.. :) Should have a string of 30 here soon ;) |
30? We routinely use 300+! Rolls are ~$25, you don't have an excuse :-p |
I have to justify expenses with my better half, it's a limiting factor :) |
Do you actually have source code for the stuff in the web folder? Right now, it seems to be just symlink paths in the .c files... Or is this supposed to be relative to YOUR entire github layout (not a standalone project)? |
A little of colmun B. The symlinks you refer to, point to files in the To mitigate that you have either make recursive cloning default (
every time you clone a repository that uses submodules. With an already cloned repository you'll need to run
Submodules are the most common way to include other code and split up development effort. The next most common way would be subtrees. You should look into the basics of git. |
Just as a reminder by me. Thank you, @con-f-use for making "make" get the recurse if you forget to do it the first time. |
Hi!
I'm (slowly) trying to clean up/improve(?) your ws2812 i2s code:
https://github.com/cranphin/esp8266-dev/blob/master/esp8266-neo/dev/driver/ws2812_i2s.c
One thing I'd like to do is actually enable/use DMA interrupts.
This is certainly possible, someone has done this rather elegantly (I think) for the Arduino core:
https://github.com/Makuna/NeoPixelBus/blob/master/src/internal/NeoEsp8266DmaMethod.h#L282
But he has the benefit of the yield() method the Arduino core provides:
https://github.com/Makuna/NeoPixelBus/blob/master/src/internal/NeoEsp8266DmaMethod.h#L241
Which he uses to 'block' the update call until the DMA buffer has space, I don't think it's easy to do something like that in esp-open-sdk/Espressif NON-OS.
My current idea is to store the received/update bytes (just the RGB bytes) in a buffer, possibly a ring buffer size 2, with each part the length of the led string size. And then a far smaller DMA buffer (ring buffer as well I think, with at least 2 parts for converted RGB bytes), which is fed in small parts from the previous buffer in the interrupt, possibly in combination with a 'zero' buffer once it's done.
So the update method writes to the first buffer (overwriting the previous value if we get data faster then we can send it to the leds), And the interrupt moves it in small parts to the two DMA buffers, marking the first buffer done when it's finished.
Any thoughts on this? I'm really not used to working with interrupts and DMA, usually I work in Java :)
You seem pretty awesome at it though ;)
The text was updated successfully, but these errors were encountered: