| 36 | #include "FastLED.h" |
| 37 | |
| 38 | FL_TEST_FILE(FL_FILEPATH) { |
| 39 | |
| 40 | using namespace fl; |
| 41 | |
| 42 | namespace { |
| 43 | |
| 44 | /// RGB16 color structure for 16-bit color values (test-only) |
| 45 | /// Similar to CRGB but uses uint16_t for each channel |
| 46 | struct RGB16 { |
| 47 | union { |
| 48 | struct { |
| 49 | uint16_t r; ///< Red channel (16-bit) |
| 50 | uint16_t g; ///< Green channel (16-bit) |
| 51 | uint16_t b; ///< Blue channel (16-bit) |
| 52 | }; |
| 53 | uint16_t raw[3]; ///< Access as array |
| 54 | }; |
| 55 | |
| 56 | /// Default constructor |
| 57 | RGB16() : r(0), g(0), b(0) {} |
| 58 | |
| 59 | /// Construct from individual 16-bit values |
| 60 | RGB16(uint16_t ir, uint16_t ig, uint16_t ib) : r(ir), g(ig), b(ib) {} |
| 61 | |
| 62 | /// Array access operator |
| 63 | uint16_t& operator[](size_t x) { return raw[x]; } |
| 64 | const uint16_t& operator[](size_t x) const { return raw[x]; } |
| 65 | }; |
| 66 | |
| 67 | /// RGBW8 color structure for 8-bit RGBW color values (test-only) |
| 68 | struct RGBW8 { |
| 69 | union { |
| 70 | struct { |
| 71 | uint8_t r; ///< Red channel (8-bit) |
| 72 | uint8_t g; ///< Green channel (8-bit) |
| 73 | uint8_t b; ///< Blue channel (8-bit) |
| 74 | uint8_t w; ///< White channel (8-bit) |
| 75 | }; |
| 76 | uint8_t raw[4]; ///< Access as array |
| 77 | }; |
| 78 | |
| 79 | /// Default constructor |
| 80 | RGBW8() : r(0), g(0), b(0), w(0) {} |
| 81 | |
| 82 | /// Construct from individual 8-bit values |
| 83 | RGBW8(uint8_t ir, uint8_t ig, uint8_t ib, uint8_t iw) : r(ir), g(ig), b(ib), w(iw) {} |
| 84 | |
| 85 | /// Array access operator |
| 86 | uint8_t& operator[](size_t x) { return raw[x]; } |
| 87 | const uint8_t& operator[](size_t x) const { return raw[x]; } |
| 88 | }; |
| 89 | |
| 90 | /// RGBW16 color structure for 16-bit RGBW color values (test-only) |
| 91 | /// Similar to RGB16 but with white channel |
| 92 | struct RGBW16 { |
| 93 | union { |
| 94 | struct { |
| 95 | uint16_t r; ///< Red channel (16-bit) |
nothing calls this directly
no test coverage detected