FastLED
3.10.6
Loading...
Searching...
No Matches
tm1908.h
Go to the documentation of this file.
1
3
4
#pragma once
5
6
#include "
fl/stl/noexcept.h
"
7
#include "
fl/stl/stdint.h
"
8
9
namespace
fl
{
10
17
template
<
typename
InputIterator,
typename
OutputIterator>
18
void
encodeTM1908
(InputIterator first, InputIterator last,
19
OutputIterator out)
FL_NO_EXCEPT
{
20
const
u8
prefix[] = {
21
0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
// normal-mode command
22
0x7f, 0x7f, 0x7f,
// 25 mA R/G/B current
23
};
24
for
(
u8
byte
: prefix) {
25
*out++ =
byte
;
26
}
27
28
while
(first != last) {
29
const
auto
& pixel = *first;
30
*out++ = pixel[0];
31
*out++ = pixel[1];
32
*out++ = pixel[2];
33
++first;
34
}
35
}
36
37
}
// namespace fl
byte
uint8_t byte
Definition
midi_Defs.h:36
fl::u8
unsigned char u8
Definition
stdint.h:131
fl::encodeTM1908
void encodeTM1908(InputIterator first, InputIterator last, OutputIterator out) FL_NO_EXCEPT
Encode one complete TM1908 frame.
Definition
tm1908.h:18
fl::FL_NO_EXCEPT
InputGamut g FL_NO_EXCEPT
Definition
rgbw.h:121
fl
Base definition for an LED controller.
Definition
crgb.hpp:179
noexcept.h
stdint.h
fl
chipsets
encoders
tm1908.h
Generated on Sun Oct 4 2026 23:09:00 for FastLED by
1.13.2