MCPcopy Create free account
hub / github.com/FastLED/FastLED / testUCS7604Controller

Function testUCS7604Controller

tests/fl/chipsets/ucs7604.cpp:299–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297/// different color orders for input pixels which are converted internally
298template<EOrder RGB_ORDER, fl::UCS7604Mode MODE>
299fl::span<const uint8_t> testUCS7604Controller(fl::span<const CRGB> leds) {
300 static constexpr int TEST_PIN = 10;
301
302 fl::span<const uint8_t> captured;
303
304 if (MODE == fl::UCS7604Mode::UCS7604_MODE_8BIT_800KHZ) {
305 // Test 8-bit mode - controller accepts RGB_ORDER and converts to RGB wire order internally
306 static UCS7604TestController8bit<TEST_PIN, RGB_ORDER> controller;
307
308 // Create pixels with specified color order
309 PixelController<RGB_ORDER> pixels(leds.data(), leds.size(), ColorAdjustment::noAdjustment(), DISABLE_DITHER);
310
311 controller.init();
312 controller.showPixels(pixels);
313
314 // Get captured bytes via IData interface
315 captured = controller.getCapturedBytes();
316 } else {
317 // Test 16-bit mode - controller accepts RGB_ORDER and converts to RGB wire order internally
318 static UCS7604TestController16bit<TEST_PIN, RGB_ORDER> controller;
319
320 // Create pixels with specified color order
321 PixelController<RGB_ORDER> pixels(leds.data(), leds.size(), ColorAdjustment::noAdjustment(), DISABLE_DITHER);
322
323 controller.init();
324 controller.showPixels(pixels);
325
326 // Get captured bytes via IData interface
327 captured = controller.getCapturedBytes();
328 }
329
330 return captured;
331}
332
333FL_TEST_CASE("UCS7604 8-bit - RGB color order") {
334 CRGB leds[] = {

Callers

nothing calls this directly

Calls 5

dataMethod · 0.45
sizeMethod · 0.45
initMethod · 0.45
showPixelsMethod · 0.45
getCapturedBytesMethod · 0.45

Tested by

no test coverage detected