Use generic include.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 10 Sep 2010 09:33:51 +0000 (09:33 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 10 Sep 2010 09:33:51 +0000 (09:33 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4228 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/cortex-m3/drv/clock_cm3.h [new file with mode: 0644]
bertos/cpu/cortex-m3/hw/init_cm3.c
bertos/cpu/cortex-m3/io/cm3.h [new file with mode: 0644]

diff --git a/bertos/cpu/cortex-m3/drv/clock_cm3.h b/bertos/cpu/cortex-m3/drv/clock_cm3.h
new file mode 100644 (file)
index 0000000..8abc4ee
--- /dev/null
@@ -0,0 +1,49 @@
+/**
+ * \file
+ * <!--
+ * This file is part of BeRTOS.
+ *
+ * Bertos 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * As a special exception, you may use this file as part of a free software
+ * library without restriction.  Specifically, if other files instantiate
+ * templates or use macros or inline functions from this file, or you compile
+ * this file and link it with other files to produce an executable, this
+ * file does not by itself cause the resulting executable to be covered by
+ * the GNU General Public License.  This exception does not however
+ * invalidate any other reasons why the executable file might be covered by
+ * the GNU General Public License.
+ *
+ * Copyright 2010 Develer S.r.l. (http://www.develer.com/)
+ *
+ * -->
+ *
+ * \brief Low-level Clock module for ARM Cortex-m3 (interface).
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ *
+ */
+
+#include <cpu/detect.h>
+
+#if CPU_CM3_LM3S
+       #include "clock_lm3s.h"
+#elif CPU_CM3_STM32
+       #include "clock_stm32.h"
+/*#elif  Add other Cortex-M3 CPUs here */
+#else
+       #error Unknown CPU
+#endif
+
index 65009d35967c0b1fa6759a117e88cf0c2047af6c..b67900fccd0aefb16123efac696c9019c9233d2d 100644 (file)
 #include <cpu/types.h>
 
 #include <drv/irq_cm3.h>
+#include <drv/clock_cm3.h>
 
 #include <kern/proc_p.h>
 
-#if CPU_CM3_LM3S
-#include <drv/clock_lm3s.h>
-#include <io/lm3s.h>
-#elif CPU_CM3_STM32
-#include <drv/clock_stm32.h>
-#include <io/stm32.h>
-#endif
+#include <io/cm3.h>
 
 extern size_t __text_end, __data_start, __data_end, __bss_start, __bss_end;
 
diff --git a/bertos/cpu/cortex-m3/io/cm3.h b/bertos/cpu/cortex-m3/io/cm3.h
new file mode 100644 (file)
index 0000000..3b99e10
--- /dev/null
@@ -0,0 +1,49 @@
+/**
+ * \file
+ * <!--
+ * This file is part of BeRTOS.
+ *
+ * Bertos 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * As a special exception, you may use this file as part of a free software
+ * library without restriction.  Specifically, if other files instantiate
+ * templates or use macros or inline functions from this file, or you compile
+ * this file and link it with other files to produce an executable, this
+ * file does not by itself cause the resulting executable to be covered by
+ * the GNU General Public License.  This exception does not however
+ * invalidate any other reasons why the executable file might be covered by
+ * the GNU General Public License.
+ *
+ * Copyright 2010 Develer S.r.l. (http://www.develer.com/)
+ *
+ * -->
+ *
+ * \brief Low-level Registry definition for ARM Cortex-m3 (interface).
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ *
+ */
+
+#include <cpu/detect.h>
+
+#if CPU_CM3_LM3S
+       #include "lm3s.h"
+#elif CPU_CM3_STM32
+       #include "stm32.h"
+/*#elif  Add other Cortex-M3 CPUs here */
+#else
+       #error Unknown CPU
+#endif
+