FastLED 3.10.6
Loading...
Searching...
No Matches
pipeline_binding.h File Reference
+ Include dependency graph for pipeline_binding.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fl::ColorPipelineHooks
 

Namespaces

namespace  fl
 Base definition for an LED controller.
 

Functions

bool fl::buildPipelineForBinding (const ColorProfileBinding &binding, StreamingPipelineQ16 *out) FL_NO_EXCEPT
 Build the streaming pipeline a binding describes.
 
ColorPipelineHooks & fl::colorPipelineHooks () FL_NO_EXCEPT
 The installed hooks.
 
void fl::installColorPipelineHooks () FL_NO_EXCEPT
 Point the hooks at the real implementations.
 

Variables

constexpr fl::size fl::kColorPipelineIteratorStorage = sizeof(PixelIterator)
 
constexpr fl::size fl::kColorPipelineSourceStorage = sizeof(ColorManagedPixelSource)
 The two things Channel needs from the colour pipeline, reached through pointers rather than by name.
 

Class Documentation

◆ fl::ColorPipelineHooks

struct fl::ColorPipelineHooks
+ Collaboration diagram for fl::ColorPipelineHooks:
Class Members
bool(*)(const ColorProfileBinding &, const ChannelOptions &, const ChipsetVariant &, StreamingPipelineQ16 *) build Derives a pipeline from a binding. Null until installed.
void(*)(void *source_storage, void *iterator_storage) destroyIterator Destroys what makeIterator built. Null until installed.
bool(*)(PixelIterator &pixels, vector_psram< u8 > *out, SpiChipset chip, const CLEDController &controller) encodeManagedSpi Unscaled (full-brightness) power demand of leds as the pipeline will drive them, in mW, including idle draw.

Null until installed.

The limiter must charge the drives the strip actually lights, not the source triple the sketch wrote: for a bound profile the two differ by whatever the solve does, in either direction, and by up to 4.45x on dim emitters (#4344, #4156 R3). Evaluated at unity flux, so brightness and power limiting scale the result the same way they scale any other controller's demand.

The drives are charged through estimate, the power limiter's own estimator, which the caller in power_mgt passes in. Naming it here would link the limiter and its tables into every build that can bind a profile, power limiting or not (#4472). Chipset-specific quantization of a colour-managed SPI channel's wide drive, where the 8-bit path cannot do it in one step (#4042):

  • APA102-class HD: B1's joint code/field solve, when the chip's 5-bit semantics (a bound profile overriding the chip default) allow the field below 31 at the configured floor;
  • LPD8806 / LPD6803: one quantization to the chip's 7 / 5 bits (B3). Returns true if it encoded the frame, false to let the caller encode as before. Through the hook so none of it links into a sketch that binds no profile.
PixelIterator *(*)(void *source_storage, void *iterator_storage, PixelController< RGB, 1, 0xFFFFFFFF > &controller, EOrder order, ColorPipelineFrameRef pipeline, const Rgbw &rgbw, Rgbww rgbww, u8 dither_phase, u8 brightness) makeIterator Constructs a colour-managed PixelIterator in caller-provided storage.

Null until installed.

The storage is Channel's, sized by kColorPipelineIteratorStorage, because the factory cannot return an object whose type the caller is forbidden to name – that is the whole point of the seam.

void(*)() notifyProfileClearedByLegacy Fires ChannelEvents::onColorProfileWarning(ProfileClearedByLegacy).

Null until installed.

A legacy setter (setCorrection, setTemperature) can only clear a profile that was bound, and binding installs these hooks. Emitting the event directly from ChannelOptions instead kept the event list's invoke path – fl::vector, malloc/realloc/free, a sort – alive in every sketch that calls setCorrection: ~8.3 KB on AVR.