summaryrefslogtreecommitdiff
path: root/n
diff options
context:
space:
mode:
authorschodet2005-07-05 18:42:40 +0000
committerschodet2005-07-05 18:42:40 +0000
commit1ebf6805ad1337248ee6901cf847c3552bbfefbe (patch)
treee00e2e2803f9a98bcfd89f507a252d6005f3d6da /n
parenta6285f0fdfd60fb274bd20ff2bf6f5113cb99184 (diff)
Ajout de common.
Diffstat (limited to 'n')
-rw-r--r--n/avr/common/common.h30
-rw-r--r--n/avr/common/io.h45
2 files changed, 75 insertions, 0 deletions
diff --git a/n/avr/common/common.h b/n/avr/common/common.h
new file mode 100644
index 0000000..cb4dec1
--- /dev/null
+++ b/n/avr/common/common.h
@@ -0,0 +1,30 @@
+#ifndef common_h
+#define common_h
+/* common.h - Common definitions and includes. */
+/* avr.modules - AVR modules. {{{
+ *
+ * Copyright (C) 2005 Nicolas Schodet
+ *
+ * Robot APB Team/Efrei 2006.
+ * Web: http://assos.efrei.fr/robot/
+ * Email: robot AT efrei DOT fr
+ *
+ * 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.
+ *
+ * }}} */
+
+#include <stdint.h>
+
+#endif /* common_h */
diff --git a/n/avr/common/io.h b/n/avr/common/io.h
new file mode 100644
index 0000000..920d9ff
--- /dev/null
+++ b/n/avr/common/io.h
@@ -0,0 +1,45 @@
+#ifndef io_h
+#define io_h
+/* io.h */
+/* avr.modules - AVR modules. {{{
+ *
+ * Copyright (C) 2005 Nicolas Schodet
+ *
+ * Robot APB Team/Efrei 2006.
+ * Web: http://assos.efrei.fr/robot/
+ * Email: robot AT efrei DOT fr
+ *
+ * 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.
+ *
+ * }}} */
+
+#ifndef HOST
+
+/* Avr part. */
+#include <avr/interrupt.h>
+#include <avr/signal.h>
+
+/* No INTERRUPT as it is dangerous. */
+#undef INTERRUPT
+
+#else /* HOST */
+
+/* No interrupt support on host. */
+#define sei()
+#define cli()
+
+#endif /* HOST */
+
+#endif /* io_h */