FastLED 3.9.15
Loading...
Searching...
No Matches
clockless_controller_impl.h
Go to the documentation of this file.
1#pragma once
2
3#ifndef __INC_FL_CLOCKLESS_CONTROLLER_IMPL_H
4#define __INC_FL_CLOCKLESS_CONTROLLER_IMPL_H
5
6#include "fl/gfx/eorder.h"
7
8namespace fl {
9 // ClocklessControllerImpl is the official API used by all chipset controllers.
10 // It uses the type-based template signature: typename TIMING (not const ChipsetTiming&)
11 //
12 // This aliases to:
13 // - ClocklessController if platform-specific driver is defined (ClocklessRMT, ClocklessSPI, etc.)
14 // - ClocklessBlockController for stub/WASM builds
15 // - ClocklessBlocking as generic fallback
16 //
17 // Platform-specific drivers are defined in chipsets.h as ClocklessController
18#ifdef FASTLED_CLOCKLESS_STUB_DEFINED
19 template <int DATA_PIN, typename TIMING, EOrder RGB_ORDER = RGB, int XTRA0 = 0, bool FLIP = false, int WAIT_TIME = 280>
20 using ClocklessControllerImpl = ClocklessBlockController<DATA_PIN, TIMING, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>;
21#else
22 // Platform-specific ClocklessController must be defined by each platform
23 // Platforms without hardware-accelerated drivers should explicitly use ClocklessBlocking
24 #if !defined(FL_CLOCKLESS_CONTROLLER_DEFINED)
25 #error "Platform does not have a clockless controller defined. Each platform must define ClocklessController or explicitly use ClocklessBlocking as a fallback."
26 #else
27 // Platform-specific ClocklessController (FL_CLOCKLESS_CONTROLLER_DEFINED is set)
28 template <int DATA_PIN, typename TIMING, EOrder RGB_ORDER = RGB, int XTRA0 = 0, bool FLIP = false, int WAIT_TIME = 280>
29 using ClocklessControllerImpl = ClocklessController<DATA_PIN, TIMING, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>;
30 #endif
31#endif
32} // namespace fl
33
34#endif // __INC_FL_CLOCKLESS_CONTROLLER_IMPL_H
Base definition for an LED controller.
Definition crgb.hpp:179