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

◆ powerChannelCodecPolicy()

fl::PowerCodecPolicy fl::powerChannelCodecPolicy ( const CLEDController & controller)

Identify the channel's final current/quantization choice without adding a virtual slot or storage to every ordinary CLEDController.

Definition at line 170 of file FastLED.cpp.hpp.

171 {
172 PowerCodecPolicy policy;
174 for (fl::size i = 0; i < registered.size(); ++i) {
175 const fl::Channel* channel = registered[i].get();
176 if (channel != &controller) continue;
177 policy.kind = PowerCodecKind::Byte;
179 channel->getChipset().ptr<fl::SpiChipsetConfig>();
180 if (spi == nullptr) return policy;
181 switch (spi->timing.chipset) {
184 break;
187 break;
193 const fl::EmitterProfile* profile = channel->emitterProfile();
195 spi->timing.chipset, profile != nullptr
196 ? profile->five_bit_semantics
199 semantics, fl::detail::hdFieldFloor());
200 break;
201 }
202 default:
203 break;
204 }
205 return policy;
206 }
207 // A custom managed controller has no known wire encoding. Charging full
208 // code for every lit emitter is conservative, never a silent guess.
209 return policy;
210}
CLEDController * controller
static fl::vector< fl::ChannelPtr > & channels() FL_NO_EXCEPT
stored ChannelPtrs to keep them alive
const EmitterProfile * emitterProfile() const FL_NO_EXCEPT
Definition channel.h:233
const ChipsetVariant & getChipset() const FL_NO_EXCEPT
Get the chipset configuration variant.
Definition channel.h:136
LED channel for parallel output, pretty much a CPixelLEDController but with timing and pin informatio...
Definition channel.h:60
fl::size size() const FL_NO_EXCEPT
u8 & hdFieldFloor() FL_NO_EXCEPT
Backing store for CFastLED::setHdFieldFloor().
FiveBitSemantics
u8 hdMinimumField(FiveBitSemantics semantics, u8 floor_setting) FL_NO_EXCEPT
The lowest field the managed HD path may choose: the configured flicker floor for a secondary slow-PW...
@ LPD6803
LPD6803 LED chipset.
@ APA102HD
APA102 LED chipset with 5-bit gamma correction.
@ DOTSTARHD
APA102HD LED chipset alias.
@ SK9822HD
SK9822 LED chipset with 5-bit gamma correction.
@ LPD8806
LPD8806 LED chipset.
@ HD107HD
Same as APA102HD, but in turbo 40-mhz mode.
FiveBitSemantics fiveBitSemanticsFor(SpiChipset chip, FiveBitSemantics profile) FL_NO_EXCEPT
The 5-bit semantics for chip, with profile overriding the chip's default when it is not NotApplicable...
PowerCodecKind kind
SPI chipset configuration (data + clock pins)
Definition config.h:103

References APA102HD, Byte, CFastLED::channels(), controller, DOTSTARHD, fl::Channel::emitterProfile(), fl::colorimetric_response::EmitterProfile::five_bit_semantics, FiveBit, fiveBitSemanticsFor(), FL_NO_EXCEPT, fl::Channel::getChipset(), HD107HD, fl::detail::hdFieldFloor(), hdMinimumField(), fl::PowerCodecPolicy::kind, LPD6803, LPD8806, fl::PowerCodecPolicy::min_field, Native5, Native7, NotApplicable, fl::vector_basic::size(), and SK9822HD.

+ Here is the call graph for this function: