aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-04-21 08:20:14 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-04-21 08:20:14 +0000
commitd855e1cf6c2d696f15bc3a0495d48dc407e73914 (patch)
treeb37ba18d5d4938fb9bc38732de80b95563b43372 /os/hal/ports/STM32
parent610bc93341c875dc8a805fc3483d8bd9101f65c3 (diff)
downloadChibiOS-d855e1cf6c2d696f15bc3a0495d48dc407e73914.tar.gz
ChibiOS-d855e1cf6c2d696f15bc3a0495d48dc407e73914.tar.bz2
ChibiOS-d855e1cf6c2d696f15bc3a0495d48dc407e73914.zip
Fixed bug #484.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6852 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32')
-rw-r--r--os/hal/ports/STM32/LLD/GPIOv2/pal_lld.c2
-rw-r--r--os/hal/ports/STM32/STM32L1xx/hal_lld.h23
2 files changed, 16 insertions, 9 deletions
diff --git a/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.c b/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.c
index 957e51c61..ce10e64d5 100644
--- a/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.c
+++ b/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.c
@@ -30,7 +30,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/ports/STM32/STM32L1xx/hal_lld.h b/os/hal/ports/STM32/STM32L1xx/hal_lld.h
index 2953afc19..0a81016f9 100644
--- a/os/hal/ports/STM32/STM32L1xx/hal_lld.h
+++ b/os/hal/ports/STM32/STM32L1xx/hal_lld.h
@@ -26,7 +26,7 @@
* 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 Medium-density devices.
+ * - STM32L1XX_HD for Ultra Low Power High-density devices.
* .
*
* @addtogroup HAL
@@ -46,7 +46,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
/** @} */
/**
@@ -356,13 +370,6 @@
#error "Using a wrong mcuconf.h file, STM32L1xx_MCUCONF not defined"
#endif
-/*
- * MCU variant check.
- */
-#if defined(STM32L1XX_MDP) || defined(STM32L1XX_HD)
-#error "unsupported STM32L1XX variant"
-#endif
-
/* Voltage related limits.*/
#if (STM32_VOS == STM32_VOS_1P8) || defined(__DOXYGEN__)
/**