![]() |
Midnight Sun Firmware
|
FSM library. More...
Classes | |
| struct | State |
| struct | Fsm |
Macros | |
| #define | MAX_STATES 10 |
| #define | MAX_TRANSITIONS 5 |
| #define | STATE(state_id, entry, state_func) [state_id] = { .entry_func = entry, .state_action = state_func } |
| Creates state with associated ID in a state list. More... | |
Typedefs | |
| typedef void(* | StateAction) (void *context) |
| typedef uint8_t | StateId |
FSM library.
| #define STATE | ( | state_id, | |
| entry, | |||
| state_func | |||
| ) | [state_id] = { .entry_func = entry, .state_action = state_func } |
Creates state with associated ID in a state list.
State id must be unique (preferred to use enum type)