FastLED 3.9.15
Loading...
Searching...
No Matches

◆ p9813FlagByte()

u8 fl::p9813FlagByte ( u8 r,
u8 g,
u8 b )
inline

Generate P9813 flag byte from RGB components.

Parameters
rRed component (0-255)
gGreen component (0-255)
bBlue component (0-255)
Returns
P9813 flag byte (0xC0 | checksum)
Note
Checksum uses top 2 bits of each color channel

Definition at line 52 of file encoder_utils.h.

52 {
53 return 0xC0 | ((~b & 0xC0) >> 2) | ((~g & 0xC0) >> 4) | ((~r & 0xC0) >> 6);
54}

References FL_NOEXCEPT.

Referenced by encodeP9813().

+ Here is the caller graph for this function: