equal
deleted
inserted
replaced
95 |
95 |
96 /*****************************************************************************/ |
96 /*****************************************************************************/ |
97 |
97 |
98 /** |
98 /** |
99 Executes the current state of the state machine. |
99 Executes the current state of the state machine. |
100 */ |
100 \return false, if the state machine has terminated |
101 |
101 */ |
102 void ec_fsm_change_exec(ec_fsm_change_t *fsm /**< finite state machine */) |
102 |
|
103 int ec_fsm_change_exec(ec_fsm_change_t *fsm /**< finite state machine */) |
103 { |
104 { |
104 fsm->state(fsm); |
105 fsm->state(fsm); |
105 } |
106 |
106 |
|
107 /*****************************************************************************/ |
|
108 |
|
109 /** |
|
110 Returns the running state of the state machine. |
|
111 \return non-zero if not terminated yet. |
|
112 */ |
|
113 |
|
114 int ec_fsm_change_running(ec_fsm_change_t *fsm /**< Finite state machine */) |
|
115 { |
|
116 return fsm->state != ec_fsm_change_end |
107 return fsm->state != ec_fsm_change_end |
117 && fsm->state != ec_fsm_change_error; |
108 && fsm->state != ec_fsm_change_error; |
118 } |
109 } |
119 |
110 |
120 /*****************************************************************************/ |
111 /*****************************************************************************/ |