MCPcopy Create free account
hub / github.com/FastLED/FastLED / RGBW16

Class RGBW16

tests/fl/chipsets/ucs7604.cpp:92–112  ·  view source on GitHub ↗

RGBW16 color structure for 16-bit RGBW color values (test-only) Similar to RGB16 but with white channel

Source from the content-addressed store, hash-verified

90/// RGBW16 color structure for 16-bit RGBW color values (test-only)
91/// Similar to RGB16 but with white channel
92struct RGBW16 {
93 union {
94 struct {
95 uint16_t r; ///< Red channel (16-bit)
96 uint16_t g; ///< Green channel (16-bit)
97 uint16_t b; ///< Blue channel (16-bit)
98 uint16_t w; ///< White channel (16-bit)
99 };
100 uint16_t raw[4]; ///< Access as array
101 };
102
103 /// Default constructor
104 RGBW16() : r(0), g(0), b(0), w(0) {}
105
106 /// Construct from individual 16-bit values
107 RGBW16(uint16_t ir, uint16_t ig, uint16_t ib, uint16_t iw) : r(ir), g(ig), b(ib), w(iw) {}
108
109 /// Array access operator
110 uint16_t& operator[](size_t x) { return raw[x]; }
111 const uint16_t& operator[](size_t x) const { return raw[x]; }
112};
113
114// Preamble constants for different modes
115constexpr uint8_t PREAMBLE_8BIT_800KHZ[15] = {

Callers 1

FL_TEST_FILEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected