From f44a8cf6969d5df2a4c3ed6a2225c7fcc02e979c Mon Sep 17 00:00:00 2001 From: Silvio Gissi Date: Mon, 27 Oct 2014 21:49:06 +0000 Subject: [PATCH] lpc17xx: memorymap: Add GPIO block at correct location --- include/libopencm3/lpc17xx/memorymap.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/libopencm3/lpc17xx/memorymap.h b/include/libopencm3/lpc17xx/memorymap.h index b8c09080..f68f5904 100644 --- a/include/libopencm3/lpc17xx/memorymap.h +++ b/include/libopencm3/lpc17xx/memorymap.h @@ -26,12 +26,20 @@ /* --- LPC17XX specific peripheral definitions ----------------------------- */ /* Memory map for all busses */ +#define PERIPH_BASE_GPIO (0x2009C000U) #define PERIPH_BASE_APB0 (0x40000000U) #define PERIPH_BASE_APB1 (0x40080000U) #define PERIPH_BASE_AHB (0x50000000U) /* Register boundary addresses */ +/* GPIO */ +#define GPIO_PIO0_BASE (PERIPH_BASE_GPIO + 0x00) +#define GPIO_PIO1_BASE (PERIPH_BASE_GPIO + 0x20) +#define GPIO_PIO2_BASE (PERIPH_BASE_GPIO + 0x40) +#define GPIO_PIO3_BASE (PERIPH_BASE_GPIO + 0x60) +#define GPIO_PIO4_BASE (PERIPH_BASE_GPIO + 0x80) + /* APB0 */ #define WDT_BASE (PERIPH_BASE_APB0 + 0x00000) #define TIMER0_BASE (PERIPH_BASE_APB0 + 0x04000)