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 ~20µs "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 69 of file ucs7604.h.
71 {
72
73 *out++ = 0xFF;
74 *out++ = 0xFF;
75 *out++ = 0xFF;
76 *out++ = 0xFF;
77 *out++ = 0xFF;
78 *out++ = 0xFF;
79
80
81 *out++ = 0x00;
82 *out++ = 0x03;
83
84
85 *out++ =
static_cast<u8>(mode);
86
87
88 *out++ = r_current & 0x0F;
89 *out++ = g_current & 0x0F;
90 *out++ = b_current & 0x0F;
91 *out++ = w_current & 0x0F;
92
93
94 *out++ = 0x00;
95 *out++ = 0x00;
96}
Referenced by encodeUCS7604().