From ced5faed197679a0f3a18a2445bbbf79d77987a5 Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Thu, 24 Apr 2008 23:46:38 +0200 Subject: * digital/io/src - make fsm handle event return 1 if a transition has been executed ; - in the main loop, when a transition has been executed, continue to the next iteration. --- digital/io/src/fsm.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'digital/io/src/fsm.h') diff --git a/digital/io/src/fsm.h b/digital/io/src/fsm.h index 224e5801..4933cb8e 100644 --- a/digital/io/src/fsm.h +++ b/digital/io/src/fsm.h @@ -89,8 +89,12 @@ typedef struct fsm_t fsm_t; void fsm_init (fsm_t *fsm); -/** Handle an event on the given FSM. */ -void +/** Handle an event on the given FSM. + * @return + * - 0 if this FSM does not handle this event ; + * - 1 if this FSM handles this event in its current state. + */ +uint8_t fsm_handle_event (fsm_t *fsm, u8 event); #include "getsamples_fsm.h" -- cgit v1.2.3