From 8d379bf60e50960f6c855cd6b9c83956a082f73d Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 2 Dec 2021 17:19:00 -0700 Subject: Break out the state parmaters into their own include file. This helps by creating one location to add state parameters. --- include/ws2812b_writer.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'include/ws2812b_writer.h') diff --git a/include/ws2812b_writer.h b/include/ws2812b_writer.h index 9da9345..89b4f7a 100644 --- a/include/ws2812b_writer.h +++ b/include/ws2812b_writer.h @@ -10,16 +10,9 @@ typedef struct { ws2812b_t* drv; struct { - uint32_t time; - int timetick; - uint8_t brightness; - uint8_t off; - uint8_t n_snow; - uint8_t n_red; - - bool sleep; - bool power; - bool cool; +#define STATE_PARAM(t, n) t n; +#include "state_params.i" +#undef STATE_PARAM } state; } ws_params_t; -- cgit