FastLED 3.9.15
Loading...
Searching...
No Matches
clockless_encoder.h
Go to the documentation of this file.
1
12
13#pragma once
14
15#include "fl/stl/stdint.h"
16#include "fl/stl/noexcept.h"
17
18namespace fl {
19
27
29namespace detail {
30 template <typename T>
31 constexpr auto test_encoder(int) FL_NOEXCEPT -> decltype(T::ENCODER, true) { return true; }
32 template <typename T>
33 constexpr bool test_encoder(...) FL_NOEXCEPT { return false; }
34
35 template <typename CHIPSET, bool HAS_ENCODER>
39 template <typename CHIPSET>
40 struct get_encoder<CHIPSET, true> {
41 static constexpr ClocklessEncoder value = CHIPSET::ENCODER;
42 };
43} // namespace detail
44
45template <typename T>
47 static constexpr bool value = detail::test_encoder<T>(0);
48};
49
54template <typename TIMING>
58
59} // namespace fl
#define CHIPSET
constexpr auto test_encoder(int) FL_NOEXCEPT -> decltype(T::ENCODER, true)
unsigned char u8
Definition stdint.h:131
ClocklessEncoder
Identifies which encoder to use for clockless chipsets in the Channel API.
@ CLOCKLESS_ENCODER_UCS7604_8BIT
UCS7604 8-bit 800KHz.
@ CLOCKLESS_ENCODER_UCS7604_16BIT
UCS7604 16-bit 800KHz.
@ CLOCKLESS_ENCODER_UCS7604_16BIT_1600
UCS7604 16-bit 1600KHz.
@ CLOCKLESS_ENCODER_WS2812
Default, no preamble (WS2812 and compatible)
constexpr int type_rank< T >::value
constexpr ClocklessEncoder encoder_for() FL_NOEXCEPT
Extract the encoder selector from a compile-time TIMING type.
Base definition for an LED controller.
Definition crgb.hpp:179
#define FL_NOEXCEPT
static constexpr ClocklessEncoder value
static constexpr ClocklessEncoder value
static constexpr bool value