From 2f8ddd222403c832825f4bc9b875ed5dd60a613c Mon Sep 17 00:00:00 2001 From: asterix Date: Fri, 10 Sep 2010 09:33:51 +0000 Subject: [PATCH] Use generic include. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4228 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/cortex-m3/drv/clock_cm3.h | 49 ++++++++++++++++++++++++++++ bertos/cpu/cortex-m3/hw/init_cm3.c | 9 ++--- bertos/cpu/cortex-m3/io/cm3.h | 49 ++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 bertos/cpu/cortex-m3/drv/clock_cm3.h create mode 100644 bertos/cpu/cortex-m3/io/cm3.h diff --git a/bertos/cpu/cortex-m3/drv/clock_cm3.h b/bertos/cpu/cortex-m3/drv/clock_cm3.h new file mode 100644 index 00000000..8abc4eef --- /dev/null +++ b/bertos/cpu/cortex-m3/drv/clock_cm3.h @@ -0,0 +1,49 @@ +/** + * \file + * + * + * \brief Low-level Clock module for ARM Cortex-m3 (interface). + * + * \author Daniele Basile + * + */ + +#include + +#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 + diff --git a/bertos/cpu/cortex-m3/hw/init_cm3.c b/bertos/cpu/cortex-m3/hw/init_cm3.c index 65009d35..b67900fc 100644 --- a/bertos/cpu/cortex-m3/hw/init_cm3.c +++ b/bertos/cpu/cortex-m3/hw/init_cm3.c @@ -46,16 +46,11 @@ #include #include +#include #include -#if CPU_CM3_LM3S -#include -#include -#elif CPU_CM3_STM32 -#include -#include -#endif +#include 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 index 00000000..3b99e102 --- /dev/null +++ b/bertos/cpu/cortex-m3/io/cm3.h @@ -0,0 +1,49 @@ +/** + * \file + * + * + * \brief Low-level Registry definition for ARM Cortex-m3 (interface). + * + * \author Daniele Basile + * + */ + +#include + +#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 + -- 2.25.1