FastLED 3.9.15
Loading...
Searching...
No Matches
fl::TypedChannel< B, Chipset > Class Template Reference

Detailed Description

template<Bus B, typename Chipset>
class fl::TypedChannel< B, Chipset >

Templated channel facade.

See file-level comment for the design.

Template Parameters
BDriver bus identifier. Bus::AUTO resolves to DefaultBus<Chipset>::value for the current platform.
ChipsetChipset family (ClocklessChipset or SpiChipsetConfig).

Channel<B, Chipset> is not instantiated as a runtime object. It exists so the templated create() factory can static_assert the bus/chipset compatibility before constructing a (non-template) fl::Channel. This matches the API requested in issue #2428 without forcing every existing Channel consumer (subclasses like ClocklessIdf5, ChannelEvents callbacks, ChannelManager) to be retemplated.

Definition at line 64 of file channel_typed.h.

#include <channel_typed.h>

Public Member Functions

 FL_STATIC_ASSERT (BusSupports< kBus, Chipset >::value, "TypedChannel: Bus does not support this Chipset family")
 

Static Public Member Functions

static ChannelPtr create (const ChannelConfig &cfg) FL_NOEXCEPT
 Overload accepting the (type-erased) non-template config.
 
static ChannelPtr create (const ChannelConfigOf< Chipset > &cfg) FL_NOEXCEPT
 Construct a runtime Channel from a typed configuration.
 

Static Public Attributes

static constexpr Bus kBus = detail::resolve_bus<B, Chipset>::value
 The bus actually used after resolving Bus::AUTO.
 

Private Member Functions

 TypedChannel () FL_NOEXCEPT=delete
 

The documentation for this class was generated from the following file: