From 4332b32f6007d3c50f043972f16a55af65caa998 Mon Sep 17 00:00:00 2001 From: onelin Date: Fri, 1 May 2026 19:28:07 +0200 Subject: Add message queue and controller source program --- config.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 config.h (limited to 'config.h') diff --git a/config.h b/config.h new file mode 100644 index 0000000..6c08192 --- /dev/null +++ b/config.h @@ -0,0 +1,34 @@ +enum action { + nop = 0, + + update, + + ACTION_MAX, +}; + +enum element_e { + ELEMENT_INVALID = 0, + +#define ELEMENT(name, _arg, _minutes, _seconds) \ + ELEMENT_##name, +#include "config.def.h" +#undef ELEMENT + + ELEMENT_MAX, +}; + +const char* element_str[] = { + [ELEMENT_INVALID] = "ELEMENT_INVALID", + +#define ELEMENT(name, arg, _minutes, _seconds) \ + [ELEMENT_##name] = "ELEMENT_" #name, +#include "config.def.h" +#undef ELEMENT +}; + +struct message_t { + enum element_e element; + enum action action; +}; + + -- cgit v1.3