From d6611f62ddd62921a7b9bb9053ec7d488ac91e11 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Fri, 17 Jul 2009 23:05:01 +0200 Subject: Add all base addresses for peripherals as per datasheet. --- include/libopenstm32/gpio.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include/libopenstm32/gpio.h') 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 */ -- cgit v1.2.3