-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add Bit transpose function to support piopixl8 #4219
Conversation
.. this version can only handle exactly 8 bits "across". The restriction may be relaxed in a future revision.
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.
Why does this start with _
? How about calling it bitops
or bufferops
? That way we can put other similar math here.
Renamed to "bitops", improved documentation, made output required, made width= positional. |
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.
Just one super minor thing.
We want to speed up writing neopixels by nearly 8x on RP2040 by placing multiple strands in parallel and driving them with PIO. This needs a very specific bit rearrangement calculation which is too slow to do in Python but can be done very efficiently in C.
Testing performed: with work-in-progress
adafruit_piopixl8
library, drove 2 to 8 strands of 30 real LEDs each; also stress tested the library by driving 25600 imaginary LEDs at a rate of about 240,000 pixels/second (theoretical max: about 266,667 pixels/second)