| 39 | /// @note WS2801 uses RGB wire order: pixel[0]=Red, pixel[1]=Green, pixel[2]=Blue |
| 40 | template <typename InputIterator, typename OutputIterator> |
| 41 | void encodeWS2801(InputIterator first, InputIterator last, OutputIterator out) FL_NOEXCEPT { |
| 42 | while (first != last) { |
| 43 | const array<u8, BYTES_PER_PIXEL_RGB>& pixel = *first; |
| 44 | *out++ = pixel[0]; // Index 0 (RGB order: Red) |
| 45 | *out++ = pixel[1]; // Index 1 (RGB order: Green) |
| 46 | *out++ = pixel[2]; // Index 2 (RGB order: Blue) |
| 47 | ++first; |
| 48 | } |
| 49 | // No end frame needed - WS2801 latches via timing (clock pause) |
| 50 | } |
| 51 | |
| 52 | } // namespace fl |
no outgoing calls
no test coverage detected