FastLED 3.9.15
Loading...
Searching...
No Matches
ws2801_encoder_impl.h
Go to the documentation of this file.
1#pragma once
2
15
16#include "fl/chipsets/ws2801.h"
17#include "fl/stl/stdint.h"
18
19// No namespace declaration - this file is included inside the fl namespace
20
35template <typename InputIterator, typename OutputIterator>
36void encodeWS2801(InputIterator first, InputIterator last, OutputIterator out) {
37 // Forward to the modern implementation in ws2801.h
38 // This function signature is identical, so just call through
39 while (first != last) {
40 const array<u8, 3>& pixel = *first;
41 *out++ = pixel[0]; // Red
42 *out++ = pixel[1]; // Green
43 *out++ = pixel[2]; // Blue
44 ++first;
45 }
46 // No end frame needed - WS2801 latches via timing (clock pause)
47}
48
49// No closing of fl namespace - already inside it
void encodeWS2801(InputIterator first, InputIterator last, OutputIterator out)
Encode pixel data in WS2801/WS2803 format using PixelIterator.