From d25139221ec71ed2fbd6a9e06aa3c039c6cf9551 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 21 Sep 2015 11:01:37 +0000 Subject: Fixed bug #609. Updated STM32F1xx headers. STM32F1xx, STM32F3xx and STM32F37x now use the common DMAv1 driver. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8319 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- .../ports/ARMCMx/devices/STM32F1xx/cmparams.h | 51 ++++++++-------------- 1 file changed, 19 insertions(+), 32 deletions(-) (limited to 'os/common/ports/ARMCMx') diff --git a/os/common/ports/ARMCMx/devices/STM32F1xx/cmparams.h b/os/common/ports/ARMCMx/devices/STM32F1xx/cmparams.h index 9f91938ff..0fe7e27ab 100644 --- a/os/common/ports/ARMCMx/devices/STM32F1xx/cmparams.h +++ b/os/common/ports/ARMCMx/devices/STM32F1xx/cmparams.h @@ -46,24 +46,34 @@ */ #define CORTEX_PRIORITY_BITS 4 +/** + * @brief Number of interrupt vectors. + * @note This number does not include the 16 system vectors and must be + * rounded to a multiple of 8. + */ +#define CORTEX_NUM_VECTORS 72 + +/* The following code is not processed when the file is included from an + asm module.*/ +#if !defined(_FROM_ASM_) + /* If the device type is not externally defined, for example from the Makefile, then a file named board.h is included. This file must contain a device definition compatible with the vendor include file.*/ -#if !defined(STM32F10X_LD) && !defined(STM32F10X_LD_VL) && \ - !defined(STM32F10X_MD) && !defined(STM32F10X_MD_VL) && \ - !defined(STM32F10X_HD) && !defined(STM32F10X_HD_VL) && \ - !defined(STM32F10X_XL) && !defined(STM32F10X_CL) +#if !defined(STM32F100xB) && !defined(STM32F100xE) && \ + !defined(STM32F101x6) && !defined(STM32F101xB) && \ + !defined(STM32F101xE) && !defined(STM32F101xG) && \ + !defined(STM32F102x6) && !defined(STM32F102xB) && \ + !defined(STM32F103x6) && !defined(STM32F103xB) && \ + !defined(STM32F103xE) && !defined(STM32F103xG) && \ + !defined(STM32F105xC) && !defined(STM32F107xC) #include "board.h" #endif -/* The following code is not processed when the file is included from an - asm module.*/ -#if !defined(_FROM_ASM_) - /* Including the device CMSIS header. Note, we are not using the definitions from this header because we need this file to be usable also from assembler source files. We verify that the info matches instead.*/ -#include "stm32f10x.h" +#include "stm32f1xx.h" #if CORTEX_MODEL != __CORTEX_M #error "CMSIS __CORTEX_M mismatch" @@ -75,29 +85,6 @@ #endif /* !defined(_FROM_ASM_) */ -#if defined(STM32F10X_CL) -#define __NVECTORS 72 -#elif defined(STM32F10X_XL) -#define __NVECTORS 64 -#elif defined(STM32F10X_LD_VL) || \ - defined(STM32F10X_MD_VL) || \ - defined(STM32F10X_HD_VL) -#define __NVECTORS 64 -#elif defined(STM32F10X_LD) || \ - defined(STM32F10X_MD) || \ - defined(STM32F10X_HD) -#define __NVECTORS 64 -#else -#error "STM32F1xx device not defined or not recognized" -#endif - -/** - * @brief Number of interrupt vectors. - * @note This number does not include the 16 system vectors and must be - * rounded to a multiple of 8. - */ -#define CORTEX_NUM_VECTORS __NVECTORS - #endif /* _CMPARAMS_H_ */ /** @} */ -- cgit v1.2.3