@brief Generate P9813 flag byte from RGB components @param r Red component (0-255) @param g Green component (0-255) @param b Blue component (0-255) @return P9813 flag byte (0xC0 | checksum) @note Checksum uses top 2 bits of each color channel
| 50 | /// @return P9813 flag byte (0xC0 | checksum) |
| 51 | /// @note Checksum uses top 2 bits of each color channel |
| 52 | inline u8 p9813FlagByte(u8 r, u8 g, u8 b) FL_NOEXCEPT { |
| 53 | return 0xC0 | ((~b & 0xC0) >> 2) | ((~g & 0xC0) >> 4) | ((~r & 0xC0) >> 6); |
| 54 | } |
| 55 | |
| 56 | /// @brief Apply LPD8806 encoding to a single color byte |
| 57 | /// @param value 8-bit color value (0-255) |
no outgoing calls
no test coverage detected