From 1ebf6805ad1337248ee6901cf847c3552bbfefbe Mon Sep 17 00:00:00 2001 From: schodet Date: Tue, 5 Jul 2005 18:42:40 +0000 Subject: Ajout de common. --- n/avr/common/common.h | 30 ++++++++++++++++++++++++++++++ n/avr/common/io.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 n/avr/common/common.h create mode 100644 n/avr/common/io.h (limited to 'n/avr/common') 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 + +#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 +#include + +/* No INTERRUPT as it is dangerous. */ +#undef INTERRUPT + +#else /* HOST */ + +/* No interrupt support on host. */ +#define sei() +#define cli() + +#endif /* HOST */ + +#endif /* io_h */ -- cgit v1.2.3