FastLED 3.10.8
Loading...
Searching...
No Matches

◆ tryEncodeManagedSpi()

FL_NO_INLINE bool fl::anonymous_namespace{channel.cpp.hpp}::tryEncodeManagedSpi ( Channel & channel,
PixelIterator & pixels,
bool managed,
fl::vector_psram< u8 > & output,
SpiChipset chipset )

Shared color-managed SPI override check.

Keeping it out of the per-chipset leaves avoids duplicating the optional pipeline hook in every writer.

Definition at line 653 of file channel.cpp.hpp.

656 {
657#if FL_COLOR_PROFILE_RUNTIME
658 if (!managed) {
659 return false;
660 }
661 const ColorPipelineHooks& hooks = colorPipelineHooks();
662 return hooks.encodeManagedSpi != nullptr &&
663 hooks.encodeManagedSpi(pixels, &output, chipset, channel);
664#else
665 FL_UNUSED(channel);
666 FL_UNUSED(pixels);
667 FL_UNUSED(managed);
668 FL_UNUSED(output);
669 FL_UNUSED(chipset);
670 return false;
671#endif
672}
ColorPipelineHooks & colorPipelineHooks() FL_NO_EXCEPT
The installed hooks.
bool(* encodeManagedSpi)(PixelIterator &pixels, vector_psram< u8 > *out, SpiChipset chip, const Channel &controller)
Unscaled (full-brightness) power demand of leds as the pipeline will drive them, in mW,...
#define FL_UNUSED(x)

References fl::colorPipelineHooks(), fl::ColorPipelineHooks::encodeManagedSpi, fl::FL_NO_EXCEPT, FL_UNUSED, and tryEncodeManagedSpi().

Referenced by tryEncodeManagedSpi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: