aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-07-27 17:23:19 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-07-27 17:23:19 +0000
commit5dc3abbc30d44e87b1dab47df616c51956b7cfa5 (patch)
treef8e2460c9ebf8b47c997ea3df3583fc5fe53796d /os
parentde3354237212038456fadffcc252b4365815634a (diff)
downloadChibiOS-5dc3abbc30d44e87b1dab47df616c51956b7cfa5.tar.gz
ChibiOS-5dc3abbc30d44e87b1dab47df616c51956b7cfa5.tar.bz2
ChibiOS-5dc3abbc30d44e87b1dab47df616c51956b7cfa5.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3181 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/platforms/STM32/GPIOv2/pal_lld.c8
-rw-r--r--os/hal/platforms/STM32/GPIOv2/pal_lld.h11
2 files changed, 17 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32/GPIOv2/pal_lld.c b/os/hal/platforms/STM32/GPIOv2/pal_lld.c
index 30b7d9c05..f57458030 100644
--- a/os/hal/platforms/STM32/GPIOv2/pal_lld.c
+++ b/os/hal/platforms/STM32/GPIOv2/pal_lld.c
@@ -37,6 +37,12 @@
RCC_AHBENR_GPIOEEN | RCC_AHBENR_GPIOHEN)
#define AHB_LPEN_MASK AHB_EN_MASK
#elif defined(STM32F2XX)
+#define AHB1_EN_MASK (RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | \
+ RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | \
+ RCC_AHB1ENR_GPIOEEN | RCC_AHB1ENR_GPIOFEN | \
+ RCC_AHB1ENR_GPIOGEN | RCC_AHB1ENR_GPIOHEN | \
+ RCC_AHB1ENR_GPIOIEN)
+#define AHB1_LPEN_MASK AHB1_EN_MASK
#else
#error "missing or usupported platform for GPIOv2 PAL driver"
#endif
@@ -89,6 +95,8 @@ void _pal_lld_init(const PALConfig *config) {
RCC->AHBENR |= AHB_EN_MASK;
RCC->AHBLPENR |= AHB_LPEN_MASK;
#elif defined(STM32F2XX)
+ RCC->AHB1ENR |= AHB1_EN_MASK;
+ RCC->AHB1LPENR |= AHB1_LPEN_MASK;
#endif
/*
diff --git a/os/hal/platforms/STM32/GPIOv2/pal_lld.h b/os/hal/platforms/STM32/GPIOv2/pal_lld.h
index 0e7d6606d..175c3a6d7 100644
--- a/os/hal/platforms/STM32/GPIOv2/pal_lld.h
+++ b/os/hal/platforms/STM32/GPIOv2/pal_lld.h
@@ -19,8 +19,8 @@
*/
/**
- * @file STM32L1xx/pal_lld.h
- * @brief STM32L1xx GPIO low level driver header.
+ * @file STM32/GPIOv2/pal_lld.h
+ * @brief STM32L1xx/STM32F2xx GPIO low level driver header.
*
* @addtogroup PAL
* @{
@@ -306,6 +306,13 @@ typedef GPIO_TypeDef * ioportid_t;
#define IOPORT8 GPIOH
#endif
+/**
+ * @brief GPIO port I identifier.
+ */
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+#define IOPORT9 GPIOI
+#endif
+
/*===========================================================================*/
/* Implementation, some of the following macros could be implemented as */
/* functions, please put them in a file named ioports_lld.c if so. */