FastLED 3.9.13
Loading...
Searching...
No Matches
led_strip_types.h
1/*
2 * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#pragma once
7
8#include <stdint.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
17typedef struct led_strip_t *led_strip_handle_t;
18
23typedef enum {
24 LED_MODEL_WS2812,
25 LED_MODEL_SK6812,
26 LED_MODEL_WS2811,
27 LED_MODEL_INVALID
28} led_model_t;
29
34typedef struct {
35 uint32_t t0h;
36 uint32_t t1h;
37 uint32_t t0l;
38 uint32_t t1l;
39 uint32_t reset;
41
42
47typedef union {
49 uint32_t r_pos: 2;
50 uint32_t g_pos: 2;
51 uint32_t b_pos: 2;
52 uint32_t w_pos: 2;
53 uint32_t reserved: 21;
54 uint32_t num_components: 3;
55 } format;
56 uint32_t format_id;
58
60#define LED_STRIP_COLOR_COMPONENT_FMT_GRB (led_color_component_format_t){.format = {.r_pos = 1, .g_pos = 0, .b_pos = 2, .w_pos = 3, .reserved = 0, .num_components = 3}}
61#define LED_STRIP_COLOR_COMPONENT_FMT_GRBW (led_color_component_format_t){.format = {.r_pos = 1, .g_pos = 0, .b_pos = 2, .w_pos = 3, .reserved = 0, .num_components = 4}}
62#define LED_STRIP_COLOR_COMPONENT_FMT_RGB (led_color_component_format_t){.format = {.r_pos = 0, .g_pos = 1, .b_pos = 2, .w_pos = 3, .reserved = 0, .num_components = 3}}
63#define LED_STRIP_COLOR_COMPONENT_FMT_RGBW (led_color_component_format_t){.format = {.r_pos = 0, .g_pos = 1, .b_pos = 2, .w_pos = 3, .reserved = 0, .num_components = 4}}
64
81
82#ifdef __cplusplus
83}
84#endif
LED Strip common configurations The common configurations are not specific to any backend peripheral.
led_color_component_format_t color_component_format
led_strip_encoder_timings_t timings
LED strip encoder timings.
LED strip interface definition.
LED color component format.