adnan012
Advanced Member level 1
What this piece of code is doing?
Regards!
[moderator action: added CODE tags]
Code:
typedef enum {
st_idle = 0,
st_init = 1,
st_run = 2,
st_rst = 3,
}state_t;
typedef enum {
ev_none = 0,
ev_any = 1,
ev_key_pressed = 2,
ev_cmd = 3,
ev_time_out = 4,
}event_t;
typedef struct {
state_t current_event;
event_t event;
state_t next_state;
}stateTranMatrix;
static stateTranMatrix st_Matrix[] = {
{st_idle , ev_none , st_init},
{st_init , ev_none , st_idle},
};
Regards!
[moderator action: added CODE tags]
Last edited by a moderator: