aboutsummaryrefslogtreecommitdiff
path: root/include/libopenstm32/gpio.h
diff options
context:
space:
mode:
authorUwe Hermann2009-07-17 23:05:01 +0200
committerUwe Hermann2009-07-17 23:05:01 +0200
commitd6611f62ddd62921a7b9bb9053ec7d488ac91e11 (patch)
tree25d054d31a50614db2c5bd394f5d840d6ff89050 /include/libopenstm32/gpio.h
parente04cec3b5d6fed6fab7ed5a606b2777508921536 (diff)
Add all base addresses for peripherals as per datasheet.
Diffstat (limited to 'include/libopenstm32/gpio.h')
-rw-r--r--include/libopenstm32/gpio.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/libopenstm32/gpio.h b/include/libopenstm32/gpio.h
index 482d348..47551bf 100644
--- a/include/libopenstm32/gpio.h
+++ b/include/libopenstm32/gpio.h
@@ -23,14 +23,14 @@
#include "libopenstm32.h"
-/* GPIO port base addresses */
-#define GPIO_BASE_A (PERIPH_BASE_APB2 + 0x0800)
-#define GPIO_BASE_B (PERIPH_BASE_APB2 + 0x0c00)
-#define GPIO_BASE_C (PERIPH_BASE_APB2 + 0x1000)
-#define GPIO_BASE_D (PERIPH_BASE_APB2 + 0x1400)
-#define GPIO_BASE_E (PERIPH_BASE_APB2 + 0x1800)
-#define GPIO_BASE_F (PERIPH_BASE_APB2 + 0x1c00)
-#define GPIO_BASE_G (PERIPH_BASE_APB2 + 0x2000)
+/* GPIO port base addresses (for convenience) */
+#define GPIOA GPIO_PORT_A_BASE
+#define GPIOB GPIO_PORT_B_BASE
+#define GPIOC GPIO_PORT_C_BASE
+#define GPIOD GPIO_PORT_D_BASE
+#define GPIOE GPIO_PORT_E_BASE
+#define GPIOF GPIO_PORT_F_BASE
+#define GPIOG GPIO_PORT_G_BASE
/* Register offsets */
#define GPIO_CTRL_LO 0x00 /* 32 bit */