diff options
| author | info@mode42.com <info@mode42.com> | 2026-08-07 18:09:58 +0000 |
|---|---|---|
| committer | info@mode42.com <info@mode42.com> | 2026-08-07 18:09:58 +0000 |
| commit | a7362dc14bca1233eb34b41aefebe9cfb22684ac (patch) | |
| tree | f727c87f92aeb503038deeecc24d3e074dc0197c /firmware/s1224/include/status.h | |
Initial pushmain
Diffstat (limited to 'firmware/s1224/include/status.h')
| -rw-r--r-- | firmware/s1224/include/status.h | 23 |
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 |
