summaryrefslogtreecommitdiff
path: root/firmware/c1224/include/status.h
blob: fefe6e83f00eea671782a5afb747d5b8b8a59bc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef C1224_STATUS_H
#define C1224_STATUS_H

#include <stdbool.h>

typedef enum {
    C1224_STATE_STARTING = 0,
    C1224_STATE_READY,
    C1224_STATE_FAULT,
    C1224_STATE_SENDING,
    C1224_STATE_SIGNAL,   /* CDT active (Signal/RX) */
    C1224_STATE_PACKET    /* RXD packet sense (may coexist with signal) */
} c1224_state_t;

/** Operator-facing text for state (from INI). */
const char *c1224_state_string(c1224_state_t st);
void status_set(c1224_state_t st);
c1224_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