From ec673b751baf02353ee6bd2249d4d92f1e538e0e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 21 Apr 2014 08:20:04 +0000 Subject: Fixed bug #484. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6851 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/GPIOv2/pal_lld.c | 2 +- os/hal/platforms/STM32/stm32.h | 5 ++++- os/hal/platforms/STM32L1xx/hal_lld.h | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) (limited to 'os') diff --git a/os/hal/platforms/STM32/GPIOv2/pal_lld.c b/os/hal/platforms/STM32/GPIOv2/pal_lld.c index 641670259..91d397cdc 100644 --- a/os/hal/platforms/STM32/GPIOv2/pal_lld.c +++ b/os/hal/platforms/STM32/GPIOv2/pal_lld.c @@ -31,7 +31,7 @@ /* Driver local definitions. */ /*===========================================================================*/ -#if defined(STM32L1XX_MD) +#if defined(STM32L1XX_MD) || defined(STM32L1XX_MDP) || defined(STM32L1XX_HD) #define AHB_EN_MASK (RCC_AHBENR_GPIOAEN | RCC_AHBENR_GPIOBEN | \ RCC_AHBENR_GPIOCEN | RCC_AHBENR_GPIODEN | \ RCC_AHBENR_GPIOEEN | RCC_AHBENR_GPIOHEN) diff --git a/os/hal/platforms/STM32/stm32.h b/os/hal/platforms/STM32/stm32.h index 45753a6aa..1ad0691bc 100644 --- a/os/hal/platforms/STM32/stm32.h +++ b/os/hal/platforms/STM32/stm32.h @@ -33,6 +33,8 @@ * - STM32F37X for Analog & DSP devices. * - STM32F4XX for High-performance STM32 F-4 devices. * - STM32L1XX_MD for Ultra Low Power Medium-density devices. + * - STM32L1XX_MDP for Ultra Low Power Medium-density Plus devices. + * - STM32L1XX_HD for Ultra Low Power High-density devices. * . * * @addtogroup HAL @@ -66,7 +68,8 @@ defined(STM32F427_437xx) || defined(STM32F429_439xx) #include "stm32f4xx.h" -#elif defined(STM32L1XX_MD) +#elif defined(STM32L1XX_MD) || defined(STM32L1XX_MDP) || \ + defined(STM32L1XX_HD) #include "stm32l1xx.h" #else diff --git a/os/hal/platforms/STM32L1xx/hal_lld.h b/os/hal/platforms/STM32L1xx/hal_lld.h index d0649e6c9..86aa2b778 100644 --- a/os/hal/platforms/STM32L1xx/hal_lld.h +++ b/os/hal/platforms/STM32L1xx/hal_lld.h @@ -25,6 +25,8 @@ * . * One of the following macros must also be defined: * - STM32L1XX_MD for Ultra Low Power Medium-density devices. + * - STM32L1XX_MDP for Ultra Low Power Medium-density Plus devices. + * - STM32L1XX_HD for Ultra Low Power High-density devices. * . * * @addtogroup HAL @@ -49,7 +51,21 @@ * @name Platform identification * @{ */ +#if defined(STM32L1XX_MD) || defined(__DOXYGEN__) #define PLATFORM_NAME "STM32L1xx Ultra Low Power Medium Density" +#define STM32L1XX + +#elif defined(STM32L1XX_MDP) +#define PLATFORM_NAME "STM32L1xx Ultra Low Power Medium Density Plus" +#define STM32L1XX + +#elif defined(STM32L1XX_HD) +#define PLATFORM_NAME "STM32L1xx Ultra Low Power High Density" +#define STM32L1XX + +#else +#error "STM32L1xx device not specified" +#endif /** @} */ /** -- cgit v1.2.3