drivers/ws281x: add SPI backend#22003
Conversation
IMG_3124.mp4 |
crasbe
left a comment
There was a problem hiding this comment.
Some style comments, I haven't tested it yet.
benpicco
left a comment
There was a problem hiding this comment.
Looks good, just some nits
mhm 🙄 |
|
Can I simply guard our macros in |
That would cause other issues because the ESP32 definition is not a function. So writing I think we had this issue before somewhere but I don't remember the solution. |
The solution there was also not to use |
aecfce7 to
08f705c
Compare
08f705c to
67d683e
Compare
Seems like I have to keep the |
67d683e to
38bd754
Compare
Contribution description
SPI is a well known technique to drive the ws281x LED strip.

This PR add this as a possible backend.
There is unfortunately a glitch that pulls MOSI high on
spi_acquirewhich is falsely interpreted as a1.This can be googled as the "phantom bit problem" or the "first LED always green problem".
The trick is to generate a
RESETcondition so that all LEDs get clean data afterwards.Testing procedure
It works very reliable for me.
USEMODULE+=ws281x_spi make -C tests/drivers/ws281x/ -f Makefile.same54-xpro.mk flashIssues/PRs references
There was a previous PR #20218. The author is added in the implementation.