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

Detailed Description

HD108 SPI chipset encoder.

Free function encoder for HD108 chipsets. HD108 uses 16-bit RGB with gamma correction and brightness control.

Protocol:

  • Start frame: 64 bits (8 bytes) of 0x00
  • LED data: [Header:2B][R:16b][G:16b][B:16b] (8 bytes per LED)
  • End frame: (num_leds / 2) + 4 bytes of 0xFF

Header encoding (per-channel gain control):

  • Byte 0: [1][RRRRR][GG] - marker bit, 5-bit R gain, 2 MSBs of G gain
  • Byte 1: [GGG][BBBBB] - 3 LSBs of G gain, 5-bit B gain
  • Currently: R=G=B=brightness (same gain for all channels)
  • Future: Per channel gain control for higher color range

Definition in file hd108.h.

+ Include dependency graph for hd108.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::encodeHD108 (InputIterator first, InputIterator last, OutputIterator out, u8 global_brightness=255) FL_NOEXCEPT
 Encode pixel data in HD108 format with global brightness.
 
template<typename InputIterator, typename BrightnessIterator, typename OutputIterator>
void fl::encodeHD108_HD (InputIterator first, InputIterator last, BrightnessIterator brightness_first, OutputIterator out) FL_NOEXCEPT
 Encode pixel data in HD108 format with per-LED brightness.