FastLED
3.9.15
Loading...
Searching...
No Matches
ws2801.h
Go to the documentation of this file.
1
#pragma once
2
17
18
#include "
fl/stl/stdint.h
"
19
#include "
fl/stl/array.h
"
20
#include "
fl/chipsets/encoders/encoder_constants.h
"
21
#include "
fl/stl/noexcept.h
"
22
23
namespace
fl
{
24
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
array.h
fl::array
A fixed-size array implementation similar to std::array.
Definition
array.h:27
encoder_constants.h
Constants for SPI chipset encoders.
fl::encodeWS2801
void encodeWS2801(InputIterator first, InputIterator last, OutputIterator out) FL_NOEXCEPT
Encode pixel data in WS2801/WS2803 format.
Definition
ws2801.h:41
fl
Base definition for an LED controller.
Definition
crgb.hpp:179
noexcept.h
FL_NOEXCEPT
#define FL_NOEXCEPT
stdint.h
fl
chipsets
encoders
ws2801.h
Generated on Tue Jun 16 2026 00:06:59 for FastLED by
1.13.2