20 #define WS2811_LED_STRIP_LENGTH 32
21 #define WS2811_BITS_PER_LED 24
22 #define WS2811_DELAY_BUFFER_LENGTH 42 // for 50us delay
24 #define WS2811_DATA_BUFFER_SIZE (WS2811_BITS_PER_LED * WS2811_LED_STRIP_LENGTH)
26 #define WS2811_DMA_BUFFER_SIZE (WS2811_DATA_BUFFER_SIZE + WS2811_DELAY_BUFFER_LENGTH) // number of bytes needed is #LEDs * 24 bytes + 42 trailing bytes)
28 #define BIT_COMPARE_1 17 // timer compare value for logical 1
29 #define BIT_COMPARE_0 9 // timer compare value for logical 0
uint8_t ledStripDMABuffer[WS2811_DMA_BUFFER_SIZE]
Definition: light_ws2811strip.c:39
void ws2811LedStripInit(void)
Definition: light_ws2811strip.c:87
volatile uint8_t ws2811LedDataTransferInProgress
Definition: light_ws2811strip.c:40
void setLedHsv(int index, const hsvColor_t *color)
Definition: light_ws2811strip.c:44
void setStripColor(const hsvColor_t *color)
Definition: light_ws2811strip.c:64
void setStripColors(const hsvColor_t *colors)
Definition: light_ws2811strip.c:70
bool isWS2811LedStripReady(void)
Definition: light_ws2811strip.c:95
void ws2811LedStripHardwareInit(void)
Definition: light_ws2811strip_stm32f10x.c:27
#define WS2811_DMA_BUFFER_SIZE
Definition: light_ws2811strip.h:26
uint8_t color[LED_SPECIAL_COLOR_COUNT]
Definition: ledstrip.h:9
void ws2811UpdateStrip(void)
Definition: light_ws2811strip.c:116
struct hsvColor_s colors[LED_CONFIGURABLE_COLOR_COUNT]
Definition: ledstrip.h:10
void getLedHsv(int index, hsvColor_t *color)
Definition: light_ws2811strip.c:49
void scaleLedValue(int index, const uint8_t scalePercent)
Definition: light_ws2811strip.c:59
void ws2811LedStripDMAEnable(void)
Definition: light_ws2811strip_stm32f10x.c:115
void setLedValue(int index, const uint8_t value)
Definition: light_ws2811strip.c:54