FastLED 3.9.15
Loading...
Searching...
No Matches

◆ enableDrivers()

template<Bus... Buses>
void fl::enableDrivers ( )
inline

Register the named drivers with ChannelManager for runtime selection.

Each named bus's BusTraits<B>::registerWithManager() is invoked, which:

  1. Lazily constructs the driver singleton (links its translation unit).
  2. Calls ChannelManager::addDriver(priority, instance) so the runtime manager can route channels to it.

Pre-condition: the per-driver bus_traits.h for each B named here must be reachable from the calling translation unit. Including the per-platform driver headers brings the relevant specializations in. Naming a Bus whose BusTraits<B> specialization is not visible produces a clear "implicit instantiation of undefined template" diagnostic.

#include "platforms/esp/32/drivers/rmt/rmt_5/bus_traits.h"
#include "platforms/esp/32/drivers/parlio/bus_traits.h"
void enableDrivers() FL_NOEXCEPT
Register the named drivers with ChannelManager for runtime selection.
Definition bus_traits.h:80

Definition at line 80 of file bus_traits.h.

80 {
81 // C++11-compatible pack expansion via array initializer trick.
82 using expand = int[];
83 (void)expand{0, detail::bus_register_one<Buses>()...};
84}
int bus_register_one() FL_NOEXCEPT
Helper used by enableDrivers<Bus...>() to expand the parameter pack.
Definition bus_traits.h:54

References fl::detail::bus_register_one(), and FL_NOEXCEPT.

+ Here is the call graph for this function: