summaryrefslogtreecommitdiff
path: root/firmware/s1224/include/status.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/s1224/include/status.h')
-rw-r--r--firmware/s1224/include/status.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/firmware/s1224/include/status.h b/firmware/s1224/include/status.h
new file mode 100644
index 0000000..3c62390
--- /dev/null
+++ b/firmware/s1224/include/status.h
@@ -0,0 +1,23 @@
+#ifndef S1224_STATUS_H
+#define S1224_STATUS_H
+
+#include <stdbool.h>
+
+typedef enum {
+ S1224_STATE_STARTING = 0,
+ S1224_STATE_READY,
+ S1224_STATE_FAULT,
+ S1224_STATE_SENDING,
+ S1224_STATE_SIGNAL, /* CDT active (Signal/RX) */
+ S1224_STATE_PACKET /* RXD packet sense (may coexist with signal) */
+} s1224_state_t;
+
+/** Operator-facing text for state (from INI). */
+const char *s1224_state_string(s1224_state_t st);
+void status_set(s1224_state_t st);
+s1224_state_t status_get(void);
+/** Recompute composite state from PTT + sense; publish if changed. */
+void status_tick(void);
+void status_publish(void);
+
+#endif
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com