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

Detailed Description

UCS7604 LED chipset encoder implementation.

Free function encoder for UCS7604 chipsets. Supports multiple modes: 8-bit/16-bit color depth, RGB/RGBW output.

Protocol:

  • Preamble: 15 bytes (sync, header, mode, current control, reserved)
  • Padding: 0-2 zero bytes (ensures total size divisible by 3)
  • LED data: Variable size based on mode and LED count
    • 8-bit RGB: 3 bytes/LED
    • 8-bit RGBW: 4 bytes/LED
    • 16-bit RGB: 6 bytes/LED
    • 16-bit RGBW: 8 bytes/LED
Note
This consolidates encoding logic previously in UCS7604ControllerT::showPixels

Definition in file ucs7604.h.

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

Go to the source code of this file.

Classes

struct  fl::UCS7604CurrentControl
 UCS7604 current control structure with 4-bit fields for each channel. More...
 

Namespaces

namespace  fl
 Base definition for an LED controller.
 

Enumerations

enum class  fl::UCS7604Mode { fl::UCS7604_MODE_8BIT_800KHZ = 0x03 , fl::UCS7604_MODE_16BIT_800KHZ = 0x8B , fl::UCS7604_MODE_16BIT_1600KHZ = 0x9B }
 UCS7604 protocol configuration modes. More...
 

Functions

template<typename OutputIterator>
void fl::buildUCS7604Preamble (OutputIterator out, UCS7604Mode mode, u8 r_current, u8 g_current, u8 b_current, u8 w_current)
 Build UCS7604 preamble (15 bytes)
 
template<typename OutputIterator>
void fl::encodeUCS7604 (PixelIterator &pixel_iter, size_t num_leds, OutputIterator out, UCS7604Mode mode, const UCS7604CurrentControl &current, bool is_rgbw, const Gamma8 *gamma=nullptr)
 Encode complete UCS7604 frame (preamble + padding + pixel data)
 
template<typename InputIterator, typename OutputIterator>
void fl::encodeUCS7604_16bit_RGB (InputIterator first, InputIterator last, OutputIterator out, const Gamma8 &gamma)
 Encode RGB pixels in UCS7604 16-bit format with gamma correction.
 
template<typename InputIterator, typename OutputIterator>
void fl::encodeUCS7604_16bit_RGBW (InputIterator first, InputIterator last, OutputIterator out, const Gamma8 &gamma)
 Encode RGBW pixels in UCS7604 16-bit format with gamma correction.
 
template<typename InputIterator, typename OutputIterator>
void fl::encodeUCS7604_8bit_RGB (InputIterator first, InputIterator last, OutputIterator out)
 Encode RGB pixels in UCS7604 8-bit format.
 
template<typename InputIterator, typename OutputIterator>
void fl::encodeUCS7604_8bit_RGBW (InputIterator first, InputIterator last, OutputIterator out)
 Encode RGBW pixels in UCS7604 8-bit format.