Helper: Verify 16-bit LED frame at specific offset
| 47 | |
| 48 | // Helper: Verify 16-bit LED frame at specific offset |
| 49 | static void verifyLEDFrame(const vector<u8>& data, size_t offset, u8 r, u8 g, u8 b) { |
| 50 | FL_REQUIRE(data.size() >= offset + 2); |
| 51 | |
| 52 | u16 actual = (static_cast<u16>(data[offset]) << 8) | data[offset + 1]; |
| 53 | u16 expected = lpd6803EncodeRGB(r, g, b); |
| 54 | |
| 55 | FL_CHECK(actual == expected); |
| 56 | |
| 57 | // Verify marker bit is set |
| 58 | FL_CHECK((actual & 0x8000) == 0x8000); |
| 59 | } |
| 60 | |
| 61 | } // namespace test_lpd6803 |
| 62 |
no test coverage detected