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

Function create

src/fl/channels/channel_typed.h:83–90  ·  view source on GitHub ↗

@brief Construct a runtime `Channel` from a typed configuration. The factory returns a `ChannelPtr` to the existing non-template `fl::Channel` runtime object so the rest of the system (events, manager, draw list) is unchanged.

Source from the content-addressed store, hash-verified

81 /// `fl::Channel` runtime object so the rest of the system (events,
82 /// manager, draw list) is unchanged.
83 static ChannelPtr create(const ChannelConfigOf<Chipset>& cfg) FL_NOEXCEPT {
84 // Naming `BusTraits<kBus>::instance` here is the ODR-use that links
85 // the driver translation unit even in the static-only `--gc-sections`
86 // mode (issue #2428 Phase 5 binary-size fix).
87 (void)&BusTraits<kBus>::instance;
88 ChannelConfig erased = cfg.toErased();
89 return Channel::create(erased);
90 }
91
92 /// @brief Overload accepting the (type-erased) non-template config.
93 ///

Callers 15

addMethod · 0.85
addRxMethod · 0.85
resolveMethod · 0.85
rejectMethod · 0.85
ChannelMethod · 0.85
RMT>Method · 0.85
ISR>Method · 0.85
FLEXPWM>Method · 0.85
FLEXIO>Method · 0.85
LPC_SCT_CAPTURE>Method · 0.85
addMethod · 0.85
createMethod · 0.85

Calls 1

toErasedMethod · 0.80

Tested by 7

test_operator_equalsFunction · 0.68
test_operator_lessFunction · 0.68
test_operator_greaterFunction · 0.68
test_pmr_clear_emptiesFunction · 0.68
test_pmr_remove_oneFunction · 0.68