FastLED 3.10.6
Loading...
Searching...
No Matches
five_bit_semantics.cpp.hpp
Go to the documentation of this file.
1// ok no header - implementation for fl/channels/five_bit_semantics.h
2
4#include "fl/stl/singleton.h"
5
6namespace fl {
7
11 switch (chip) {
15 break;
17 chip_default = FiveBitSemantics::CurrentGain;
18 break;
20 // Protocol-compatible with APA102, but what its field does to
21 // light is not documented: B1's conservative default.
22 chip_default = FiveBitSemantics::Unknown;
23 break;
24 default:
26 }
27 return profile != FiveBitSemantics::NotApplicable ? profile : chip_default;
28}
29
31 if (semantics != FiveBitSemantics::SecondarySlowPwm) {
32 return 31;
33 }
34 if (floor_setting < 1) {
35 return 1;
36 }
37 return floor_setting > 31 ? 31 : floor_setting;
38}
39
40namespace detail {
41namespace {
43 u8 value = 31;
44};
45} // namespace
46
50} // namespace detail
51
52} // namespace fl
static T & instance() FL_NO_EXCEPT
Definition singleton.h:41
u8 & hdFieldFloor() FL_NO_EXCEPT
Backing store for CFastLED::setHdFieldFloor().
unsigned char u8
Definition stdint.h:131
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...
InputGamut g FL_NO_EXCEPT
Definition rgbw.h:121
SpiChipset
LED chipsets with SPI interface (clocked protocols) Modern type-safe enum class - prefer this for new...
@ APA102HD
APA102 LED chipset with 5-bit gamma correction.
@ DOTSTARHD
APA102HD LED chipset alias.
@ SK9822HD
SK9822 LED chipset with 5-bit gamma correction.
@ 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...
Base definition for an LED controller.
Definition crgb.hpp:179