FastLED
3.9.15
Loading...
Searching...
No Matches
sm16716.h
Go to the documentation of this file.
1
#pragma once
2
15
16
#include "
fl/stl/stdint.h
"
17
#include "
fl/stl/array.h
"
18
#include "
fl/chipsets/encoders/encoder_constants.h
"
19
#include "
fl/stl/noexcept.h
"
20
21
namespace
fl
{
22
31
template
<
typename
InputIterator,
typename
OutputIterator>
32
void
encodeSM16716
(InputIterator first, InputIterator last, OutputIterator out)
FL_NOEXCEPT
{
33
// LED data: RGB bytes
34
// (Start bit for each triplet is handled by SPI hardware layer)
35
while
(first != last) {
36
const
fl::array<u8, BYTES_PER_PIXEL_RGB>
& pixel = *first;
37
*out++ = pixel[0];
// Index 0 (RGB order: Red)
38
*out++ = pixel[1];
// Index 1 (RGB order: Green)
39
*out++ = pixel[2];
// Index 2 (RGB order: Blue)
40
++first;
41
}
42
43
// Header: 50 zero bits (7 bytes of 0x00)
44
for
(
int
i = 0; i < 7; i++) {
45
*out++ = 0x00;
46
}
47
}
48
49
}
// 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::encodeSM16716
void encodeSM16716(InputIterator first, InputIterator last, OutputIterator out) FL_NOEXCEPT
Encode pixel data in SM16716 format.
Definition
sm16716.h:32
fl
Base definition for an LED controller.
Definition
crgb.hpp:179
noexcept.h
FL_NOEXCEPT
#define FL_NOEXCEPT
stdint.h
fl
chipsets
encoders
sm16716.h
Generated on Tue Jun 16 2026 00:06:59 for FastLED by
1.13.2