Crates.io | ws2812-flexio |
lib.rs | ws2812-flexio |
version | 0.3.0 |
source | src |
created_at | 2023-07-22 15:23:21.940862 |
updated_at | 2024-06-23 11:55:13.182019 |
description | A neopixel driver based on NXP i.MX RT's FlexIO bus. |
homepage | |
repository | https://github.com/Finomnis/ws2812-flexio |
max_upload_size | |
id | 923267 |
size | 95,903 |
A neopixel driver based on NXP i.MX RT's FlexIO bus.
The default color space of NeoPixel LED strips is 8-bit linear sRGB, therefore the recommended pixel type is LinSrgb<u8>
.
Be aware that this differs from normal, gamma corrected sRGB; a conversion has to take place.
More info can be found in the documentation of the palette
crate.
This crate can operate either in blocking mode or in DMA driven asynchronous mode.
The library can drive multiple strips in parallel. To be more specific, driving multiple strips from the same FlexIO instance requires 2 + 2 * strips
FlexIO timers, so a for example a FlexIO instance with 8
timers can drive 3
strips in parallel.
The library drives the LED strips at 800kHz with a latch time of 300us. This gives us the following formula:
fps = 100,000 / ((num_pixels + 1) x bytes_per_pixel + 30)
Example: For a strip with 332 SK6805 pixels, we can achieve 100,000 / ((332 + 1) * 3 + 30) = 97.18
fps.
Be aware that this framerate is only realistic for DMA based writes; with blocking writes, additional time gets lost while the next frame gets computed.
- examples are intended for the Teensy 4.0 board -
The following hardware is required for the examples:
The following software tools have to be installed:
Python3 (as python3
, or modify run.py
to use the python
binary)
llvm-objcopy
LLVM
tool suitecargo run --release --example triple_332
.