FastLED 3.9.15
Loading...
Searching...
No Matches
apa102.h File Reference

Detailed Description

APA102/DOTSTAR SPI chipset encoder.

Free function encoder for APA102/DOTSTAR chipsets.

Protocol:

  • Start frame: 4 bytes of 0x00
  • LED data: [0xE0|brightness][B][G][R] (4 bytes per LED)
  • End frame: ⌈num_leds/32⌉ DWords of 0xFF

Brightness modes:

  • Global: All LEDs use same 5-bit brightness (from first pixel)
  • Per-LED: Each LED has individual brightness (if brightness iterator provided)
  • Full: All LEDs at maximum brightness (31)
Note
Brightness is 5-bit (0-31), stored in bits 0-4 of header byte

Definition in file apa102.h.

+ Include dependency graph for apa102.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  fl
 Base definition for an LED controller.
 

Functions

template<typename InputIterator, typename OutputIterator>
void fl::encodeAPA102 (InputIterator first, InputIterator last, OutputIterator out, u8 global_brightness=31) FL_NOEXCEPT
 Encode pixel data in APA102 format with global brightness.
 
template<typename InputIterator, typename OutputIterator>
FL_NO_INLINE_IF_AVR FL_OPTIMIZE_O2 void fl::encodeAPA102_AutoBrightness (InputIterator first, InputIterator last, OutputIterator out) FL_NOEXCEPT
 Encode pixel data in APA102 format (auto-detected brightness from first pixel)
 
template<typename InputIterator, typename BrightnessIterator, typename OutputIterator>
void fl::encodeAPA102_HD (InputIterator first, InputIterator last, BrightnessIterator brightness_first, OutputIterator out) FL_NOEXCEPT
 Encode pixel data in APA102 format with per-LED brightness.