Build UCS7604 preamble (15 bytes)
- Template Parameters
-
| OutputIterator | Output iterator accepting uint8_t |
- Parameters
-
| out | Output iterator for preamble bytes |
| mode | UCS7604 protocol mode (8-bit/16-bit) |
| r_current | Red channel current control (0x0-0xF, wire order) |
| g_current | Green channel current control (0x0-0xF, wire order) |
| b_current | Blue channel current control (0x0-0xF, wire order) |
| w_current | White channel current control (0x0-0xF, wire order) |
- Note
- Current control values should already be reordered to match wire protocol (RGB)
-
KNOWN LIMITATION: The UCS7604 protocol spec requires a ~20us "W-code low" delay between the 8-byte verification code and the 7-byte configuration block. Our clockless controller sends all 15 bytes as a continuous bit-encoded stream without this gap. If this causes issues on some hardware, the transmission would need to be split into two separate clockless sends with a manual low-hold between them. See: https://github.com/clinder/Arduino-Teensy-UCS7604
Definition at line 71 of file ucs7604.h.
73 {
74
75 *out++ = 0xFF;
76 *out++ = 0xFF;
77 *out++ = 0xFF;
78 *out++ = 0xFF;
79 *out++ = 0xFF;
80 *out++ = 0xFF;
81
82
83 *out++ = 0x00;
84 *out++ = 0x03;
85
86
87 *out++ =
static_cast<u8>(mode);
88
89
90 *out++ = r_current & 0x0F;
91 *out++ = g_current & 0x0F;
92 *out++ = b_current & 0x0F;
93 *out++ = w_current & 0x0F;
94
95
96 *out++ = 0x00;
97 *out++ = 0x00;
98}
References FL_NO_EXCEPT.
Referenced by encodeUCS7604().