FastLED
3.9.15
Loading...
Searching...
No Matches
channel_events.cpp.hpp
Go to the documentation of this file.
1
#include "
fl/channels/channel_events.h
"
2
#include "
fl/stl/singleton.h
"
3
4
namespace
fl
{
5
6
// Out-of-line `instance()` only exists in the full event-firing build.
7
// Under FASTLED_DISABLE_CHANNEL_EVENTS the header-defined inline
8
// `instance()` body fires (returns a static no-op object), and the
9
// `fl::Singleton<ChannelEvents>` template is not instantiated — letting
10
// `--gc-sections` drop both that template's machinery and the singleton
11
// itself. See #2931 / #2886.
12
#if !defined(FASTLED_DISABLE_CHANNEL_EVENTS) || !FASTLED_DISABLE_CHANNEL_EVENTS
13
ChannelEvents
&
ChannelEvents::instance
() {
14
return
fl::Singleton<ChannelEvents>::instance
();
15
}
16
#endif
17
18
}
// namespace fl
channel_events.h
fl::Singleton::instance
static T & instance() FL_NOEXCEPT
Definition
singleton.h:41
fl
Base definition for an LED controller.
Definition
crgb.hpp:179
singleton.h
fl::ChannelEvents::instance
static ChannelEvents & instance()
Definition
channel_events.cpp.hpp:13
fl::ChannelEvents
Singleton event router for Channel lifecycle events.
Definition
channel_events.h:79
fl
channels
channel_events.cpp.hpp
Generated on Tue Jun 16 2026 00:06:58 for FastLED by
1.13.2