FastLED 3.10.8
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
29
31namespace detail {
32 template <typename T>
33 constexpr auto test_encoder(int) FL_NO_EXCEPT -> decltype(T::ENCODER, true) { return true; }
34 template <typename T>
35 constexpr bool test_encoder(...) FL_NO_EXCEPT { return false; }
36
37 template <typename CHIPSET, bool HAS_ENCODER>
41 template <typename CHIPSET>
42 struct get_encoder<CHIPSET, true> {
43 static constexpr ClocklessEncoder value = CHIPSET::ENCODER;
44 };
45} // namespace detail
46
47template <typename T>
49 static constexpr bool value = detail::test_encoder<T>(0);
50};
51
56template <typename TIMING>
60
61} // namespace fl
#define CHIPSET
constexpr auto test_encoder(int) FL_NO_EXCEPT -> decltype(T::ENCODER, true)
unsigned char u8
Definition stdint.h:131
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
ClocklessEncoder
Identifies which encoder to use for clockless chipsets in the Channel API.
@ CLOCKLESS_ENCODER_UCS7604_8BIT
UCS7604 8-bit 800KHz.
@ CLOCKLESS_ENCODER_TM1812_RGBWW
TM1812: two 5-byte RGBWW pixels in each 12-byte IC frame.
@ 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)
@ CLOCKLESS_ENCODER_TM1908
TM1908: command prefix followed by RGB pixels.
constexpr int type_rank< T >::value
constexpr ClocklessEncoder encoder_for() FL_NO_EXCEPT
Extract the encoder selector from a compile-time TIMING type.
Base definition for an LED controller.
Definition crgb.hpp:179
static constexpr ClocklessEncoder value
static constexpr ClocklessEncoder value
static constexpr bool value