From b1ca00800f34ab86c0a99c46796c73a8028157ff Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Wed, 1 Dec 2021 00:34:18 -0700 Subject: Port the code from my STM project over to ESP32. There is still definitely some jenk to it. For one I still need to figure out how to protect critical sections to prevent stutter. I do need to set up a timer to control the time incrementer rather than depending on the speed of the spi bus. --- include/ws2812b_writer.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/ws2812b_writer.h b/include/ws2812b_writer.h index 0679059..2252230 100644 --- a/include/ws2812b_writer.h +++ b/include/ws2812b_writer.h @@ -7,10 +7,24 @@ #include "freertos/task.h" typedef struct { - char color[32]; ws2812b_t* drv; + + struct { + uint32_t time; + int32_t timetick; + uint8_t brightness; + uint8_t off; + uint8_t n_snow; + uint8_t n_red; + + bool sleep; + bool power; + bool cool; + } state; } ws_params_t; +void reset_parameters(ws_params_t* params); + portTASK_FUNCTION_PROTO(ws2812b_write_task, params); #endif /* WS2812B_WRITER_H_ */ -- cgit