30#define MAX_TRANSITIONS 5 
   32typedef void (*StateAction)(
void *context);
 
   33typedef uint8_t StateId;
 
   37  StateAction entry_func;
 
   38  StateAction state_action;
 
   43  uint8_t *transition_table;
 
   46  SemaphoreHandle_t fsm_sem;
 
   47  StaticSemaphore_t sem_buf;
 
   55#define STATE(state_id, entry, state_func) [state_id] = { .entry_func = entry, .state_action = state_func }