FastLED 3.10.10
Loading...
Searching...
No Matches
clockless_bus_controller.h
Go to the documentation of this file.
1#pragma once
2
3#include "fl/channels/bus.h"
5
6namespace fl {
7namespace detail {
8
9template<typename...> struct ControllerVoid { using type = void; };
10
11// Some legacy platforms have no Channel default bus. Keep that lookup
12// dependent so ordinary addLeds<> calls retain their original controller.
13template<typename Chipset, typename = void>
14struct ClocklessDefaultBus { static constexpr Bus value = Bus::AUTO; };
15
16template<typename Chipset>
17struct ClocklessDefaultBus<Chipset,
20};
21
22// Native controllers without a rebind hook can retain their platform default.
23// No type is exposed for an unsupported explicit transport.
24template<typename Controller, Bus B,
27
28template<typename Controller, Bus B>
32
34template<typename Controller, Bus B, bool IS_AUTO = (B == Bus::AUTO),
35 typename = void>
37
38template<typename Controller, Bus B>
42
43template<typename Controller, Bus B>
44struct ClocklessBusController<Controller, B, false,
46 using Rebound = typename Controller::template WithBus<B>;
47 // An inherited alias for the current transport names an existing base.
48 // Keep the derived controller's native initialization and encoding hooks.
49 using type = typename fl::conditional<
51};
52
53} // namespace detail
54} // namespace fl
Portable compile-time identifiers for LED channel buses.
Compile-time linker keep-alive hook for a single fl::Bus.
Definition bus_info.h:57
Bus
Portable public bus selector.
Definition bus.h:31
@ AUTO
Definition bus.h:32
Base definition for an LED controller.
typename fl::conditional< fl::is_base_of< Rebound, Controller >::value, Controller, Rebound >::type type
Auto preserves the original controller; every explicit bus uses its hook.