Makuna / NeoPixelBus

An Arduino NeoPixel support library supporting a large variety of individually addressable LEDs. Please refer to the Wiki for more details. Please use the GitHub Discussions to ask questions as the GitHub Issues feature is used for bug tracking.
GNU Lesser General Public License v3.0
1.18k stars 261 forks source link

Support non-byte aligned pixel lengths #709

Open Makuna opened 1 year ago

Makuna commented 1 year ago

Some Chips support 12bit per color element (total of 36 bits per pixel) which are not byte aligned and thus the current Feature/Method model can't support.
The feature model today assumes a pixel of data is always in byte length sizes.

Describe the solution you'd like Enhance the features to support bits rather than bytes for pixel length. Some methods use look up tables to quickly encode/form the output data for the hardware peripheral they use; these tables also makes assumptions about the size, but often it is only two bits minimum.

Describe alternatives you've considered Two or four bits size increments due to method limitations.

Additional context https://github.com/Makuna/NeoPixelBus/issues/705