24 #include "../common/color.h"
26 #define LED_SPECIAL_COLOR_COUNT 8
27 #define LED_DIRECTION_COUNT 6
28 #define LED_MAX_STRIP_LENGTH 32
29 #define LED_CONFIGURABLE_COLOR_COUNT 16
30 #define LED_MODE_COUNT 6
31 #define LED_FUNCTION_COUNT 10
33 #define LED_DIRECTION_BIT_OFFSET 0
34 #define LED_FUNCTION_BIT_OFFSET LED_DIRECTION_COUNT
37 #define LED_X_BIT_OFFSET 4
38 #define LED_Y_BIT_OFFSET 0
39 #define LED_XY_MASK 0x0F
40 #define CALCULATE_LED_XY(x, y) ((((x) & LED_XY_MASK) << LED_X_BIT_OFFSET) | (((y) & LED_XY_MASK) << LED_Y_BIT_OFFSET))
91 #define LED_FLAG_DIRECTION(directionId) (1 << (LED_DIRECTION_BIT_OFFSET + (directionId)))
93 #define LED_FLAG_DIRECTION_MASK (((1 << LED_DIRECTION_COUNT) - 1) << LED_DIRECTION_BIT_OFFSET)
108 #define LED_FLAG_FUNCTION(functionId) (1 << (LED_FUNCTION_BIT_OFFSET + (functionId)))
110 #define LED_FLAG_FUNCTION_MASK (((1 << LED_FUNCTION_COUNT) - 1) << LED_FUNCTION_BIT_OFFSET)
Definition: ledstrip.h:47
Definition: ledstrip.h:67
uint16_t flags
Definition: ledstrip.h:123
Definition: ledstrip.h:44
uint8_t xy
Definition: ledstrip.h:121
Definition: ledstrip.h:98
Definition: ledstrip.h:43
Definition: ledstrip.h:71
Definition: ledstrip.h:96
Definition: ledstrip.h:126
struct led_spc_color_indices spcColors[1]
Definition: ledstrip.h:130
Definition: ledstrip.h:73
#define LED_MAX_STRIP_LENGTH
Definition: ledstrip.h:28
Definition: ledstrip.h:69
uint8_t color[LED_DIRECTION_COUNT]
Definition: ledstrip.h:117
Definition: ledstrip.h:84
Definition: ledstrip.h:45
Definition: ledstrip.h:60
struct led_mode_color_indices modeColors[LED_MODE_COUNT]
Definition: ledstrip.h:129
Definition: ledstrip.h:120
Definition: ledstrip.h:48
Definition: ledstrip.h:76
Definition: ledstrip.h:68
Definition: ledstrip.h:101
Definition: ledstrip.h:70
Definition: ledstrip.h:59
Definition: ledstrip.h:46
ledSpecialColorIds_e
Definition: ledstrip.h:52
#define LED_SPECIAL_COLOR_COUNT
Definition: ledstrip.h:26
ledModeIndex_e
Definition: ledstrip.h:42
Definition: ledstrip.h:66
Definition: ledstrip.h:104
Definition: ledstrip.h:86
Definition: ledstrip.h:105
Definition: ledstrip.h:74
Definition: ledstrip.h:57
Definition: ledstrip.h:87
Definition: ledstrip.h:112
#define LED_DIRECTION_COUNT
Definition: ledstrip.h:27
uint8_t color[LED_SPECIAL_COLOR_COUNT]
Definition: ledstrip.h:113
Definition: ledstrip.h:54
Definition: ledstrip.h:103
Definition: ledstrip.h:72
Definition: ledstrip.h:97
#define LED_MODE_COUNT
Definition: ledstrip.h:30
#define LED_CONFIGURABLE_COLOR_COUNT
Definition: ledstrip.h:29
Definition: ledstrip.h:77
Definition: ledstrip.h:49
ledDirectionId_e
Definition: ledstrip.h:82
Definition: ledstrip.h:100
Definition: ledstrip.h:99
Definition: ledstrip.h:116
Definition: ledstrip.h:79
struct led_config leds[LED_MAX_STRIP_LENGTH]
Definition: ledstrip.h:127
bool ledstrip_config_set_color(struct ledstrip_config *self, int index, const char *colorConfig)
Definition: ledstrip.c:8
Definition: ledstrip.h:85
colorId_e
Definition: ledstrip.h:65
struct hsvColor_s colors[LED_CONFIGURABLE_COLOR_COUNT]
Definition: ledstrip.h:128
Definition: ledstrip.h:75
Definition: ledstrip.h:102
Definition: ledstrip.h:58
ledFunctionId_e
Definition: ledstrip.h:95
Definition: ledstrip.h:55
Definition: ledstrip.h:53
Definition: ledstrip.h:78
Definition: ledstrip.h:88
Definition: ledstrip.h:56
Definition: ledstrip.h:83
uint8_t color
Definition: ledstrip.h:122