diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-12 15:42:54 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-12 15:42:54 +0000 |
commit | 67e80419b7acb17801c0cff68632a99450dc393a (patch) | |
tree | 213594a1c8b1f8ebfc4eb5967652218d4e92090d /os/hal/platforms/STM32/GPIOv2 | |
parent | 3fb6b81233fb90c2b6330b872f34fc67eadd78d7 (diff) | |
download | ChibiOS-67e80419b7acb17801c0cff68632a99450dc393a.tar.gz ChibiOS-67e80419b7acb17801c0cff68632a99450dc393a.tar.bz2 ChibiOS-67e80419b7acb17801c0cff68632a99450dc393a.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6140 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/GPIOv2')
-rw-r--r-- | os/hal/platforms/STM32/GPIOv2/pal_lld.c | 2 | ||||
-rw-r--r-- | os/hal/platforms/STM32/GPIOv2/pal_lld.h | 20 |
2 files changed, 19 insertions, 3 deletions
diff --git a/os/hal/platforms/STM32/GPIOv2/pal_lld.c b/os/hal/platforms/STM32/GPIOv2/pal_lld.c index cc5e7f06e..017b340a0 100644 --- a/os/hal/platforms/STM32/GPIOv2/pal_lld.c +++ b/os/hal/platforms/STM32/GPIOv2/pal_lld.c @@ -73,7 +73,7 @@ /* Driver local functions. */
/*===========================================================================*/
-static void initgpio(GPIO_TypeDef *gpiop, const stm32_gpio_setup_t *config) {
+static void initgpio(stm32_gpio_t *gpiop, const stm32_gpio_setup_t *config) {
gpiop->OTYPER = config->otyper;
gpiop->OSPEEDR = config->ospeedr;
diff --git a/os/hal/platforms/STM32/GPIOv2/pal_lld.h b/os/hal/platforms/STM32/GPIOv2/pal_lld.h index 82b04c7f4..5349507df 100644 --- a/os/hal/platforms/STM32/GPIOv2/pal_lld.h +++ b/os/hal/platforms/STM32/GPIOv2/pal_lld.h @@ -130,6 +130,21 @@ PAL_STM32_OTYPE_OPENDRAIN)
/** @} */
+/**
+ * @name GPIO ports definitions
+ * @{
+ */
+#define GPIOA ((stm32_gpio_t *)GPIOA_BASE)
+#define GPIOB ((stm32_gpio_t *)GPIOB_BASE)
+#define GPIOC ((stm32_gpio_t *)GPIOC_BASE)
+#define GPIOD ((stm32_gpio_t *)GPIOD_BASE)
+#define GPIOE ((stm32_gpio_t *)GPIOE_BASE)
+#define GPIOF ((stm32_gpio_t *)GPIOF_BASE)
+#define GPIOG ((stm32_gpio_t *)GPIOG_BASE)
+#define GPIOH ((stm32_gpio_t *)GPIOH_BASE)
+#define GPIOI ((stm32_gpio_t *)GPIOI_BASE)
+/** @} */
+
/*===========================================================================*/
/* I/O Ports Types and constants. */
/*===========================================================================*/
@@ -155,7 +170,8 @@ typedef struct { volatile uint32_t LCKR;
volatile uint32_t AFRL;
volatile uint32_t AFRH;
-} GPIO_TypeDef;
+ volatile uint32_t BRR;
+} stm32_gpio_t;
/**
* @brief GPIO port setup info.
@@ -242,7 +258,7 @@ typedef uint32_t iomode_t; * any assumption about it, use the provided macros when populating
* variables of this type.
*/
-typedef GPIO_TypeDef * ioportid_t;
+typedef stm32_gpio_t * ioportid_t;
/*===========================================================================*/
/* I/O Ports Identifiers. */
|