Ws2812 driver for embedded-hal spi traits

For usage with the smart-leds crate.

An embedded-hal driver for ws2812 leds using spi as the timing provider.

It provides two variants: - The normal usage

Your spi peripheral has to run at 3MHz & the SPI data is created on-the-fly. This means that your core has to be reasonably fast (~48 MHz). - Prerendered

If your core is too slow or your SPI peripheral has a different frequency, you may want to use this. It creates all the data beforehand & then sends it. This means that you have to provide a data array that's large enough for all the spi data.

It doesn't work!!!

When opening an issue about wrong/strange data, it would help if you include your code (of course) and a capture of MOSI & SCK from an oscilloscop/a logic analyzer.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.