summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/main.h
diff options
context:
space:
mode:
authorJérémy Dufour2008-04-24 23:47:40 +0200
committerJérémy Dufour2008-04-24 23:47:40 +0200
commit4d88c551ef61836af59f86ca1dd41c47ed2ead9a (patch)
tree54816330083f6340665b565ac34b3276ee0bb1dc /digital/io/src/main.h
parent457485aebff5c6bbe9e4075dd0f61bbafa9dc8d9 (diff)
* digital/io/src
- when a sub FSM finished, it posts an event for the top FSM which will be notified in the next main loop iteration (rather than the actual one).
Diffstat (limited to 'digital/io/src/main.h')
-rw-r--r--digital/io/src/main.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/digital/io/src/main.h b/digital/io/src/main.h
new file mode 100644
index 00000000..40bf1f9d
--- /dev/null
+++ b/digital/io/src/main.h
@@ -0,0 +1,36 @@
+#ifndef main_h
+#define main_h
+/* main.h */
+/* io - Input & Output with Artificial Intelligence (ai) support on AVR. {{{
+ *
+ * Copyright (C) 2008 Dufour Jérémy
+ *
+ * APBTeam:
+ * Web: http://apbteam.org/
+ * Email: team AT apbteam DOT org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * }}} */
+
+/**
+ * Post a event to the top FSM in the next iteration of main loop.
+ * You just need to set variable to the value of the event you want to post to
+ * the top FSM and add one to it (because some event could have a zero value).
+ * It will be posted and cleared in the next main loop iteration.
+ */
+extern uint8_t main_post_event_for_top_fsm;
+
+#endif /* main_h */